I've this random crash in live app. I know how to fix it. I want to know how to find out offending code as the crashlytics log doesn't show any code in my app. Is this crashlytics crash?
Since it's random crash I can't debug it.
Any pointer to find out offending code will be appreciated.
Fatal Exception: NSInternalInconsistencyException
Modifications to the layout engine must not be performed from a background thread after it has been accessed from the main thread.
Fatal Exception: NSInternalInconsistencyException
0 CoreFoundation 0x196676a48 __exceptionPreprocess
1 libobjc.A.dylib 0x19639dfa4 objc_exception_throw
2 Foundation 0x196b4cf08 -[NSISEngine tryToOptimizeReturningMutuallyExclusiveConstraints]
3 Foundation 0x196957d34 -[NSISEngine _optimizeWithoutRebuilding]
4 Foundation 0x196957c4c -[NSISEngine optimize]
5 Foundation 0x1969578c0 -[NSISEngine performPendingChangeNotifications]
6 UIKitCore 0x19ab6c9e0 -[UIView(Hierarchy) layoutSubviews]
7 UIKitCore 0x19ab7f3d0 -[UIView(CALayerDelegate) layoutSublayersOfLayer:]
8 QuartzCore 0x19d0e27dc -[CALayer layoutSublayers]
9 QuartzCore 0x19d0e8958 CA::Layer::layout_if_needed(CA::Transaction*)
10 QuartzCore 0x19d0f3578 CA::Layer::layout_and_display_if_needed(CA::Transaction*)
11 QuartzCore 0x19d03bf1c CA::Context::commit_transaction(CA::Transaction*, double)
12 QuartzCore 0x19d065c08 CA::Transaction::commit()
13 QuartzCore 0x19d066b8c CA::Transaction::release_thread(void*)
14 libsystem_pthread.dylib 0x196394fb0 _pthread_tsd_cleanup
15 libsystem_pthread.dylib 0x196391de8 _pthread_exit
16 libsystem_pthread.dylib 0x196392e7c _pthread_wqthread_legacy_worker_wrap
17 libsystem_pthread.dylib 0x196392c18 _pthread_wqthread
18 libsystem_pthread.dylib 0x196395760 start_wqthread
Crashed: com.twitter.crashlytics.ios.exception
EXC_BREAKPOINT 0x00000001962dd8e0
Crashed: com.twitter.crashlytics.ios.exception
0 myApp 0x10101f028 CLSProcessRecordAllThreads + 376 (CLSProcess.c:376)
1 myApp 0x10101f410 CLSProcessRecordAllThreads + 407 (CLSProcess.c:407)
2 myApp 0x10100f114 CLSHandler + 26 (CLSHandler.m:26)
3 myApp 0x10101d63c __CLSExceptionRecord_block_invoke + 198 (CLSException.mm:198)
4 libdispatch.dylib 0x196343184 _dispatch_client_callout + 16
5 libdispatch.dylib 0x1962f5c04 _dispatch_lane_barrier_sync_invoke_and_complete + 56
6 myApp 0x10101d0e4 CLSExceptionRecord + 205 (CLSException.mm:205)
7 myApp 0x10101cf18 CLSExceptionRecordNSException + 102 (CLSException.mm:102)
8 myApp 0x10101cb3c CLSTerminateHandler() + 258 (CLSException.mm:258)
9 libc++abi.dylib 0x196443304 std::__terminate(void (*)()) + 16
10 libc++abi.dylib 0x196442c58 __cxa_get_exception_ptr + 30
11 libc++abi.dylib 0x196442c18 __cxxabiv1::exception_cleanup_func(_Unwind_Reason_Code, _Unwind_Exception*) + 122
12 libobjc.A.dylib 0x19639e0d0 _objc_exception_destructor(void*) + 354
13 Foundation 0x196b4cf08 -[NSISEngine tryToOptimizeReturningMutuallyExclusiveConstraints] + 318
14 Foundation 0x196957d34 -[NSISEngine _optimizeWithoutRebuilding] + 68
15 Foundation 0x196957c4c -[NSISEngine optimize] + 112
16 Foundation 0x1969578c0 -[NSISEngine performPendingChangeNotifications] + 112
17 UIKitCore 0x19ab6c9e0 -[UIView(Hierarchy) layoutSubviews] + 308
18 UIKitCore 0x19ab7f3d0 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2140
19 QuartzCore 0x19d0e27dc -[CALayer layoutSublayers] + 284
20 QuartzCore 0x19d0e8958 CA::Layer::layout_if_needed(CA::Transaction*) + 480
21 QuartzCore 0x19d0f3578 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 136
22 QuartzCore 0x19d03bf1c CA::Context::commit_transaction(CA::Transaction*, double) + 304
23 QuartzCore 0x19d065c08 CA::Transaction::commit() + 676
24 QuartzCore 0x19d066b8c CA::Transaction::release_thread(void*) + 228
25 libsystem_pthread.dylib 0x196394fb0 _pthread_tsd_cleanup + 580
26 libsystem_pthread.dylib 0x196391de8 _pthread_exit + 80
27 libsystem_pthread.dylib 0x196392e7c _pthread_wqthread_legacy_worker_wrap + 94
28 libsystem_pthread.dylib 0x196392c18 _pthread_wqthread + 420
29 libsystem_pthread.dylib 0x196395760 start_wqthread + 8
I've seen a similar stacktrace on crashes that come from Ads SDKs. Do you have and ads in your app? or WKWebviews? If yes, try to disable them and check if the crash still happens.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With