Crash bug in the text editor là gì năm 2024

Long pressing an Apple Pencil inside a UITextView (instantiated in code) causes Scribble to sometimes insert a long wrapped--almost 2 lines--of blanks, after which there is a short delay and crash with exception "...Inconsistent element cache state...".

This crash can be prevented by changing the layout manager of the UITextView from TextKit 2 (now the iOS 16 default) to TextKit 1, which is done strangely enough by simply accessing the UITextView.layoutManager property as described in Apple's source code:

// To ensure compatibility with older code, accessing the .layoutManager 
// of a UITextView - or its .textContainer's .layoutManager - will cause 
// a UITextView that's using TextKit 2 to 'fall back' to TextKit 1, and 
// return a newly created NSLayoutManager. After this happens, 
// .textLayoutManager will return nil - and _any TextKit 2 objects you 
// may have cached will cease functioning_. Be careful about this if you 
// are intending to be using TextKit 2!
@property(nonatomic, readonly) NSLayoutManager *layoutManager API_AVAILABLE(ios(7.0));

NOTE that this does stop the strange insertion of the extra long blank lines, but instead just makes those blanks vanish when the pencil touches down again.

Ensure to back up your folders as resetting preferences removes all the custom settings, and InDesign launches with default settings.

Crash bug in the text editor là gì năm 2024
Approximate troubleshooting time: 5 mins.

App freeze/crash on launch

Crash bug in the text editor là gì năm 2024
Approximate troubleshooting time: 3 mins.

It is possible that antivirus software settings on your computer cause InDesign to crash on launch. Follow these steps to troubleshoot some of the antivirus issues:

Follow these steps to troubleshoot unexpected errors like library files issues on a network, OS-specific issues, or naming issues for UXP and CEP folders:

Crash bug in the text editor là gì năm 2024
Approximate troubleshooting time: 3 mins.

InDesign can crash when working with InDesign Libraries stored on a network or shared location. Follow the steps below to fix the issue on Windows or macOS operating systems.

  1. Open the Library folder, which is hidden by default. See Show hidden files to display hidden files and folders.
  2. Navigate to C:\Users\{user}\AppData\Local\Adobe\InDesign\{Version #}\{language}\. {user} is the user name with which you are logged in, {Version #} is the version of InDesign, and {language} is the language of InDesign application installed on your computer. For example, if you are logged in with user ID as john doe, the version of InDesign is 17.0, and the language is en_US, the path will be C:\Users\johndoe\AppData\Local\Adobe\InDesign\Version 17.0\en_US\
    Crash bug in the text editor là gì năm 2024
    Navigate to InDesign application installation path
  3. Rename the Caches folder to Caches_old.
  1. Open the Library folder, which is hidden by default. To open the Library folder, click the desktop to make sure you are in the Finder, hold down the Option key, then choose Go > Library.
  2. Navigate to Hard Drive/Users/{user}/Library/Caches/Adobe InDesign/{Version #}/. {user} is the user name with which you are logged in and {Version #} is the version of InDesign. For example, if you are logged in as john doe and the version of InDesign is 17.0, the path will be Macintosh HD/Users/johndoe/Library/Caches/Adobe InDesign/Version 17
  3. Rename the folder indicating the language of InDesign application that is installed on your system. For example, rename the en_US folder to en_US_old.

If you've installed a third-party plugin recently, it could be the reason for the crash. Learn how to troubleshoot InDesign third-party plugins.

If you double-click an InDesign file to open the application and there is a crash, the issue could be with the InDesign file. Try to open the application separately to rule out the issue with the file. Learn how to troubleshoot damaged InDesign files.