Does anyone know what this crash is? I looked it up online and some results seemed to be similar but not the exact same. Here are the traces in Crashlytics:
Fatal Exception: NSInvalidArgumentException -[__NSCFString substringWithRange:]: Range {19, 9223372036854775788} out of bounds; string length 0
Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x1b3d19344 __exceptionPreprocess
1 libobjc.A.dylib 0x1b3a2ecc0 objc_exception_throw
2 CoreFoundation 0x1b3d72550 -[__NSCFString characterAtIndex:].cold.1
3 CoreFoundation 0x1b3d72650 -[__NSCFString hasPrefix:].cold.1
4 CoreFoundation 0x1b3bf7c0c -[_CFXNotificationNameRegistration find:observer:matching:]
5 UIKitCore 0x1b7cfece8 -[UIResponder(UITextInput_Internal) _rangeOfText:endingAtPosition:]
6 UIKitCore 0x1b7c68ab0 -[UIKeyboardImpl applyAutocorrection:]
7 UIKitCore 0x1b7c5c9c0 -[UIKeyboardImpl acceptAutocorrection:executionContextPassingTIKeyboardCandidate:]
8 UIKitCore 0x1b7c5bd58 -[UIKeyboardImpl acceptAutocorrectionForWordTerminator:executionContextPassingTIKeyboardCandidate:]
9 UIKitCore 0x1b7c5bc10 __56-[UIKeyboardImpl acceptAutocorrectionForWordTerminator:]_block_invoke
10 UIKitCore 0x1b7c84188 -[UIKeyboardTaskEntry execute:]
11 UIKitCore 0x1b7c82af0 -[UIKeyboardTaskQueue continueExecutionOnMainThread]
12 UIKitCore 0x1b7c8317c -[UIKeyboardTaskQueue addAndReturnTask:]
13 UIKitCore 0x1b7c8366c -[UIKeyboardTaskQueue performSingleTask:]
14 UIKitCore 0x1b7c5bb1c -[UIKeyboardImpl acceptAutocorrectionForWordTerminator:]
15 UIKitCore 0x1b7c5eddc -[UIKeyboardImpl acceptAutocorrection]
16 UIKitCore 0x1b7c43bf0 -[UIKeyboardImpl setDelegate:force:]
17 UIKitCore 0x1b791bfa0 -[UIInputResponderController _reloadInputViewsForKeyWindowSceneResponder:]
18 UIKitCore 0x1b791b7b8 -[UIInputResponderController _reloadInputViewsForResponder:]
19 UIKitCore 0x1b7e7037c -[UIResponder _finishResignFirstResponder]
20 UIKitCore 0x1b7e70470 -[UIResponder resignFirstResponder]
21 UIKitCore 0x1b82fb058 -[UIView(Hierarchy) _removeFirstResponderFromSubtree]
22 UIKitCore 0x1b82fb564 __UIViewWillBeRemovedFromSuperview
23 UIKitCore 0x1b82fb3ac -[UIView(Hierarchy) removeFromSuperview]
24 Flutter 0x100555898 (Missing)
25 Flutter 0x1005550cc (Missing)
26 Flutter 0x100554e40 (Missing)
27 Flutter 0x100a97e20 (Missing)
28 Flutter 0x1005675bc (Missing)
29 Flutter 0x10083a108 (Missing)
30 Flutter 0x100570af4 (Missing)
31 Flutter 0x1005727b0 (Missing)
32 CoreFoundation 0x1b3c953a8 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__
33 CoreFoundation 0x1b3c950c0 __CFRunLoopDoTimer
34 CoreFoundation 0x1b3c94740 __CFRunLoopDoTimers
35 CoreFoundation 0x1b3c8f538 __CFRunLoopRun
36 CoreFoundation 0x1b3c8ebc8 CFRunLoopRunSpecific
37 GraphicsServices 0x1be0705cc GSEventRunModal
38 UIKitCore 0x1b7e41744 UIApplicationMain
39 Runner 0x1000c9804 main + 6 (AppDelegate.swift:6)
40 libdyld.dylib 0x1b3b0b384 start
and Crashed: com.twitter.crashlytics.ios.exception
SIGABRT ABORT 0x00000001b3b00df0
Crashed: com.twitter.crashlytics.ios.exception
0 Runner 0x1000e2fec CLSProcessRecordAllThreads + 4303040492
1 Runner 0x1000e33d4 CLSProcessRecordAllThreads + 4303041492
2 Runner 0x1000d2c4c CLSHandler + 4302974028
3 Runner 0x1000e15f0 __CLSExceptionRecord_block_invoke + 4303033840
4 libdispatch.dylib 0x1b39bb5ac _dispatch_client_callout + 20
5 libdispatch.dylib 0x1b39c8360 _dispatch_lane_barrier_sync_invoke_and_complete + 60
6 Runner 0x1000e105c CLSExceptionRecord + 4303032412
7 Runner 0x1000e0e88 CLSExceptionRecordNSException + 4303031944
8 Runner 0x1000e0a7c CLSTerminateHandler() + 4303030908
9 libc++abi.dylib 0x1b3ad340c std::__terminate(void (*)()) + 20
10 libc++abi.dylib 0x1b3ad6160 __cxa_rethrow + 148
11 libobjc.A.dylib 0x1b3a2ee84 objc_exception_rethrow + 44
12 CoreFoundation 0x1b3c8ec38 CFRunLoopRunSpecific + 592
13 GraphicsServices 0x1be0705cc GSEventRunModal + 164
14 UIKitCore 0x1b7e41744 UIApplicationMain + 1936
15 Runner 0x1000c9804 main + 6 (AppDelegate.swift:6)
16 libdyld.dylib 0x1b3b0b384 start + 4
It seems to be something to do with an EditText (this crash happens on my login screen), but I can't figure out what. Only 1 device is affected - an XS Max on 13.6.1. No other XS Max devices or other devices on 13.6.1 are affected, just this one, maybe its due to a device configuration or something? Any ideas would be helpful.
On a side note, is there a way to get more readable logs from Crashlytics? Like maybe get the exact error Flutter would throw on a Debug app? I have no experience with Swift so the logs from iOS make no sense to me. Thanks!
Related
This crash maybe cased by copy and paste. Only iOS 15 has this problem.
CrashDoctor Diagnosis: Application threw exception NSInternalInconsistencyException: Invalid parameter not satisfying: pos
Thread 0 Crashed:
0 CoreFoundation 0x00000001814a50fc __exceptionPreprocess
1 libobjc.A.dylib 0x0000000199ce0d64 objc_exception_throw
2 Foundation 0x0000000182d5f3ac _userInfoForFileAndLine
3 UIKitCore 0x0000000184a4da50 -[_UITextKitTextPosition compare:]
4 UIKitCore 0x00000001838d4d68 -[UITextInputController comparePosition:toPosition:]
5 UIKitCore 0x0000000184a59328 -[UITextView comparePosition:toPosition:]
6 UIKitCore 0x0000000184a21658 -[UITextPasteController _clampRange:]
7 UIKitCore 0x0000000184a21e4c __87-[UITextPasteController _performPasteOfAttributedString:toRange:forSession:completion:]_block_invoke
8 UIKitCore 0x0000000184a22064 __87-[UITextPasteController _performPasteOfAttributedString:toRange:forSession:completion:]_block_invoke.177
9 UIKitCore 0x0000000184a49b9c -[UITextInputController _pasteAttributedString:toRange:completion:]
10 UIKitCore 0x0000000184a21d94 -[UITextPasteController _performPasteOfAttributedString:toRange:forSession:completion:]
11 UIKitCore 0x0000000184a21030 __49-[UITextPasteController _executePasteForSession:]_block_invoke
12 libdispatch.dylib 0x0000000181115924 _dispatch_call_block_and_release
13 libdispatch.dylib 0x0000000181117670 _dispatch_client_callout
14 libdispatch.dylib 0x0000000181125b70 _dispatch_main_queue_callback_4CF
15 CoreFoundation 0x000000018145dd84 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
16 CoreFoundation 0x0000000181417f5c __CFRunLoopRun
17 CoreFoundation 0x000000018142b468 CFRunLoopRunSpecific
18 GraphicsServices 0x000000019cfb738c GSEventRunModal
19 UIKitCore 0x0000000183dcd088 -[UIApplication _run]
20 UIKitCore 0x0000000183b4b958 UIApplicationMain
21 GalaxyX 0x0000000102f2d67c main + [main.m : 19]
In my app, I have a TestFlight beta. It loads fine, and all the buttons and actions work, except for clicking on one section of the TableView, when I click that, it crashes every time. But, only in TestFlight beta installs. On Xcode Simulator it runs fine, if debugging on my phone by plugging into computer and running, it works fine. When I open the crash log in Xcode, I get the image below, but it doesn't really tell me anything. Here is the crash log:
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x195260164 __exceptionPreprocess + 228 (NSException.m:199)
1 libobjc.A.dylib 0x194f74c1c objc_exception_throw + 60 (objc-exception.mm:565)
2 CoreFoundation 0x19514fbb8 +[NSException raise:format:] + 112 (NSException.m:155)
3 UIKitCore 0x198cf0d14 -[UISearchDisplayController initWithCoder:] + 88 (UISearchDisplayController.m:350)
4 UIFoundation 0x1988c793c UINibDecoderDecodeObjectForValue + 728 (UINibDecoder.m:717)
5 UIFoundation 0x198862d50 -[UINibDecoder decodeObjectForKey:] + 312 (UINibDecoder.m:811)
6 UIKitCore 0x199029668 -[UIRuntimeConnection initWithCoder:] + 132 (UIRuntimeConnection.m:22)
7 UIFoundation 0x1988c793c UINibDecoderDecodeObjectForValue + 728 (UINibDecoder.m:717)
8 UIFoundation 0x1988c7b5c UINibDecoderDecodeObjectForValue + 1272 (UINibDecoder.m:611)
9 UIFoundation 0x198862d50 -[UINibDecoder decodeObjectForKey:] + 312 (UINibDecoder.m:811)
10 UIKitCore 0x199024638 -[NSCoder(UIIBDependencyInjectionInternal) _decodeObjectsWithSourceSegueTemplate:creator:sender:f... + 492 (UIClassSwapper.m:57)
11 UIKitCore 0x199027200 -[UINib instantiateWithOwner:options:] + 1068 (UINib.m:347)
12 UIKitCore 0x198d3dea4 -[UIViewController _loadViewFromNibNamed:bundle:] + 368 (UIViewController.m:3105)
13 UIKitCore 0x198d3e954 -[UIViewController loadView] + 180 (UIViewController.m:3247)
14 UIKitCore 0x198d3ec24 -[UIViewController loadViewIfRequired] + 188 (UIViewController.m:3346)
15 UIKitCore 0x198d3f30c -[UIViewController view] + 32 (UIViewController.m:3404)
16 UIKitCore 0x198c9afa4 -[UINavigationController _startCustomTransition:] + 1148 (UINavigationController.m:1893)
17 UIKitCore 0x198caf478 -[UINavigationController _startDeferredTransitionIfNeeded:] + 692 (UINavigationController.m:6719)
18 UIKitCore 0x198cb0818 -[UINavigationController __viewWillLayoutSubviews] + 176 (UINavigationController.m:6988)
19 UIKitCore 0x198c934fc -[UILayoutContainerView layoutSubviews] + 228 (UILayoutContainerView.m:86)
20 UIKitCore 0x1998766a0 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2168 (UIView.m:17176)
21 QuartzCore 0x19bec94a0 -[CALayer layoutSublayers] + 292 (CALayer.mm:9644)
22 QuartzCore 0x19bec98e0 CA::Layer::layout_if_needed(CA::Transaction*) + 472 (CALayer.mm:9518)
23 QuartzCore 0x19bedbdc4 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 144 (CALayer.mm:2468)
24 QuartzCore 0x19be20884 CA::Context::commit_transaction(CA::Transaction*, double) + 304 (CAContextInternal.mm:1992)
25 QuartzCore 0x19be4b3d0 CA::Transaction::commit() + 656 (CATransactionInternal.mm:438)
26 UIKitCore 0x1993d48cc _afterCACommitHandler + 144 (UIApplication.m:3120)
27 CoreFoundation 0x1951dac54 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 36 (CFRunLoop.c:1758)
28 CoreFoundation 0x1951d58e4 __CFRunLoopDoObservers + 420 (CFRunLoop.c:1868)
29 CoreFoundation 0x1951d5d84 __CFRunLoopRun + 1020 (CFRunLoop.c:2910)
30 CoreFoundation 0x1951d5660 CFRunLoopRunSpecific + 480 (CFRunLoop.c:3192)
31 GraphicsServices 0x19f5e6604 GSEventRunModal + 164 (GSEvent.c:2246)
32 UIKitCore 0x1993aa15c UIApplicationMain + 1944 (UIApplication.m:4820)
33 Ministry League 0x104093b48 main + 76 (main.m:16)
34 libdyld.dylib 0x1950511ec start + 4
Thread 0 name:
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x0000000195046df0 __pthread_kill + 8
1 libsystem_pthread.dylib 0x0000000194f66930 pthread_kill + 228 (pthread.c:1458)
2 libsystem_c.dylib 0x0000000194ef48b4 abort + 104 (abort.c:110)
3 libc++abi.dylib 0x0000000195019f40 abort_message + 132 (abort_message.cpp:76)
4 libc++abi.dylib 0x000000019500b8c8 demangling_terminate_handler() + 308 (cxa_default_handlers.cpp:65)
5 libobjc.A.dylib 0x0000000194f74f0c _objc_terminate() + 132 (objc-exception.mm:701)
6 libc++abi.dylib 0x00000001950193cc std::__terminate(void (*)()) + 20 (cxa_handlers.cpp:59)
7 libc++abi.dylib 0x000000019501c154 __cxa_rethrow + 148 (cxa_exception.cpp:617)
8 libobjc.A.dylib 0x0000000194f74de8 objc_exception_rethrow + 44 (objc-exception.mm:604)
9 CoreFoundation 0x00000001951d56d0 CFRunLoopRunSpecific + 592 (CFRunLoop.c:3206)
10 GraphicsServices 0x000000019f5e6604 GSEventRunModal + 164 (GSEvent.c:2246)
11 UIKitCore 0x00000001993aa15c UIApplicationMain + 1944 (UIApplication.m:4820)
12 Ministry League 0x0000000104093b48 main + 76 (main.m:16)
13 libdyld.dylib 0x00000001950511ec start + 4
What this crash log tells me is that the app is loading a NIB that includes a UISearchDisplayController when it throws an exception. UISearchDisplayController is deprecated, and should be replaced with a UISearchController. The first thing I'd try is making that replacement.
This crash is happening only on iOS 13.3.1 & 13.4.0
This crash is happening randomly and is a real deterrent to my customers.
I have update fabric library to lastest version (1.10.2).
Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x1947be090 objc_msgSend + 16
1 Foundation 0x194e564f0 probeGC + 120
2 Foundation 0x194d6cd64 -[NSConcreteMapTable rehashAround:] + 204
3 Foundation 0x194d6cc68 -[NSConcreteMapTable removeObjectForKey:] + 248
4 UIKitCore 0x198fbd484 _UIAnalyticsGatherMultitouchAnalytics + 632
5 UIKitCore 0x198b38a10 -[UIApplication sendEvent:] + 204
6 UIKitCore 0x198bb0c20 __dispatchPreprocessedEventFromEventQueue + 5880
7 UIKitCore 0x198bb317c __handleEventQueueInternal + 4924
8 UIKitCore 0x198babff0 __handleHIDEventFetcherDrain + 108
9 CoreFoundation 0x194a18a00 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
10 CoreFoundation 0x194a18958 __CFRunLoopDoSource0 + 80
11 CoreFoundation 0x194a180f0 __CFRunLoopDoSources0 + 180
12 CoreFoundation 0x194a1323c __CFRunLoopRun + 1080
13 CoreFoundation 0x194a12adc CFRunLoopRunSpecific + 464
14 GraphicsServices 0x19e9b3328 GSEventRunModal + 104
15 UIKitCore 0x198b2063c UIApplicationMain + 1936
16 xxxxxxxxxxxxxxx 0x1029863dc main + 17 (main.m:17)
17 libdyld.dylib 0x19489c360 start + 4
probably you can get some information here:
https://forums.developer.apple.com/thread/130095
My app relatively often crashes with SIGSEGV. Unfortunately, I can not reproduce the crash and only see crash reports in Hockeyapp. I tried turning zombies on, too.
Looking at the crash report it seems that app crashes when processing touches (when user scrolling or something like this). No my app code mentioned in the stack trace.
The question is: how is it possible to have memory issue in this scenario? What would you recommend to reproduce and fix the issue?
Exception Type: SIGSEGV
Exception Codes: SEGV_ACCERR at 0x71a86113
Crashed Thread: 0
Application Specific Information:
objc_msgSend() selector name: convertPoint:fromLayer:
Thread 0 Crashed:
0 libobjc.A.dylib 0x2106fae6 objc_msgSend_stret + 6
1 UIKit 0x25e7a349 -[UIView(Geometry) convertPoint:fromView:] + 98
2 UIKit 0x25e7e987 __38-[UIView(Geometry) hitTest:withEvent:]_block_invoke + 104
3 CoreFoundation 0x217e8279 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke + 86
4 CoreFoundation 0x217e81a7 -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 248
5 UIKit 0x25e7e447 -[UIView(Geometry) hitTest:withEvent:] + 492
6 UIKit 0x26146f0d -[UIView(Geometry) _hitTest:withEvent:windowServerHitTestWindow:] + 62
7 UIKit 0x25e7e9bd __38-[UIView(Geometry) hitTest:withEvent:]_block_invoke + 158
8 CoreFoundation 0x217e8279 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke + 86
9 CoreFoundation 0x217e81a7 -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 248
10 UIKit 0x25e7e447 -[UIView(Geometry) hitTest:withEvent:] + 492
11 UIKit 0x26146f0d -[UIView(Geometry) _hitTest:withEvent:windowServerHitTestWindow:] + 62
12 UIKit 0x26136491 __70+[UIWindow _hitTestToPoint:forEvent:windowServerHitTestWindow:screen:]_block_invoke + 186
13 UIKit 0x25e4783f +[UIWindow _topVisibleWindowPassingTest:] + 156
14 UIKit 0x26136399 +[UIWindow _hitTestToPoint:forEvent:windowServerHitTestWindow:screen:] + 142
15 UIKit 0x26136629 -[UIWindow _targetWindowForPathIndex:atPoint:forEvent:windowServerHitTestWindow:onScreen:] + 158
16 UIKit 0x260ffb61 _UIApplicationHandleDigitizerEvent + 10982
17 UIKit 0x25e4123f _UIApplicationHandleEventQueue + 3836
18 CoreFoundation 0x21889dff __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 12
19 CoreFoundation 0x218899ed __CFRunLoopDoSources0 + 450
20 CoreFoundation 0x21887d5b __CFRunLoopRun + 792
21 CoreFoundation 0x217d7229 CFRunLoopRunSpecific + 518
22 CoreFoundation 0x217d7015 CFRunLoopRunInMode + 106
23 GraphicsServices 0x22dc7ac9 GSEventRunModal + 158
24 UIKit 0x25eab189 UIApplicationMain + 142
25 My App. 0x0005376b main (main.m:14)
26 ??? 0x2147f873 0x0 + 0
My app is experiencing a weird error which I cannot reproduce. I know the existence of this error because some users have reported it to me and I could catch it using the Fabric SDK.
Apparently it happens at any location, at any given time. It doesn't not happen a lot though, it seems to happen once in a while. I have no idea where to start looking for this, because I tried to catch the error running on multiple devices connected to my xcode project, but it just doesn't happen to me, or at least when I am looking for it. Can someone give me a light where to begin to look for it?
The stack trace:
Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x18730afe0 __exceptionPreprocess
1 libobjc.A.dylib 0x185d6c538 objc_exception_throw
2 CoreFoundation 0x187311ef4 __methodDescriptionForSelector
3 CoreFoundation 0x18730ef54 ___forwarding___
4 CoreFoundation 0x18720ad4c _CF_forwarding_prep_0
5 Foundation 0x187dff50c __NSThreadPerformPerform
6 CoreFoundation 0x1872b942c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
7 CoreFoundation 0x1872b8d04 __CFRunLoopDoSources0
8 CoreFoundation 0x1872b69a8 __CFRunLoopRun
9 CoreFoundation 0x1871e6da4 CFRunLoopRunSpecific
10 GraphicsServices 0x188c51074 GSEventRunModal
11 UIKit 0x18d49ac9c UIApplicationMain
12 Otelo 0x100230fc4 main (AppDelegate.swift:23)
13 libdyld.dylib 0x1861f559c start
Crashed: com.twitter.crashlytics.ios.exception
0 Otelo 0x1005bb308 CLSProcessRecordAllThreads + 1572
1 Otelo 0x1005bb308 CLSProcessRecordAllThreads + 1572
2 Otelo 0x1005bb1c4 CLSProcessRecordAllThreads + 1248
3 Otelo 0x1005aaa6c CLSHandler + 48
4 Otelo 0x1005b9110 __CLSExceptionRecord_block_invoke + 92
5 libdispatch.dylib 0x1861c29a0 _dispatch_client_callout + 16
6 libdispatch.dylib 0x1861cfee0 _dispatch_barrier_sync_f_invoke + 84
7 Otelo 0x1005b8ba4 CLSExceptionRecord + 212
8 Otelo 0x1005b89cc CLSExceptionRecordNSException + 548
9 Otelo 0x1005b85e0 CLSTerminateHandler() + 396
10 libc++abi.dylib 0x185d5b5d4 std::__terminate(void (*)()) + 16
11 libc++abi.dylib 0x185d5b1a8 __cxa_rethrow + 144
12 libobjc.A.dylib 0x185d6c6f8 objc_exception_rethrow + 44
13 CoreFoundation 0x1871e6e10 CFRunLoopRunSpecific + 532
14 GraphicsServices 0x188c51074 GSEventRunModal + 100
15 UIKit 0x18d49ac9c UIApplicationMain + 208
16 Otelo 0x100230fc4 main (AppDelegate.swift:23)
17 libdyld.dylib 0x1861f559c start + 4