I knew EXC_BAD_ACCESS & Zombie, and how to find it in normal way. But what I face now is very very confusing, at least to me.
Background
I have a multi-account app, in which the user can login many accounts at the same time.
The app works well with only one account on, but when the user really logins more and more accounts, the app becomes more and more vulnerable as well, crashing randomly but mostly on AppLaunch. Not 8badf00d, but EXC_BAD_ACCESS (SIGSEGV) / KERN_INVALID_ADDRESS.
Code Architecture
Objective-C - Application level, including UI.
|
Objective-C & C++ - Account Context, including login logic.
|
C++ - Net/Communication level, including sockets.
Notification & Delegation are both used between levels.
Reproduce
Double-tap the Home button, swipe the app out to kill it, then tap the app icon to relaunch it. After passing TouchId, the app will login the accounts, and randomly crash, resulting in many different crash logs. No matter the device is iPhone 6s plus or iPhone 5s/5c/5, iOS 8 or iOS 9.
The memory usage is not high, just several tens of MB.
Crash Log No.1
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000100000048
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x0000000180b8dbd0 objc_msgSend + 16
1 CoreFoundation 0x00000001814c7fe0 -[_CFXNotificationObjectRegistration match:matching:] + 152
2 CoreFoundation 0x0000000181573704 -[_CFXNotificationNameRegistration match:observer:matching:] + 372
3 CoreFoundation 0x0000000181518778 -[_CFXNotificationRegistrar match:object:observer:enumerator:] + 1968
4 CoreFoundation 0x0000000181415894 _CFXNotificationRemoveObservers + 164
5 Foundation 0x0000000181de3510 -[NSNotificationCenter removeObserver:name:object:] + 236
6 Foundation 0x0000000181df036c -[__NSObserver dealloc] + 48
7 UIKit 0x000000018639d12c -[_UIBackdropView dealloc] + 280
8 libobjc.A.dylib 0x0000000180b95ae8 (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 508
9 CoreFoundation 0x00000001813f142c _CFAutoreleasePoolPop + 28
10 UIKit 0x00000001864bdf94 _prepareForCAFlush + 352
11 UIKit 0x00000001861fe8f4 _UIApplicationHandleEventQueue + 5880
12 CoreFoundation 0x00000001814c4efc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
13 CoreFoundation 0x00000001814c4910 __CFRunLoopDoSources0 + 412
14 CoreFoundation 0x00000001814c2690 __CFRunLoopRun + 724
15 CoreFoundation 0x00000001813f1680 CFRunLoopRunSpecific + 384
16 GraphicsServices 0x0000000182900088 GSEventRunModal + 180
17 UIKit 0x0000000186268d90 UIApplicationMain + 204
18 MultiAccountApp 0x0000000100095254 main (main.m:19)
19 libdyld.dylib 0x0000000180f928b8 start + 4
Thread 1:
0 libsystem_pthread.dylib 0x000000018117501c start_wqthread + 0
Thread 2 name: Dispatch queue: com.apple.libdispatch-manager
Thread 2:
0 libsystem_kernel.dylib 0x00000001810b14fc kevent_qos + 8
1 libdispatch.dylib 0x0000000180f7494c _dispatch_mgr_invoke + 232
2 libdispatch.dylib 0x0000000180f637bc _dispatch_source_invoke + 0
Crash Log No.2
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x0000000180b7e5f4 _class_getNonMetaClass + 212
1 libobjc.A.dylib 0x0000000180b7e5f0 _class_getNonMetaClass + 208
2 libobjc.A.dylib 0x0000000180b7accc _class_resolveMethod + 112
3 libobjc.A.dylib 0x0000000180b839a8 lookUpImpOrForward + 360
4 libobjc.A.dylib 0x0000000180b837b4 class_getInstanceMethod + 64
5 Foundation 0x0000000181e1530c +[NSObject(NSKeyValueObservingCustomization) keyPathsForValuesAffectingValueForKey:] + 236
6 Foundation 0x0000000181e14ff8 -[NSKeyValueUnnestedProperty _givenPropertiesBeingInitialized:getAffectingProperties:] + 184
7 Foundation 0x0000000181e14d14 -[NSKeyValueUnnestedProperty _initWithContainerClass:key:propertiesBeingInitialized:] + 152
8 Foundation 0x0000000181e14bec NSKeyValuePropertyForIsaAndKeyPathInner + 284
9 Foundation 0x0000000181e11508 NSKeyValuePropertyForIsaAndKeyPath + 152
10 Foundation 0x0000000181e27ddc _NSKeyValueCreateImplicitObservationInfo + 248
11 CoreData 0x0000000182fa1764 -[NSManagedObjectContext(_NSInternalNotificationHandling) _implicitObservationInfoForEntity:forResultingClass:] + 300
12 CoreData 0x0000000182fa162c -[NSManagedObject(_NSInternalMethods) _implicitObservationInfo] + 96
13 Foundation 0x0000000181de2840 -[NSObject(NSKeyValueObserverNotification) willChangeValueForKey:] + 160
14 CoreData 0x0000000183002c2c -[NSManagedObject(_NSInternalMethods) _updateFromRefreshSnapshot:includingTransients:] + 628
15 CoreData 0x0000000183015b54 -[NSManagedObjectContext(_NestedContextSupport) _copyChildObject:toParentObject:fromChildContext:] + 924
16 CoreData 0x0000000183015f70 -[NSManagedObjectContext(_NestedContextSupport) _parentProcessSaveRequest:inContext:error:] + 996
17 CoreData 0x0000000183016a44 __82-[NSManagedObjectContext(_NestedContextSupport) executeRequest:withContext:error:]_block_invoke + 348
18 CoreData 0x0000000183018d80 internalBlockToNSManagedObjectContextPerform + 108
19 libdispatch.dylib 0x0000000180f615f0 _dispatch_client_callout + 16
20 libdispatch.dylib 0x0000000180f70c5c _dispatch_barrier_sync_f_slow_invoke + 644
21 libdispatch.dylib 0x0000000180f615f0 _dispatch_client_callout + 16
22 libdispatch.dylib 0x0000000180f66cf8 _dispatch_main_queue_callback_4CF + 1844
23 CoreFoundation 0x00000001814c4bb0 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
24 CoreFoundation 0x00000001814c2a18 __CFRunLoopRun + 1628
25 CoreFoundation 0x00000001813f1680 CFRunLoopRunSpecific + 384
26 GraphicsServices 0x0000000182900088 GSEventRunModal + 180
27 UIKit 0x0000000186268d90 UIApplicationMain + 204
28 MultiAccountApp 0x0000000100085254 main (main.m:19)
29 libdyld.dylib 0x0000000180f928b8 start + 4
Thread 1:
0 libsystem_kernel.dylib 0x00000001810b0b6c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x0000000181175530 _pthread_wqthread + 1284
2 libsystem_pthread.dylib 0x0000000181175020 start_wqthread + 4
Thread 2 name: Dispatch queue: com.apple.libdispatch-manager
Thread 2:
0 libsystem_kernel.dylib 0x00000001810b14fc kevent_qos + 8
1 libdispatch.dylib 0x0000000180f7494c _dispatch_mgr_invoke + 232
2 libdispatch.dylib 0x0000000180f637bc _dispatch_source_invoke + 0
Crash Log No.3
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000100000038
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x0000000180b8dbd0 objc_msgSend + 16
1 QuartzCore 0x0000000183c3bad0 CA::Render::String::new_string(__CFString const*) + 36
2 QuartzCore 0x0000000183c3c46c -[CABackdropLayer _copyRenderLayer:layerFlags:commitFlags:] + 144
3 QuartzCore 0x0000000183c0ac54 CA::Context::commit_layer(CA::Layer*, unsigned int, unsigned int, void*) + 108
4 QuartzCore 0x0000000183c079cc CA::Layer::commit_if_needed(CA::Transaction*, void (*)(CA::Layer*, unsigned int, unsigned int, void*), void*) + 392
5 QuartzCore 0x0000000183c0795c CA::Layer::commit_if_needed(CA::Transaction*, void (*)(CA::Layer*, unsigned int, unsigned int, void*), void*) + 280
6 QuartzCore 0x0000000183c0795c CA::Layer::commit_if_needed(CA::Transaction*, void (*)(CA::Layer*, unsigned int, unsigned int, void*), void*) + 280
7 QuartzCore 0x0000000183c0795c CA::Layer::commit_if_needed(CA::Transaction*, void (*)(CA::Layer*, unsigned int, unsigned int, void*), void*) + 280
8 QuartzCore 0x0000000183c0795c CA::Layer::commit_if_needed(CA::Transaction*, void (*)(CA::Layer*, unsigned int, unsigned int, void*), void*) + 280
9 QuartzCore 0x0000000183c07750 x_hash_table_foreach + 72
10 QuartzCore 0x0000000183c06cc8 CA::Transaction::foreach_root(void (*)(CA::Layer*, void*), void*) + 40
11 QuartzCore 0x0000000183c050f0 CA::Context::commit_transaction(CA::Transaction*) + 1368
12 QuartzCore 0x0000000183c049dc CA::Transaction::commit() + 512
13 UIKit 0x00000001864bde20 __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke_2 + 104
14 CoreFoundation 0x00000001814c4de4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 20
15 CoreFoundation 0x00000001814c471c __CFRunLoopDoBlocks + 308
16 CoreFoundation 0x00000001814c26a4 __CFRunLoopRun + 744
17 CoreFoundation 0x00000001813f1680 CFRunLoopRunSpecific + 384
18 GraphicsServices 0x0000000182900088 GSEventRunModal + 180
19 UIKit 0x0000000186268d90 UIApplicationMain + 204
20 MultiAccountApp 0x000000010009d254 main (main.m:19)
21 libdyld.dylib 0x0000000180f928b8 start + 4
Crash Log No.4
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000100000048
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x0000000180b8dbd0 objc_msgSend + 16
1 CoreFoundation 0x00000001813f93e0 -[__NSArrayM dealloc] + 152
2 libobjc.A.dylib 0x0000000180b95ae8 (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 508
3 CoreFoundation 0x00000001813f142c _CFAutoreleasePoolPop + 28
4 CoreFoundation 0x00000001814c2a20 __CFRunLoopRun + 1636
5 CoreFoundation 0x00000001813f1680 CFRunLoopRunSpecific + 384
6 GraphicsServices 0x0000000182900088 GSEventRunModal + 180
7 UIKit 0x0000000186268d90 UIApplicationMain + 204
8 MultiAccountApp 0x00000001000f5254 main (main.m:19)
9 libdyld.dylib 0x0000000180f928b8 start + 4
Thread 1:
0 libsystem_kernel.dylib 0x00000001810b0b6c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x0000000181175530 _pthread_wqthread + 1284
2 libsystem_pthread.dylib 0x0000000181175020 start_wqthread + 4
Crash Log No.5
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000100000050
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x0000000180b8dbd0 objc_msgSend + 16
1 CoreFoundation 0x00000001814c7fe0 -[_CFXNotificationObjectRegistration match:matching:] + 152
2 CoreFoundation 0x0000000181573704 -[_CFXNotificationNameRegistration match:observer:matching:] + 372
3 CoreFoundation 0x0000000181518778 -[_CFXNotificationRegistrar match:object:observer:enumerator:] + 1968
4 CoreFoundation 0x0000000181415894 _CFXNotificationRemoveObservers + 164
5 Foundation 0x0000000181de3510 -[NSNotificationCenter removeObserver:name:object:] + 236
6 UIKit 0x00000001863a0948 -[UINavigationController dealloc] + 140
7 CoreFoundation 0x00000001813f5380 -[__NSArrayI dealloc] + 80
8 UIKit 0x00000001864b0cb4 _runAfterCACommitDeferredBlocks + 616
9 UIKit 0x00000001864be030 _cleanUpAfterCAFlushAndRunDeferredBlocks + 92
10 CoreFoundation 0x00000001814c4de4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 20
11 CoreFoundation 0x00000001814c471c __CFRunLoopDoBlocks + 308
12 CoreFoundation 0x00000001814c26a4 __CFRunLoopRun + 744
13 CoreFoundation 0x00000001813f1680 CFRunLoopRunSpecific + 384
14 GraphicsServices 0x0000000182900088 GSEventRunModal + 180
15 UIKit 0x0000000186268d90 UIApplicationMain + 204
16 MultiAccountApp 0x0000000100099254 main (main.m:19)
17 libdyld.dylib 0x0000000180f928b8 start + 4
Though I have logs in hand, I still have no idea how to solve it. Maybe the Address Space has been dirty? Forcibly / unintentionally modified by the C++ level?
Thanks in advance.
Related
I am receiving a crash to Firebase Crashlytics:
Crashed: com.apple.main-thread
0 AttributeGraph 0x5004 AG::Graph::UpdateStack::update() + 224
1 AttributeGraph 0x5518 AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 328
2 AttributeGraph 0xa718 AG::Graph::input_value_ref_slow(AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 360
3 AttributeGraph 0x1b3c0 AGGraphGetValue + 228
4 SwiftUI 0xa4fdc specialized DynamicBody.phase.getter + 28
5 SwiftUI 0xaada0 specialized DynamicBody.updateValue() + 56
6 SwiftUI 0x20f9c0 partial apply for specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 40
7 AttributeGraph 0x5108 AG::Graph::UpdateStack::update() + 484
8 AttributeGraph 0x5518 AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 328
9 AttributeGraph 0xa1a8 AG::Graph::value_ref(AG::AttributeID, AGSwiftMetadata const*, bool*) + 152
10 AttributeGraph 0x1b408 AGGraphGetValue + 300
11 SwiftUI 0x439378 ViewGraph.sizeThatFits(_:) + 212
12 SwiftUI 0x439194 ViewGraph.updateIdealSize() + 48
13 SwiftUI 0x438fc0 ViewGraph.updateOutputs(at:) + 108
14 SwiftUI 0x84eef4 closure #1 in ViewRendererHost.render(interval:updateDisplayList:) + 1332
15 SwiftUI 0x84ae68 ViewRendererHost.render(interval:updateDisplayList:) + 292
16 SwiftUI 0x3395a0 closure #1 in _UIHostingView.requestImmediateUpdate() + 68
17 SwiftUI 0x9a2190 thunk for #escaping #callee_guaranteed () -> () + 20
18 libdispatch.dylib 0x602b0 _dispatch_call_block_and_release + 24
19 libdispatch.dylib 0x61298 _dispatch_client_callout + 16
20 libdispatch.dylib 0x43430 _dispatch_main_queue_callback_4CF$VARIANT$armv81 + 872
21 CoreFoundation 0x9a998 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
22 CoreFoundation 0x94df8 __CFRunLoopRun + 2528
23 CoreFoundation 0x93ed0 CFRunLoopRunSpecific + 572
24 GraphicsServices 0x3570 GSEventRunModal + 160
25 UIKitCore 0xb302d0 -[UIApplication _run] + 1052
26 UIKitCore 0xb3584c UIApplicationMain + 164
27 SwiftUI 0x881530 closure #1 in KitRendererCommon(_:) + 108
28 SwiftUI 0x8814c0 runApp<A>(_:) + 176
29 SwiftUI 0x432870 static App.main() + 96
30 ShopmonkeyApp 0xf144 main + 4297568580 (<compiler-generated>:4297568580)
31 libdyld.dylib 0x1140 start + 4
But there is no specific place where it's crashing. Has anybody faced the same crash?
Getting a runtime crash when removing uiviewrepresentable of a collection view using compositional layout and a diffable data source from the screen. The view is currently in an if statement, if no data is found it uses a empty data view instead of showing the collection.
if collectionViewModel.showEmptyDataView{
EmptyDataSetViewWithBuilder(title: collectionViewModel.errorDataTilte, description: collectionViewModel.errorDataDescription, image: Constants.EmptyDataSetImages.errorIcon, addButton: false, cartStyle: Themes.CartViewTheme) {
//ViewBuilder
}
}else{
HomeScreenCollectionView(ShopViewModel: collectionViewModel) { itemClicked in
//handle item clicked
}
}
The quick fix I found was to remove the if statements and use an opacity modifier instead.
EmptyDataSetViewWithBuilder(title: collectionViewModel.errorDataTilte, description: collectionViewModel.errorDataDescription, image: Constants.EmptyDataSetImages.errorIcon, addButton: false, cartStyle: Themes.CartViewTheme) {
//ViewBuilder
}.opacity(collectionViewModel.showEmptyDataView ? 1 : 0).zIndex(collectionViewModel.showEmptyDataView ? 1 : 0)
HomeScreenCollectionView(ShopViewModel: collectionViewModel) { itemClicked in
//handle item clicked
}.opacity(!collectionViewModel.showEmptyDataView ? 1 : 0).zIndex(!collectionViewModel.showEmptyDataView ? 1 : 0)
This only occurs in IOS 15, I am also seeing this log within console [UICollectionViewRecursion] cv == 0x106131c00 Disabling recursion trigger logging i haven't seen this log in previous OS's. Another thing i noticed was this runtime crash occurs more often on the release build configuration. Really like compositional layouts and diffable data source so id to continue to use this throughout ios 15. But would like to make sure that this bug doesn't keep occurring. It crashes the app especially in test flight/ appstore
The crash report is saying its crashing on _AppearanceActionModifier.MergedBox.disappear+ 3049112
Heres full crash report:
Hardware Model: iPhone13,4
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Date/Time: 2021-10-12 17:48:13.6141 -0400
Launch Time: 2021-10-12 17:48:13.2125 -0400
OS Version: iPhone OS 15.0.1 (19A348)
Release Type: User
Baseband Version: 2.09.10
Report Version: 104
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x000000018923f698
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: SIGNAL; [5]
Terminating Process: exc handler [7627]
Terminating Process: exc handler [7627]
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 SwiftUI 0x18923f698 _AppearanceActionModifier.MergedBox.disappear+ 3049112 () + 28
1 SwiftUI 0x1894f9ea4 implicit closure #4 in implicit closure #3 in _AppearanceActionModifier.MergedCallbacks.value.getter + 24
2 SwiftUI 0x189068720 thunk for #escaping #callee_guaranteed () -> + 1120032 () + 28
3 SwiftUI 0x188f8e8fc thunk for #escaping #callee_guaranteed () -> (#out + 227580 ()) + 28
4 SwiftUI 0x189068720 thunk for #escaping #callee_guaranteed () -> + 1120032 () + 28
5 SwiftUI 0x188f6ce68 closure #1 in ViewRendererHost.render+ 89704 (interval:updateDisplayList:) + 2596
6 SwiftUI 0x189033f78 ViewRendererHost.render+ 905080 (interval:updateDisplayList:) + 336
7 SwiftUI 0x188f7fe18 _UIHostingView.layoutSubviews+ 167448 () + 312
8 SwiftUI 0x188f83b24 #objc _UIHostingView.layoutSubviews+ 183076 () + 28
9 UIKitCore 0x183b5ecc8 -[UIView+ 1629384 (CALayerDelegate) layoutSublayersOfLayer:] + 2620
10 QuartzCore 0x1852b8280 CA::Layer::layout_if_needed+ 258688 (CA::Transaction*) + 536
11 QuartzCore 0x1852aaaa8 CA::Layer::layout_and_display_if_needed+ 203432 (CA::Transaction*) + 144
12 QuartzCore 0x1852bf0b0 CA::Context::commit_transaction+ 286896 (CA::Transaction*, double, double*) + 500
13 QuartzCore 0x1852c8174 CA::Transaction::commit+ 323956 () + 680
14 QuartzCore 0x1852aa210 CA::Transaction::flush_as_runloop_observer+ 201232 (bool) + 88
15 UIKitCore 0x183f15c28 _UIApplicationFlushCATransaction + 76
16 UIKitCore 0x1841afad8 _UIUpdateSequenceRun + 84
17 UIKitCore 0x184827294 schedulerStepScheduledMainSection + 144
18 UIKitCore 0x184826760 runloopSourceCallback + 60
19 CoreFoundation 0x1815e2030 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
20 CoreFoundation 0x1815f2cf0 __CFRunLoopDoSource0 + 208
21 CoreFoundation 0x18152cff8 __CFRunLoopDoSources0 + 268
22 CoreFoundation 0x181532804 __CFRunLoopRun + 820
23 CoreFoundation 0x1815463c8 CFRunLoopRunSpecific + 600
24 GraphicsServices 0x19cd5738c GSEventRunModal + 164
25 UIKitCore 0x183eec0bc -[UIApplication _run] + 1100
26 UIKitCore 0x183c69be8 UIApplicationMain + 2124
27 SwiftUI 0x189195d90 closure #1 in KitRendererCommon+ 2354576 (_:) + 164
28 SwiftUI 0x1890c2ebc runApp<A>+ 1490620 (_:) + 252
29 SwiftUI 0x1890a4278 static App.main+ 1364600 () + 128
30 Development 0x102bddb90 main + 23440 (<compiler-generated>:0)
31 dyld 0x1060eda24 start + 520
Thread 1:
0 libsystem_pthread.dylib 0x1f19fcf48 start_wqthread + 0
Thread 2:
0 libsystem_pthread.dylib 0x1f19fcf48 start_wqthread + 0
Thread 3:
0 libsystem_pthread.dylib 0x1f19fcf48 start_wqthread + 0
Thread 4:
0 libsystem_pthread.dylib 0x1f19fcf48 start_wqthread + 0
Thread 5 name: com.apple.uikit.eventfetch-thread
Thread 5:
0 libsystem_kernel.dylib 0x1b800a564 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x1b800abfc mach_msg + 76
2 CoreFoundation 0x18152e698 __CFRunLoopServiceMachPort + 372
3 CoreFoundation 0x18153298c __CFRunLoopRun + 1212
4 CoreFoundation 0x1815463c8 CFRunLoopRunSpecific + 600
5 Foundation 0x182d69d54 -[NSRunLoop+ 101716 (NSRunLoop) runMode:beforeDate:] + 236
6 Foundation 0x182dab6a8 -[NSRunLoop+ 370344 (NSRunLoop) runUntilDate:] + 92
7 UIKitCore 0x183e6507c -[UIEventFetcher threadMain] + 524
8 Foundation 0x182db995c __NSThread__start__ + 792
9 libsystem_pthread.dylib 0x1f19fda60 _pthread_start + 148
10 libsystem_pthread.dylib 0x1f19fcf5c thread_start + 8
Thread 6:
0 libsystem_pthread.dylib 0x1f19fcf48 start_wqthread + 0
Thread 7:
0 libsystem_pthread.dylib 0x1f19fcf48 start_wqthread + 0
Thread 8 name: com.google.firebase.crashlytics.MachExceptionServer
Thread 8:
0 libsystem_kernel.dylib 0x1b800bf78 write + 8
1 Development 0x10333156c FIRCLSSDKFileLog + 7705964 (FIRCLSInternalLogging.c:63)
2 Development 0x10332cbc8 FIRCLSMachExceptionReply + 7687112 (FIRCLSMachException.c:267)
3 Development 0x10332c6cc FIRCLSMachExceptionServer + 7685836 (FIRCLSMachException.c:178)
4 libsystem_pthread.dylib 0x1f19fda60 _pthread_start + 148
5 libsystem_pthread.dylib 0x1f19fcf5c thread_start + 8
Thread 9:
0 libsystem_pthread.dylib 0x1f19fcf48 start_wqthread + 0
Thread 10 name: com.apple.NSURLConnectionLoader
Thread 10:
0 libsystem_kernel.dylib 0x1b800a564 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x1b800abfc mach_msg + 76
2 CoreFoundation 0x18152e698 __CFRunLoopServiceMachPort + 372
3 CoreFoundation 0x18153298c __CFRunLoopRun + 1212
4 CoreFoundation 0x1815463c8 CFRunLoopRunSpecific + 600
5 CFNetwork 0x181fb78d0 0x181d3d000 + 2599120
6 Foundation 0x182db995c __NSThread__start__ + 792
7 libsystem_pthread.dylib 0x1f19fda60 _pthread_start + 148
8 libsystem_pthread.dylib 0x1f19fcf5c thread_start + 8
Thread 11:
0 libsystem_kernel.dylib 0x1b800a564 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x1b800abfc mach_msg + 76
2 CoreFoundation 0x18152e698 __CFRunLoopServiceMachPort + 372
3 CoreFoundation 0x18153298c __CFRunLoopRun + 1212
4 CoreFoundation 0x1815463c8 CFRunLoopRunSpecific + 600
5 Foundation 0x182d69d54 -[NSRunLoop+ 101716 (NSRunLoop) runMode:beforeDate:] + 236
6 Foundation 0x182d6a510 -[NSRunLoop+ 103696 (NSRunLoop) run] + 92
7 SwiftUI 0x189014f84 static DisplayLink.asyncThread+ 778116 (arg:) + 836
8 SwiftUI 0x189012b70 #objc static DisplayLink.asyncThread+ 768880 (arg:) + 100
9 Foundation 0x182db995c __NSThread__start__ + 792
10 libsystem_pthread.dylib 0x1f19fda60 _pthread_start + 148
11 libsystem_pthread.dylib 0x1f19fcf5c thread_start + 8
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x0000000280b49780 x1: 0x0000000280b49780 x2: 0x0000000000000001 x3: 0x00000001930ae4f4
x4: 0x00000000000002e0 x5: 0x00000001063ba020 x6: 0x000000000000005e x7: 0x0000000000000005
x8: 0x00000000ffffffff x9: 0x0000000281e6eb80 x10: 0x0000000000000003 x11: 0x0000000200000003
x12: 0x0000000000000003 x13: 0x000000003a204827 x14: 0x000000003a405000 x15: 0x0000000000005000
x16: 0x000000003a400000 x17: 0x0000000000000f08 x18: 0x0000000114a31600 x19: 0x0000000000000007
x20: 0x0000000280b49780 x21: 0x0000000106219aa8 x22: 0x00000001894fa77c x23: 0x0000000000000002
x24: 0x00000001db34e000 x25: 0x00000001db9758d8 x26: 0x00000001db34e000 x27: 0x0000000106219a50
x28: 0x0000000281e6c140 fp: 0x000000016d223790 lr: 0x00000001894f9ea4
sp: 0x000000016d223780 pc: 0x000000018923f698 cpsr: 0x80000000
far: 0x000000011c084000 esr: 0xf2000001 (Breakpoint) brk 1
Binary Images:
0x188f57000 - 0x189f77fff SwiftUI arm64e <6d99bb3b20803dbbaecf604b49eb822d> /System/Library/Frameworks/SwiftUI.framework/SwiftUI
0x1839d1000 - 0x185253fff UIKitCore arm64e <0e2d8679d5f13c0390107f6ce3662789> /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore
0x185279000 - 0x18555cfff QuartzCore arm64e <8ab30eebfb1536cb9c27918ed68500ee> /System/Library/Frameworks/QuartzCore.framework/QuartzCore
0x181527000 - 0x18197afff CoreFoundation arm64e <6174789ae88c3f5cba39de2e9edc0750> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
0x19cd56000 - 0x19cd5efff GraphicsServices arm64e <0f7424f6bde5311aa3fac0e0c4c28d72> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
0x102bd8000 - 0x103983fff Development arm64 <d40c6dc01ef5385687bfe7476ba7240f> /private/var/containers/Bundle/Application/4F3744A5-3BEF-472F-8674-AF6F0414AE5F/Development.app/Development
0x1060d4000 - 0x10612bfff dyld arm64e <d48c31ee061f370ba6f78391a1b53ed8> /usr/lib/dyld
0x1f19fc000 - 0x1f1a07fff libsystem_pthread.dylib arm64e <bc1ce0c6a9f2396b9afb623d3acd5881> /usr/lib/system/libsystem_pthread.dylib
0x1b8009000 - 0x1b803cfff libsystem_kernel.dylib arm64e <d2476f74d204348d8d386165d0485c7c> /usr/lib/system/libsystem_kernel.dylib
0x182d51000 - 0x183055fff Foundation arm64e <efbca2ff8b8c3227abbc154ba851d23c> /System/Library/Frameworks/Foundation.framework/Foundation
0x181d3d000 - 0x182201fff CFNetwork arm64e <570aad29ce5c3cd9ab01ad21e1440ddb> /System/Library/Frameworks/CFNetwork.framework/CFNetwork
EOF
Let me know if there is anymore info i can provide to help solve this problem.
Hey StackOverflow detectives.
I've been pulling my hair out for a few months trying to figure out the crashes which happen at a line never exists.
In the crash log below, CustomClass.swift does exist but the line 25 doesn't.
What would be the true reason for this crash?
Hint: we run heavy processing and allocate a lot of memory (about 700MB) in the background that was written in c++, which is in OUR_CUSTOM_FRAMEWORK below.
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Thread 0 name:
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00000001934c6df0 __pthread_kill + 8
1 libsystem_pthread.dylib 0x00000001933e6930 pthread_kill + 228 (pthread.c:1458)
2 libsystem_c.dylib 0x0000000193374ba4 abort + 104 (abort.c:110)
3 libsystem_malloc.dylib 0x00000001933d7fdc malloc_vreport + 564 (malloc_printf.c:183)
4 libsystem_malloc.dylib 0x00000001933d81a4 malloc_report + 64 (malloc_printf.c:192)
5 libsystem_malloc.dylib 0x00000001933cbd1c free + 436 (malloc.c:1733)
6 [OUR_CUSTOM_FRAMEWORK] 0x000000010324ccf8 0x1031a4000 + 691448
7 libsystem_c.dylib 0x0000000193355164 __cxa_finalize_ranges + 416 (atexit.c:284)
8 libsystem_c.dylib 0x00000001933554a0 exit + 28 (exit.c:81)
9 UIKitCore 0x000000019782eb88 -[UIApplication _terminateWithStatus:] + 508 (UIApplication.m:6735)
10 UIKitCore 0x0000000196f97718 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 128 (_UISceneLifecycleMultiplexer.m:765)
11 UIKitCore 0x0000000196f9737c -[_UISceneLifecycleMultiplexer forceExitWithTransitionContext:scene:] + 220 (_UISceneLifecycleMultiplexer.m:418)
12 UIKitCore 0x0000000197824ac4 -[UIApplication workspaceShouldExit:withTransitionContext:] + 216 (UIApplication.m:3725)
13 FrontBoardServices 0x000000019893bcf8 -[FBSUIApplicationWorkspaceShim workspaceShouldExit:withTransitionContext:] + 88 (FBSUIApplicationWorkspace.m:144)
14 FrontBoardServices 0x0000000198968d68 __83-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:withAcknowledgement:]_block_invoke_2 + 80 (FBSWorkspaceScenesClient.m:281)
15 FrontBoardServices 0x000000019894debc -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 240 (FBSWorkspace.m:357)
16 FrontBoardServices 0x0000000198968cf4 __83-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:withAcknowledgement:]_block_invoke + 140 (FBSWorkspaceScenesClient.m:278)
17 libdispatch.dylib 0x000000019338033c _dispatch_client_callout + 20 (object.m:495)
18 libdispatch.dylib 0x00000001933830d4 _dispatch_block_invoke_direct + 264 (queue.c:466)
19 FrontBoardServices 0x000000019898f6c4 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 48 (FBSSerialQueue.m:173)
20 FrontBoardServices 0x000000019898f370 -[FBSSerialQueue _queue_performNextIfPossible] + 432 (FBSSerialQueue.m:216)
21 FrontBoardServices 0x000000019898f8dc -[FBSSerialQueue _performNextFromRunLoopSource] + 32 (FBSSerialQueue.m:247)
22 CoreFoundation 0x000000019365baf4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 (CFRunLoop.c:1922)
23 CoreFoundation 0x000000019365ba48 __CFRunLoopDoSource0 + 84 (CFRunLoop.c:1956)
24 CoreFoundation 0x000000019365b198 __CFRunLoopDoSources0 + 196 (CFRunLoop.c:1992)
25 CoreFoundation 0x0000000193655f38 __CFRunLoopRun + 796 (CFRunLoop.c:2882)
26 CoreFoundation 0x00000001936558f4 CFRunLoopRunSpecific + 480 (CFRunLoop.c:3192)
27 GraphicsServices 0x000000019da6c604 GSEventRunModal + 164 (GSEvent.c:2246)
28 UIKitCore 0x0000000197829358 UIApplicationMain + 1944 (UIApplication.m:4823)
29 [APPNAME] 0x0000000100d45128 main + 68 (CustomClass.swift:25)
30 libdyld.dylib 0x00000001934d12dc start + 4
I have a very incomprehensible crash with my iOS application. The crash occures only on 32 bit devices (iPad 4, iPhone 5, iPhone 5c) with iOS 10 OS only in distribution build (debug builds and enterprise builds work without crash). My app was built with Xcode 11.3.1.
This is the call stack of the crashed thread:
#14. Crashed: com.apple.root.default-qos
0 myapp 0x6bf40c SSL_CTX_new + 3726105
1 libsystem_malloc.dylib 0x1db19237 szone_malloc_should_clear + 492
2 (Missing) 0x145060f0 (Missing)
3 (Missing) 0x2c2100b1 (Missing)
Call stack of all threads:
#0. com.apple.main-thread
0 libobjc.A.dylib 0x1d5a2e94 getMethodNoSuper_nolock(objc_class*, objc_selector*) + 61
1 libobjc.A.dylib 0x1d5a2c91 lookUpImpOrForward + 296
2 libobjc.A.dylib 0x1d5a2b65 _class_lookupMethodAndLoadCache3 + 26
3 libobjc.A.dylib 0x1d5a91af _objc_msgSend_uncached + 14
4 UIKit 0x23bc45d3 -[UIStatusBar _requestStyleAttributes:animationParameters:forced:] + 150
5 UIKit 0x23bc4411 -[UIStatusBar requestStyle:animationParameters:forced:] + 468
6 UIKit 0x23bc414d -[UIStatusBar requestStyle:animated:forced:] + 92
7 UIKit 0x235ab8c7 -[UIStatusBar forceUpdateStyleOverrides:] + 90
8 FrontBoardServices 0x1fbdfcff __52-[FBSSettingsDiffInspector inspectDiff:withContext:]_block_invoke.27 + 166
9 Foundation 0x1ec19421 <redacted> + 438
10 Foundation 0x1eb9ac0f <redacted> + 66
11 BaseBoard 0x1fb5e819 -[BSSettingsDiff inspectChangesWithBlock:] + 102
12 FrontBoardServices 0x1fbda027 -[FBSSettingsDiff inspectOtherChangesWithBlock:] + 90
13 FrontBoardServices 0x1fbdfb5d -[FBSSettingsDiffInspector inspectDiff:withContext:] + 300
14 UIKit 0x237b502d __70-[UIApplication scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 170
15 UIKit 0x237b4cf3 -[UIApplication scene:didUpdateWithDiff:transitionContext:completion:] + 824
16 UIKit 0x23aba733 -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:] + 412
17 FrontBoardServices 0x1fbc9f67 __80-[FBSSceneImpl updater:didUpdateSettings:withDiff:transitionContext:completion:]_block_invoke.376 + 210
18 FrontBoardServices 0x1fbf4c13 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 18
19 FrontBoardServices 0x1fbf4acd -[FBSSerialQueue _performNext] + 220
20 FrontBoardServices 0x1fbf4db7 -[FBSSerialQueue _performNextFromRunLoopSource] + 44
21 CoreFoundation 0x1e2cffdd __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 12
22 CoreFoundation 0x1e2cfb05 __CFRunLoopDoSources0 + 424
23 CoreFoundation 0x1e2cdf51 __CFRunLoopRun + 1160
24 CoreFoundation 0x1e2211af CFRunLoopRunSpecific + 470
25 CoreFoundation 0x1e220fd1 CFRunLoopRunInMode + 104
26 GraphicsServices 0x1f9cbb41 GSEventRunModal + 80
27 UIKit 0x235a3a53 UIApplicationMain + 150
28 myapp 0x39d26d main + 24 (main.m:24)
29 libdyld.dylib 0x1da0e4eb start + 2
#1. APMExperimentWorkerQueue
0 libsystem_kernel.dylib 0x1dace2fc fsync + 8
1 libsqlite3.dylib 0x1e7bacd1 (null) + 44054
2 libsqlite3.dylib 0x1e7c323b (null) + 2074
3 libsqlite3.dylib 0x1e7ba7fd (null) + 42818
4 libsqlite3.dylib 0x1e7abeb7 (null) + 16492
5 libsqlite3.dylib 0x1e7858fb (null) + 2524
6 libsqlite3.dylib 0x1e7a6e17 (null) + 51750
7 libsqlite3.dylib 0x1e79a5ab sqlite3_step + 442
8 myapp 0xf60a4d -[APMSqliteStore executeSQLStatement:error:] + 2979674
9 myapp 0xf609e7 -[APMSqliteStore executeSQL:error:] + 2979572
10 myapp 0xf5e0c7 -[APMSqliteStore ensureTableWithName:createSQL:requiredColumnNames:addOnColumns:error:] + 2969044
11 myapp 0xf5d4b1 -[APMSqliteStore ensureTableWithName:elementaryColumnInfo:addOnColumnInfo:error:] + 2965950
12 myapp 0xf5dcf9 -[APMSqliteStore ensureTableWithName:elementaryColumnInfo:addOnColumnInfo:modifyColumnInfo:error:] + 2968070
13 myapp 0xf0ad95 -[APMEDatabase ensureAllTables] + 2628258
14 myapp 0xf0a95d -[APMEDatabase initializeDatabaseResourcesWithContext:databasePath:] + 2627178
15 myapp 0xf0a85b -[APMEDatabase initWithPath:] + 2626920
16 myapp 0xf13047 -[APMETaskManager startTaskManagerOnWorkerQueue] + 2661716
17 myapp 0xf12fd7 __35-[APMETaskManager startTaskManager]_block_invoke + 2661604
18 myapp 0xf145d7 __46-[APMETaskManager dispatchAsyncOnWorkerQueue:]_block_invoke + 2667236
19 libdispatch.dylib 0x1d9e1797 _dispatch_call_block_and_release + 10
20 libdispatch.dylib 0x1d9ee59d _dispatch_queue_serial_drain + 854
21 libdispatch.dylib 0x1d9e4b71 _dispatch_queue_invoke + 886
22 libdispatch.dylib 0x1d9f01b5 _dispatch_root_queue_drain + 326
23 libdispatch.dylib 0x1d9f000f _dispatch_worker_thread3 + 106
24 libsystem_pthread.dylib 0x1db9687d _pthread_wqthread + 1040
25 libsystem_pthread.dylib 0x1db9645c start_wqthread + 8
#2. com.google.fira.worker
0 libsystem_kernel.dylib 0x1dace2fc fsync + 8
1 libsqlite3.dylib 0x1e7bacd1 (null) + 44054
2 libsqlite3.dylib 0x1e7c323b (null) + 2074
3 libsqlite3.dylib 0x1e7ba7fd (null) + 42818
4 libsqlite3.dylib 0x1e7abeb7 (null) + 16492
5 libsqlite3.dylib 0x1e7858fb (null) + 2524
6 libsqlite3.dylib 0x1e7a6e17 (null) + 51750
7 libsqlite3.dylib 0x1e79a5ab sqlite3_step + 442
8 myapp 0xf60a4d -[APMSqliteStore executeSQLStatement:error:] + 2979674
9 myapp 0xf609e7 -[APMSqliteStore executeSQL:error:] + 2979572
10 myapp 0xf5e0c7 -[APMSqliteStore ensureTableWithName:createSQL:requiredColumnNames:addOnColumns:error:] + 2969044
11 myapp 0xf5d4b1 -[APMSqliteStore ensureTableWithName:elementaryColumnInfo:addOnColumnInfo:error:] + 2965950
12 myapp 0xf5dcf9 -[APMSqliteStore ensureTableWithName:elementaryColumnInfo:addOnColumnInfo:modifyColumnInfo:error:] + 2968070
13 myapp 0xf2a357 -[APMDatabase ensureAllTables] + 2756708
14 myapp 0xf28d6f -[APMDatabase initializeDatabaseResourcesWithContext:databasePath:error:] + 2751100
15 myapp 0xf1f897 -[APMDatabase initWithDatabaseName:persistedConfig:error:] + 2712996
16 myapp 0xf31013 __47-[APMMeasurement startMeasurementOnWorkerQueue]_block_invoke + 2784544
17 myapp 0xf30ae3 -[APMMeasurement startMeasurementOnWorkerQueue] + 2783216
18 myapp 0xf3072f -[APMMeasurement setEnabledOnWorkerQueue:] + 2782268
19 myapp 0xf30605 __29-[APMMeasurement setEnabled:]_block_invoke + 2781970
20 myapp 0xf4b531 __51-[APMScheduler scheduleOnWorkerQueueBlockID:block:]_block_invoke + 2892350
21 libdispatch.dylib 0x1d9e1797 _dispatch_call_block_and_release + 10
22 libdispatch.dylib 0x1d9ee59d _dispatch_queue_serial_drain + 854
23 libdispatch.dylib 0x1d9e4b71 _dispatch_queue_invoke + 886
24 libdispatch.dylib 0x1d9f01b5 _dispatch_root_queue_drain + 326
25 libdispatch.dylib 0x1d9f000f _dispatch_worker_thread3 + 106
26 libsystem_pthread.dylib 0x1db9687d _pthread_wqthread + 1040
27 libsystem_pthread.dylib 0x1db9645c start_wqthread + 8
#3. NSOperationQueue 0x145c36b0 :: NSOperation 0x145c3d10 (QOS: DEFAULT)
0 libsystem_kernel.dylib 0x1dae2554 __ulock_wait + 24
1 libdispatch.dylib 0x1d9f2a9d _dispatch_ulock_wait + 38
2 libdispatch.dylib 0x1d9f2b9b _dispatch_thread_event_wait_slow + 24
3 libdispatch.dylib 0x1d9f0b39 _dispatch_barrier_sync_f_slow + 214
4 myapp 0xb3be1 OnMain(void () block_pointer) + 70 (BlockTools.h:70)
5 myapp 0xb3a81 +[UIDevice(Kit) is3DTouchSupported] + 75 (UIDevice_Kit.mm:75)
6 myapp 0x3ecb13 -[DocumentAssetGenerator generateAssetsForDocument:] + 41 (DocumentAssetGenerator.mm:41)
7 myapp 0x522fe1 -[DocumentImporter importDocumentNamed:atFilePath:toContext:document:] + 214 (DocumentImporter.m:214)
8 myapp 0x4c9655 -[CoreDataSetup installPDFDocumentWithNames:atContext:] + 222 (CoreDataSetup.m:222)
9 myapp 0x4c8e8b -[CoreDataSetup installOrUpdateMobileDataSheetInContext:] + 169 (CoreDataSetup.m:169)
10 myapp 0x4c86fd -[CoreDataSetup installOrUpdateSampleDocuments] + 122 (CoreDataSetup.m:122)
11 myapp 0x390f31 __51-[AppManager installSampleDocumentBundleIfNeeded]_block_invoke + 275 (AppManager.m:275)
12 Foundation 0x1ec39b01 <redacted> + 8
13 Foundation 0x1eb8faef <redacted> + 146
14 Foundation 0x1eb81fe7 <redacted> + 770
15 Foundation 0x1ec3bd39 <redacted> + 190
16 libdispatch.dylib 0x1d9ee59d _dispatch_queue_serial_drain + 854
17 libdispatch.dylib 0x1d9e4b71 _dispatch_queue_invoke + 886
18 libdispatch.dylib 0x1d9f01b5 _dispatch_root_queue_drain + 326
19 libdispatch.dylib 0x1d9f000f _dispatch_worker_thread3 + 106
20 libsystem_pthread.dylib 0x1db9687d _pthread_wqthread + 1040
21 libsystem_pthread.dylib 0x1db9645c start_wqthread + 8
#4. AVAudioSession Notify Thread
0 libsystem_kernel.dylib 0x1dacc900 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x1dacc6e1 mach_msg + 44
2 CoreFoundation 0x1e2cfbe3 __CFRunLoopServiceMachPort + 144
3 CoreFoundation 0x1e2ce065 __CFRunLoopRun + 1436
4 CoreFoundation 0x1e2211af CFRunLoopRunSpecific + 470
5 CoreFoundation 0x1e220fd1 CFRunLoopRunInMode + 104
6 AVFAudio 0x348ab82f GenericRunLoopThread::Entry(void*) + 142
7 AVFAudio 0x348d458f CAPThread::Entry(CAPThread*) + 154
8 libsystem_pthread.dylib 0x1db9893b _pthread_body + 216
9 libsystem_pthread.dylib 0x1db9885d _pthread_start + 234
10 libsystem_pthread.dylib 0x1db96468 thread_start + 8
#5. com.apple.uikit.eventfetch-thread
0 libsystem_kernel.dylib 0x1dacc900 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x1dacc6e1 mach_msg + 44
2 CoreFoundation 0x1e2cfbe3 __CFRunLoopServiceMachPort + 144
3 CoreFoundation 0x1e2ce065 __CFRunLoopRun + 1436
4 CoreFoundation 0x1e2211af CFRunLoopRunSpecific + 470
5 CoreFoundation 0x1e220fd1 CFRunLoopRunInMode + 104
6 Foundation 0x1eb75af5 <redacted> + 258
7 Foundation 0x1eb9276d <redacted> + 86
8 UIKit 0x23ea4ad9 -[UIEventFetcher threadMain] + 128
9 Foundation 0x1ec598eb <redacted> + 1122
10 libsystem_pthread.dylib 0x1db9893b _pthread_body + 216
11 libsystem_pthread.dylib 0x1db9885d _pthread_start + 234
12 libsystem_pthread.dylib 0x1db96468 thread_start + 8
#6. com.apple.root.default-qos
0 libsystem_kernel.dylib 0x1dacc900 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x1dacc6e1 mach_msg + 44
2 CoreFoundation 0x1e2cfbe3 __CFRunLoopServiceMachPort + 144
3 CoreFoundation 0x1e2ce065 __CFRunLoopRun + 1436
4 CoreFoundation 0x1e2211af CFRunLoopRunSpecific + 470
5 CoreFoundation 0x1e220fd1 CFRunLoopRunInMode + 104
6 Foundation 0x1eb75af5 <redacted> + 258
7 Foundation 0x1eb9276d <redacted> + 86
8 myapp 0xc6535 -[NSURLConnectionSyncAuth sendSynchronousRequest:returningResponse:error:] + 26 (NSURLConnectionSyncAuth.m:26)
9 myapp 0xc2ebf __51-[Reachability checkNetworkWithCompletionBlock:]_block_invoke + 315 (Reachability.m:315)
10 libdispatch.dylib 0x1d9e1797 _dispatch_call_block_and_release + 10
11 libdispatch.dylib 0x1d9eeb1d _dispatch_queue_override_invoke + 536
12 libdispatch.dylib 0x1d9f01b5 _dispatch_root_queue_drain + 326
13 libdispatch.dylib 0x1d9f000f _dispatch_worker_thread3 + 106
14 libsystem_pthread.dylib 0x1db9687d _pthread_wqthread + 1040
15 libsystem_pthread.dylib 0x1db9645c start_wqthread + 8
#7. Thread
0 libsystem_kernel.dylib 0x1dae273c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x1db968eb _pthread_wqthread + 1150
2 libsystem_pthread.dylib 0x1db9645c start_wqthread + 8
#8. com.apple.root.default-qos
0 libsystem_kernel.dylib 0x1dae2554 __ulock_wait + 24
1 libdispatch.dylib 0x1d9f2a9d _dispatch_ulock_wait + 38
2 libdispatch.dylib 0x1d9f2b9b _dispatch_thread_event_wait_slow + 24
3 libdispatch.dylib 0x1d9f0b39 _dispatch_barrier_sync_f_slow + 214
4 libdispatch.dylib 0x1d9e1797 _dispatch_call_block_and_release + 10
5 libdispatch.dylib 0x1d9eeb1d _dispatch_queue_override_invoke + 536
6 libdispatch.dylib 0x1d9f01b5 _dispatch_root_queue_drain + 326
7 libdispatch.dylib 0x1d9f000f _dispatch_worker_thread3 + 106
8 libsystem_pthread.dylib 0x1db9687d _pthread_wqthread + 1040
9 libsystem_pthread.dylib 0x1db9645c start_wqthread + 8
#9. com.apple.network.connections
0 libcorecrypto.dylib 0x1d9a4780 ccn_mul + 19
1 libcorecrypto.dylib 0x1d9bee47 cczp_mul_ws + 42
2 libcorecrypto.dylib 0x1d9bee47 cczp_mul_ws + 42
3 libcorecrypto.dylib 0x1d99c179 ccec_add_ws + 244
4 libcorecrypto.dylib 0x1d99c371 ccec_full_add_normalized_ws + 54
5 libcorecrypto.dylib 0x1d99db53 ccec_twin_mult + 1430
6 libcorecrypto.dylib 0x1d9bd32d ccec_verify_internal + 564
7 libcorecrypto.dylib 0x1d99dc95 ccec_verify + 104
8 libcorecrypto.dylib 0x1d99d36f ccec_pairwise_consistency_check + 168
9 libcorecrypto.dylib 0x1d99dd05 ccec_generate_key_fips + 22
10 libsystem_coretls.dylib 0x1da9ae39 sslEcdhCreateKey + 40
11 libsystem_coretls.dylib 0x1da9dc35 SSLEncodeKeyExchange + 264
12 libsystem_coretls.dylib 0x1da9f1f5 SSLAdvanceHandshake + 1708
13 libsystem_coretls.dylib 0x1daa358b tls_handshake_continue + 22
14 libnetwork.dylib 0x296e3097 __nw_coretls_callback_handshake_message_block_invoke_3 + 52
15 libdispatch.dylib 0x1d9e1797 _dispatch_call_block_and_release + 10
16 libdispatch.dylib 0x1d9ee59d _dispatch_queue_serial_drain + 854
17 libdispatch.dylib 0x1d9e4b71 _dispatch_queue_invoke + 886
18 libdispatch.dylib 0x1d9f01b5 _dispatch_root_queue_drain + 326
19 libdispatch.dylib 0x1d9f000f _dispatch_worker_thread3 + 106
20 libsystem_pthread.dylib 0x1db9687d _pthread_wqthread + 1040
21 libsystem_pthread.dylib 0x1db9645c start_wqthread + 8
#10. Thread
0 libsystem_kernel.dylib 0x1dae1e7c __semwait_signal + 24
1 libsystem_c.dylib 0x1da360e9 nanosleep + 168
2 libc++.1.dylib 0x1d57392b std::__1::this_thread::sleep_for(std::__1::chrono::duration<long long, std::__1::ratio<1ll, 1000000000ll> > const&) + 102
3 JavaScriptCore 0x221873c5 <redacted> + 148
4 JavaScriptCore 0x22187207 <redacted> + 36
5 JavaScriptCore 0x22187121 <redacted> + 118
6 JavaScriptCore 0x22188197 <redacted> + 76
7 JavaScriptCore 0x221880ed <redacted> + 18
8 JavaScriptCore 0x2218832f <redacted> + 66
9 libsystem_pthread.dylib 0x1db9893b _pthread_body + 216
10 libsystem_pthread.dylib 0x1db9885d _pthread_start + 234
11 libsystem_pthread.dylib 0x1db96468 thread_start + 8
#11. Thread
0 libsystem_pthread.dylib 0x1db96454 start_wqthread + 83
#12. com.twitter.crashlytics.ios.work-queue :: NSOperation 0x1463a150 (QOS: DEFAULT)
0 libsystem_kernel.dylib 0x1dae25c8 __unlink + 8
1 libsystem_kernel.dylib 0x1dacedc5 unlink + 8
2 libremovefile.dylib 0x1da1770f __removefile_process_file + 82
3 libremovefile.dylib 0x1da1786b __removefile_tree_walker + 170
4 libremovefile.dylib 0x1da17a83 removefile + 102
5 Foundation 0x1ebadcf5 <redacted> + 142
6 Foundation 0x1eb81fe7 <redacted> + 770
7 Foundation 0x1ebad8b1 <redacted> + 76
8 myapp 0xe13dcf -[CLSFileManager removeItemAtPath:] + 58 (CLSFileManager.m:58)
9 myapp 0xe1fa85 __71-[CLSReportsController prepareAndSubmitReport:asUrgent:withProcessing:]_block_invoke + 174 (CLSReportsController.m:174)
10 myapp 0xe15a01 CLSApplicationAcivity + 161 (CLSApplication.m:161)
11 myapp 0xe1f703 -[CLSReportsController prepareAndSubmitReport:asUrgent:withProcessing:] + 188 (CLSReportsController.m:188)
12 myapp 0xe1c193 __62-[CLSCrashReportingController handleExistingFilesInProcessing]_block_invoke + 479 (CLSCrashReportingController.m:479)
13 Foundation 0x1ec39b01 <redacted> + 8
14 Foundation 0x1eb8faef <redacted> + 146
15 Foundation 0x1eb81fe7 <redacted> + 770
16 Foundation 0x1ec3bd39 <redacted> + 190
17 libdispatch.dylib 0x1d9ee59d _dispatch_queue_serial_drain + 854
18 libdispatch.dylib 0x1d9e4b71 _dispatch_queue_invoke + 886
19 libdispatch.dylib 0x1d9f01b5 _dispatch_root_queue_drain + 326
20 libdispatch.dylib 0x1d9f000f _dispatch_worker_thread3 + 106
21 libsystem_pthread.dylib 0x1db9687d _pthread_wqthread + 1040
22 libsystem_pthread.dylib 0x1db9645c start_wqthread + 8
#13. com.apple.usernotifications.UNUserNotificationServiceConnection.call-out
0 libsystem_kernel.dylib 0x1dae2554 __ulock_wait + 24
1 libdispatch.dylib 0x1d9f2a9d _dispatch_ulock_wait + 38
2 libdispatch.dylib 0x1d9f2b9b _dispatch_thread_event_wait_slow + 24
3 libdispatch.dylib 0x1d9f0b39 _dispatch_barrier_sync_f_slow + 214
4 myapp 0x46e05b __42-[AppBuilder setupAppWithLaunchOptions:]_block_invoke_3 + 70 (BlockTools.h:70)
5 libdispatch.dylib 0x1d9e1797 _dispatch_call_block_and_release + 10
6 libdispatch.dylib 0x1d9ee59d _dispatch_queue_serial_drain + 854
7 libdispatch.dylib 0x1d9e4b71 _dispatch_queue_invoke + 886
8 libdispatch.dylib 0x1d9eea1f _dispatch_queue_override_invoke + 282
9 libdispatch.dylib 0x1d9f01b5 _dispatch_root_queue_drain + 326
10 libdispatch.dylib 0x1d9f000f _dispatch_worker_thread3 + 106
11 libsystem_pthread.dylib 0x1db9687d _pthread_wqthread + 1040
12 libsystem_pthread.dylib 0x1db9645c start_wqthread + 8
#14. Crashed: com.apple.root.default-qos
0 myapp 0x6bf40c SSL_CTX_new + 3726105
1 libsystem_malloc.dylib 0x1db19237 szone_malloc_should_clear + 492
2 (Missing) 0x145060f0 (Missing)
3 (Missing) 0x2c2100b1 (Missing)
#15. Thread
0 libsystem_pthread.dylib 0x1db96454 start_wqthread + 83
#16. com.apple.root.default-qos
0 libsystem_kernel.dylib 0x1dacc950 semaphore_wait_trap + 8
1 libdispatch.dylib 0x1d9f291f _os_semaphore_wait + 16
2 libdispatch.dylib 0x1d9f2093 _dispatch_semaphore_wait_slow + 76
3 CFNetwork 0x1e8de6a1 CFURLConnectionSendSynchronousRequest + 256
4 CFNetwork 0x1e8fe8bd +[NSURLConnection sendSynchronousRequest:returningResponse:error:] + 100
5 myapp 0xc94bd +[ProxyCredentialRequestHandler uploadSharedCredentialStorageWithSystemCredentialsUsingURL:] + 308 (ProxyCredentialRequestHandler.mm:308)
6 myapp 0x5a2ac7 __61+[AppBuilderWrapper configProxyCredentialRequestHandler]_block_invoke + 2560468
7 libdispatch.dylib 0x1d9e1797 _dispatch_call_block_and_release + 10
8 libdispatch.dylib 0x1d9eeb1d _dispatch_queue_override_invoke + 536
9 libdispatch.dylib 0x1d9f01b5 _dispatch_root_queue_drain + 326
10 libdispatch.dylib 0x1d9f000f _dispatch_worker_thread3 + 106
11 libsystem_pthread.dylib 0x1db9687d _pthread_wqthread + 1040
12 libsystem_pthread.dylib 0x1db9645c start_wqthread + 8
#17. Thread
0 libsystem_kernel.dylib 0x1dae273c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x1db968eb _pthread_wqthread + 1150
2 libsystem_pthread.dylib 0x1db9645c start_wqthread + 8
#18. com.twitter.crashlytics.ios.MachExceptionServer
0 myapp 0xe23d79 CLSProcessRecordAllThreads + 1682054
1 myapp 0xe23d79 CLSProcessRecordAllThreads + 1682054
2 myapp 0xe23fd7 CLSProcessRecordAllThreads + 1682660
3 myapp 0xe17639 CLSHandler + 26 (CLSHandler.m:26)
4 myapp 0xe13aa1 CLSMachExceptionServer + 1615790
5 libsystem_pthread.dylib 0x1db9893b _pthread_body + 216
6 libsystem_pthread.dylib 0x1db9885d _pthread_start + 234
7 libsystem_pthread.dylib 0x1db96468 thread_start + 8
#19. com.apple.NSURLConnectionLoader
0 libsystem_kernel.dylib 0x1dacc900 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x1dacc6e1 mach_msg + 44
2 CoreFoundation 0x1e2cfbe3 __CFRunLoopServiceMachPort + 144
3 CoreFoundation 0x1e2ce065 __CFRunLoopRun + 1436
4 CoreFoundation 0x1e2211af CFRunLoopRunSpecific + 470
5 CoreFoundation 0x1e220fd1 CFRunLoopRunInMode + 104
6 CFNetwork 0x1e8fe393 +[NSURLConnection(Loader) _resourceLoadLoop:] + 402
7 Foundation 0x1ec598eb <redacted> + 1122
8 libsystem_pthread.dylib 0x1db9893b _pthread_body + 216
9 libsystem_pthread.dylib 0x1db9885d _pthread_start + 234
10 libsystem_pthread.dylib 0x1db96468 thread_start + 8
#20. GAIThread
0 libsqlite3.dylib 0x1e7bf4e0 sqlite3_bind_int64
1 myapp 0xe0e1ff -[GAIAnalyticsPropertiesStore bindRecord:toUpsertStatement:] + 283 (GAIAnalyticsPropertiesStore.m:283)
2 myapp 0xe0db83 -[GAIAnalyticsPropertiesStore upsertPropertyRecord:] + 229 (GAIAnalyticsPropertiesStore.m:229)
3 myapp 0xe0d61d -[GAIAnalyticsPropertiesStore nextHitNumberForTrackingId:clientId:] + 168 (GAIAnalyticsPropertiesStore.m:168)
4 myapp 0xe07bdd -[GAIBatchingDispatcher queueDispatch:] + 693 (GAIBatchingDispatcher.m:693)
5 myapp 0xe07a13 -[GAIBatchingDispatcher queueModel:] + 671 (GAIBatchingDispatcher.m:671)
6 Foundation 0x1ec59b2f <redacted> + 386
7 CoreFoundation 0x1e2cffdd __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 12
8 CoreFoundation 0x1e2cfb05 __CFRunLoopDoSources0 + 424
9 CoreFoundation 0x1e2cdf51 __CFRunLoopRun + 1160
10 CoreFoundation 0x1e2211af CFRunLoopRunSpecific + 470
11 CoreFoundation 0x1e220fd1 CFRunLoopRunInMode + 104
12 Foundation 0x1eb75af5 <redacted> + 258
13 Foundation 0x1ebc2db9 <redacted> + 80
14 myapp 0xdf6e39 +[GAI threadMain:] + 241 (GAI.m:241)
15 Foundation 0x1ec598eb <redacted> + 1122
16 libsystem_pthread.dylib 0x1db9893b _pthread_body + 216
17 libsystem_pthread.dylib 0x1db9885d _pthread_start + 234
18 libsystem_pthread.dylib 0x1db96468 thread_start + 8
#21. Thread
0 libsystem_pthread.dylib 0x1db96454 start_wqthread + 83
#22. Thread
0 libsystem_kernel.dylib 0x1dae1808 __psynch_cvwait + 24
1 libsystem_pthread.dylib 0x1db97c43 _pthread_cond_wait + 560
2 libsystem_pthread.dylib 0x1db98fc5 pthread_cond_wait + 38
3 myapp 0xbd37a7 void boost::asio::detail::posix_event::wait<boost::asio::detail::conditionally_enabled_mutex::scoped_lock>(boost::asio::detail::conditionally_enabled_mutex::scoped_lock&) + 107 (posix_event.hpp:107)
4 myapp 0xbd3157 boost::asio::detail::conditionally_enabled_event::wait(boost::asio::detail::conditionally_enabled_mutex::scoped_lock&) + 89 (conditionally_enabled_event.hpp:89)
5 myapp 0xbd28f9 boost::asio::detail::scheduler::do_run_one(boost::asio::detail::conditionally_enabled_mutex::scoped_lock&, boost::asio::detail::scheduler_thread_info&, boost::system::error_code const&) + 409 (scheduler.ipp:409)
6 myapp 0xbd262f boost::asio::detail::scheduler::run(boost::system::error_code&) + 154 (scheduler.ipp:154)
7 myapp 0xbd1a7d boost::asio::io_context::run(boost::system::error_code&) + 70 (io_context.ipp:70)
8 myapp 0xbd1a63 network::detail::AsyncExecutor::Run() + 20 (AsyncService.cpp:20)
9 myapp 0xbd21bf network::AsyncService::Run(network::AsyncService*) + 140 (AsyncService.cpp:140)
10 myapp 0xbd61bf decltype(std::__1::forward<void (*)(network::AsyncService*)>(fp)(std::__1::forward<network::AsyncService*>(fp0))) std::__1::__invoke<void (*)(network::AsyncService*), network::AsyncService*>(void (*&&)(network::AsyncService*), network::AsyncService*&&) + 4361 (type_traits:4361)
11 myapp 0xbd615d void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(network::AsyncService*), network::AsyncService*, 2ul>(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(network::AsyncService*), network::AsyncService*>&, std::__1::__tuple_indices<2ul>) + 343 (thread:343)
12 myapp 0xbd5ad5 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(network::AsyncService*), network::AsyncService*> >(void*) + 352 (thread:352)
13 libsystem_pthread.dylib 0x1db9893b _pthread_body + 216
14 libsystem_pthread.dylib 0x1db9885d _pthread_start + 234
15 libsystem_pthread.dylib 0x1db96468 thread_start + 8
Pods what i use in my app:
pod 'Crashlytics', '~> 3.14'
pod 'FirebaseDynamicLinks', '~> 4.0'
pod 'FirebaseMessaging', '~> 4.3'
pod 'FirebasePerformance', '~> 3.1'
pod 'FirebaseRemoteConfig', '~> 4.4'
pod 'FirebaseAnalytics', '~> 6.4'
pod 'Former', '~> 1.8'
pod 'GoogleAnalytics', '~> 3.17'
pod 'RxSwift', '~> 5.0'
pod 'RxCocoa', '~> 5.0'
pod 'OCMock', '~> 3.6'
Does anybody have an explanation, why does this happen only in distribution build with the previously mentioned device types? Thanks your answers in advance.
This crash was happened thanks to Xcode 11.4. Update Xcode to 11.5 beta or build your application with an older version of Xcode (<=11.3) can solve this issue.
Here is a thread about it:
https://forums.swift.org/t/crashes-on-32-bit-after-xcode-11-4/35035
I have an app thats released to few users in testflight and there's been report of various crashes and most of them points to below crash log. I've not been able to reproduce the crash, so, I'm trying to identify where it could possibly cause crash through crash logs. Below is the crash log and the method where it points the crash.
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000001001c8e9c
Termination Signal: Trace/BPT trap: 5
Termination Reason: Namespace SIGNAL, Code 0x5
Terminating Process: exc handler [0]
Triggered by Thread: 0
Thread 0 name:
Thread 0 Crashed:
0 My App 0x00000001001c8e9c specialized MyTableViewController.didUpdateText(MyTableViewCell, withText : String) -> () + 1008 (MyTableViewController.swift:0)
1 My App 0x00000001001c11b4 #objc MyTableViewController.didUpdateText(MyTableViewCell, withText : String) -> () + 92 (MyTableViewController.swift:0)
2 My App 0x00000001001c1234 protocol witness for MyTableViewCellDelegate.didUpdateText(MyTableViewCell, withText : String) -> () in conformance MyTableViewController + 92 (MyTableViewController.swift:0)
3 My App 0x00000001001f0550 specialized MyTableViewCell.textViewDidEndEditing(UITextView) -> () + 380 (MyTableViewCell.swift:225)
4 My App 0x00000001001ef0cc #objc MyTableViewCell.textViewDidChange(UITextView) -> () + 52
5 UIKit 0x00000001924a7ca0 -[UITextView resignFirstResponder] + 252 (UITextView.m:2151)
6 UIKit 0x00000001924dc39c -[UITableView reloadData] + 328 (UITableView.m:5116)
7 My App 0x00000001001bdcec MyTableViewController.loadDetailsView() -> () + 1040 (MyTableViewController.swift:220)
8 My App 0x000000010017a4b0 MainViewController.loadDetailsView() -> () + 132 (MainViewController.swift:234)
9 My App 0x000000010017a54c #objc MainViewController.loadDetailsView() -> () + 28 (MainViewController.swift:0)
10 My App 0x00000001000edcbc __58-[DisplayViewController createNewInstanceForUser]_block_invoke + 120 (DisplayViewController.m:1221)
11 libdispatch.dylib 0x000000018b18a9e0 _dispatch_call_block_and_release + 24 (init.c:963)
12 libdispatch.dylib 0x000000018b18a9a0 _dispatch_client_callout + 16 (object.m:473)
13 libdispatch.dylib 0x000000018b18f5e8 _dispatch_main_queue_callback_4CF + 996 (inline_internal.h:2431)
14 CoreFoundation 0x000000018c2810c8 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12 (CFRunLoop.c:1793)
15 CoreFoundation 0x000000018c27ece4 __CFRunLoopRun + 1572 (CFRunLoop.c:3004)
16 CoreFoundation 0x000000018c1aeda4 CFRunLoopRunSpecific + 424 (CFRunLoop.c:3113)
17 GraphicsServices 0x000000018dc19074 GSEventRunModal + 100 (GSEvent.c:2245)
18 UIKit 0x0000000192462c9c UIApplicationMain + 208 (UIApplication.m:4089)
19 My App 0x000000010013f978 main + 92 (main.m:14)
20 libdyld.dylib 0x000000018b1bd59c start + 4
Thread 1 name:
Thread 1:
0 libsystem_kernel.dylib 0x000000018b2af224 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x000000018b2af09c mach_msg + 72 (mach_msg.c:103)
2 CoreFoundation 0x000000018c280e90 __CFRunLoopServiceMachPort + 192 (CFRunLoop.c:2527)
3 CoreFoundation 0x000000018c27eae4 __CFRunLoopRun + 1060 (CFRunLoop.c:2870)
4 CoreFoundation 0x000000018c1aeda4 CFRunLoopRunSpecific + 424 (CFRunLoop.c:3113)
5 Foundation 0x000000018ccc9db4 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 304 (NSRunLoop.m:367)
6 Foundation 0x000000018cceab84 -[NSRunLoop(NSRunLoop) runUntilDate:] + 96 (NSRunLoop.m:411)
7 UIKit 0x0000000192dec830 -[UIEventFetcher threadMain] + 136 (UIEventFetcher.m:313)
8 Foundation 0x000000018cdc7318 __NSThread__start__ + 996 (NSThread.m:1163)
9 libsystem_pthread.dylib 0x000000018b39568c _pthread_body + 240 (pthread.c:697)
10 libsystem_pthread.dylib 0x000000018b39559c _pthread_start + 284 (pthread.c:744)
11 libsystem_pthread.dylib 0x000000018b392cb4 thread_start + 4
Thread 2 name:
Thread 2:
0 libsystem_kernel.dylib 0x000000018b2af224 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x000000018b2af09c mach_msg + 72 (mach_msg.c:103)
2 CoreFoundation 0x000000018c280e90 __CFRunLoopServiceMachPort + 192 (CFRunLoop.c:2527)
3 CoreFoundation 0x000000018c27eae4 __CFRunLoopRun + 1060 (CFRunLoop.c:2870)
4 CoreFoundation 0x000000018c1aeda4 CFRunLoopRunSpecific + 424 (CFRunLoop.c:3113)
5 CFNetwork 0x000000018c9bbdf4 +[NSURLConnection(Loader) _resourceLoadLoop:] + 404 (NSURLConnection.mm:364)
6 Foundation 0x000000018cdc7318 __NSThread__start__ + 996 (NSThread.m:1163)
7 libsystem_pthread.dylib 0x000000018b39568c _pthread_body + 240 (pthread.c:697)
8 libsystem_pthread.dylib 0x000000018b39559c _pthread_start + 284 (pthread.c:744)
9 libsystem_pthread.dylib 0x000000018b392cb4 thread_start + 4
Thread 3:
0 libsystem_kernel.dylib 0x000000018b2cce1c __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x000000018b394814 _pthread_cond_wait + 640 (pthread_cond.c:536)
2 libc++.1.dylib 0x000000018acbdac8 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 56 (condition_variable.cpp:44)
3 JavaScriptCore 0x0000000190b5bf08 void std::__1::condition_variable_any::wait<std::__1::unique_lock<bmalloc::Mutex> >(std::__1::unique_lock<bmalloc::Mutex>&) + 112 (condition_variable:202)
4 JavaScriptCore 0x0000000190b5be7c bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>::threadRunLoop() + 168 (condition_variable:211)
5 JavaScriptCore 0x0000000190b5bd5c bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>::threadEntryPoint(bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>*) + 36 (AsyncTask.h:110)
6 JavaScriptCore 0x0000000190b5c00c void* std::__1::__thread_proxy<std::__1::tuple<void (*)(bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>*), bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>*> >(void*) + 92 (__functional_base:416)
7 libsystem_pthread.dylib 0x000000018b39568c _pthread_body + 240 (pthread.c:697)
8 libsystem_pthread.dylib 0x000000018b39559c _pthread_start + 284 (pthread.c:744)
9 libsystem_pthread.dylib 0x000000018b392cb4 thread_start + 4
Thread 4 name:
Thread 4:
0 libsystem_kernel.dylib 0x000000018b2af224 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x000000018b2af09c mach_msg + 72 (mach_msg.c:103)
2 CoreFoundation 0x000000018c280e90 __CFRunLoopServiceMachPort + 192 (CFRunLoop.c:2527)
3 CoreFoundation 0x000000018c27eae4 __CFRunLoopRun + 1060 (CFRunLoop.c:2870)
4 CoreFoundation 0x000000018c1aeda4 CFRunLoopRunSpecific + 424 (CFRunLoop.c:3113)
5 WebCore 0x0000000190e79d3c RunWebThread(void*) + 456 (WebCoreThread.mm:694)
6 libsystem_pthread.dylib 0x000000018b39568c _pthread_body + 240 (pthread.c:697)
7 libsystem_pthread.dylib 0x000000018b39559c _pthread_start + 284 (pthread.c:744)
8 libsystem_pthread.dylib 0x000000018b392cb4 thread_start + 4
Thread 5 name:
Thread 5:
0 libsystem_kernel.dylib 0x000000018b2cce1c __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x000000018b394814 _pthread_cond_wait + 640 (pthread_cond.c:536)
2 JavaScriptCore 0x00000001901af9a4 WTF::ThreadCondition::timedWait(WTF::Mutex&, double) + 80 (ThreadingPthreads.cpp:359)
3 JavaScriptCore 0x0000000190b42a68 WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&) + 2256 (ParkingLot.cpp:597)
4 JavaScriptCore 0x00000001907baf58 JSC::Heap::stopTheMutator() + 272 (ParkingLot.h:81)
5 JavaScriptCore 0x00000001907b89a0 JSC::Heap::stopTheWorld() + 160 (Heap.cpp:1219)
6 JavaScriptCore 0x00000001907ba230 JSC::Heap::collectInThread() + 192 (Heap.cpp:1118)
7 JavaScriptCore 0x00000001907bcd50 JSC::Heap::Thread::work() + 16 (Heap.cpp:229)
8 JavaScriptCore 0x0000000190b327f4 std::__1::__function::__func<WTF::AutomaticThread::start(WTF::Locker<WTF::LockBase> const&)::$_0, std::__1::allocator<WTF::AutomaticThread::start(WTF::Locker<WTF::LockBase> const&)::$_0>, void ()>::operator()() + 352 (AutomaticThread.cpp:215)
9 JavaScriptCore 0x00000001901abf7c WTF::threadEntryPoint(void*) + 212 (functional:1817)
10 JavaScriptCore 0x00000001901abe8c WTF::wtfThreadEntryPoint(void*) + 24 (ThreadingPthreads.cpp:164)
11 libsystem_pthread.dylib 0x000000018b39568c _pthread_body + 240 (pthread.c:697)
12 libsystem_pthread.dylib 0x000000018b39559c _pthread_start + 284 (pthread.c:744)
13 libsystem_pthread.dylib 0x000000018b392cb4 thread_start + 4
Thread 6:
0 libsystem_pthread.dylib 0x000000018b392ca8 start_wqthread + 0 (pthread.c:2333)
Thread 7:
0 libsystem_pthread.dylib 0x000000018b392ca8 start_wqthread + 0 (pthread.c:2333)
Thread 8:
0 libsystem_pthread.dylib 0x000000018b392ca8 start_wqthread + 0 (pthread.c:2333)
Thread 9:
0 libsystem_pthread.dylib 0x000000018b392ca8 start_wqthread + 0 (pthread.c:2333)
Thread 10:
0 libsystem_kernel.dylib 0x000000018b2cda88 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x000000018b3931a4 _pthread_wqthread + 1260 (pthread.c:2205)
2 libsystem_pthread.dylib 0x000000018b392cac start_wqthread + 4
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x000000000000000c x1: 0x0000000176054d00 x2: 0x0000000000000008 x3: 0x000000018b3132c0
x4: 0x000000016fd72317 x5: 0x0000000000000000 x6: 0x0000000000000001 x7: 0x0000000000000000
x8: 0x000000000000000b x9: 0x0000000000000004 x10: 0x0000000000000000 x11: 0xbaddc0dedeadbead
x12: 0x0000000174c73fb0 x13: 0x0000000000000010 x14: 0x0000000000000008 x15: 0x0000000000000010
x16: 0x00000001010411f0 x17: 0x000000018ad530dc x18: 0x0000000000000000 x19: 0x0000000176054d00
x20: 0x0000000101340560 x21: 0x000000017644f810 x22: 0x0000000000000000 x23: 0x00000001001bb5cc
x24: 0x000000012a61f840 x25: 0x000000017569d150 x26: 0x0000000174243fa8 x27: 0x00000001003f5b30
x28: 0x0000000100d31660 fp: 0x000000016fd726c0 lr: 0x00000001001c8c4c
sp: 0x000000016fd72640 pc: 0x00000001001c8e9c cpsr: 0x20000000
Crash log in XCode points to this function
func textViewDidEndEditing(_ textView: UITextView) {
selectButton.isSelected = false
selectButtonAction(true)
delegate?.didUpdateText(self, withText: textView.text) //Crash points to this line
}
Since the delegate is optional I believe it shouldn't crash on this line, so if I put a nil check for delegate here I don't think it will do any good. Is there anyway to identify what could be causing the crash from this log?