The material __NSLayoutTreeLineFragmentRectForGlyphAtIndex invalid glyph index(as far as I know) does not cause a malfunction.
But, apparently, the main reason for both the failure and the incorrect glyph. Such errors appear in places like custom subclasses NSTextStorage -processEditingwhen you make changes to text storage, when the layout is executed, and / or vice versa.
TextKit
, . :
- TextKit (!) ,
UITextField, . . - , .
NSTextStorageDelegate . - , . ( , , :))
; , , :
NSGlyphGenerator, . . , .NSTypesetter, , .NSLayoutManager, . - .NSTextStorage . , .
, , , , .
, , :)