6 Replies
      Latest reply on Aug 5, 2019 3:24 AM by alexshecha
      alexshecha Level 1 Level 1 (0 points)

        Hello. I have strange crash after the method rangeOfComposedCharacterSequenceAtIndex. This crash is not in my code and seems is the result to som events in the textview. Also this crash appears only in ios12. I can not reproduce this crash in my devices. May be someone knows something about this case.

        • Re: rangeOfComposedCharacterSequenceAtIndex crash ios12
          Claude31 Level 8 Level 8 (7,295 points)

          Could you show the code as well as the crash report ?

            • Re: rangeOfComposedCharacterSequenceAtIndex crash ios12
              alexshecha Level 1 Level 1 (0 points)

              Fatal Exception: NSInvalidArgumentException

              0  CoreFoundation                 0x22e349ea4 __exceptionPreprocess

              1  libobjc.A.dylib                0x22d519a50 objc_exception_throw

              2  CoreFoundation                 0x22e250484 -[NSCache init]

              3  Foundation                     0x22ed27bb8 -[NSString rangeOfComposedCharacterSequenceAtIndex:]

              4  TextInput                      0x23642591c +[TIDocumentState _string:byTrimmingWordsBeforeIndex:]

              5  TextInput                      0x236425f5c +[TIDocumentState _selectedTextByDeletingInteriorSentences:]

              6  TextInput                      0x236424944 -[TIDocumentState initWithContextBefore:markedText:selectedText:contextAfter:selectedRangeInMarkedText:]

              7  UIKitCore                      0x25b1c60c0 -[TIDocumentState(UITextInputAdditions) initWithDocument:contextBoundary:]

              8  UIKitCore                      0x25b1c5488 +[TIDocumentState(UITextInputAdditions) documentStateOfDocument:]

              9  UIKitCore                      0x25b319d48 -[UIKeyboardImpl syncDocumentStateToInputDelegateWithExecutionContext:]

              10 UIKitCore                      0x25b31a4fc -[UIKeyboardImpl updateForChangedSelectionWithExecutionContext:]

              11 UIKitCore                      0x25b35a29c -[UIKeyboardTaskEntry execute:]

              12 UIKitCore                      0x25b3589ac -[UIKeyboardTaskQueue continueExecutionOnMainThread]

              13 UIKitCore                      0x25b3590bc -[UIKeyboardTaskQueue addAndReturnTask:]

              14 UIKitCore                      0x25b35960c -[UIKeyboardTaskQueue performSingleTask:]

              15 UIKitCore                      0x25b31a2d4 -[UIKeyboardImpl updateForChangedSelection]

              16 UIKitCore                      0x25b31aa60 -[UIKeyboardImpl selectionDidChange:]

              17 UIKitCore                      0x25b7f8644 -[UITextInputController endSelectionChange]

              18 UIKitCore                      0x25b815f48 -[UITextView endSelectionChange]

              19 UIKitCore                      0x25b798690 -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) rangeSelectionEnded:]

              20 UIKitCore                      0x25b79c6a8 -[UITextRangeView touchesEnded:withEvent:]

              21 UIKitCore                      0x25b51fa6c -[UIWindow _sendTouchesForEvent:]

              22 UIKitCore                      0x25b520cd0 -[UIWindow sendEvent:]

              23 UIKitCore                      0x25b4fffcc -[UIApplication sendEvent:]

              24 UIKitCore                      0x25b5cee38 __dispatchPreprocessedEventFromEventQueue

              25 UIKitCore                      0x25b5d1830 __handleEventQueueInternal

              26 UIKitCore                      0x25b5ca320 __handleHIDEventFetcherDrain

              27 CoreFoundation                 0x22e2da0e0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__

              28 CoreFoundation                 0x22e2da060 __CFRunLoopDoSource0

              29 CoreFoundation                 0x22e2d9944 __CFRunLoopDoSources0

              30 CoreFoundation                 0x22e2d4810 __CFRunLoopRun

              31 CoreFoundation                 0x22e2d40e0 CFRunLoopRunSpecific

              32 GraphicsServices               0x23054d584 GSEventRunModal

              33 UIKitCore                      0x25b4e4c00 UIApplicationMain

              34 Voicenotebook                  0x1009172bc main (HelpViewController.swift:15)

              35 libdyld.dylib                  0x22dd92bb4 start

               

              This is from crashanalytics, [NSCache init] - will not appear in apple crash log, so I think we can ommit it

              • Re: rangeOfComposedCharacterSequenceAtIndex crash ios12
                g.ulyanov Level 1 Level 1 (0 points)

                well, actually I have the same crash. and I can reproduce it. it's simple - I have some text in unicode that causes this crash each time.