Testflight Crash troubleshooting - swift3

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?

Related

SwiftUI runtime crash ONLY IN IOS15 when using compositional layout with a uiviewrepresentable of collectionview

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.

SSL_CTX_new crash only in 32 bit iOS devices with distribution build

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

How to prevent shutdown race conditions with Qt Network classes

We have an OS X C++ application, using Qt 5.5 that provides a simple HTTP server interface. It's essentially similar to the Fortune Server example provided by Qt (http://doc.qt.io/qt-5/qtnetwork-fortuneserver-example.html), but what we're seeing is that occasionally the application is seg faulting upon shutdown, with the following stack trace (thread 6 crashing):
Thread 0:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff8deb4fca __open + 10
Thread 1:: Dispatch queue: com.apple.libdispatch-manager
0 libsystem_kernel.dylib 0x00007fff8deb6232 kevent64 + 10
1 libdispatch.dylib 0x00007fff90f0426e _dispatch_mgr_thread + 52
Thread 2:
0 libsystem_kernel.dylib 0x00007fff8deb594a __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff887833dd start_wqthread + 13
Thread 3:
0 libsystem_kernel.dylib 0x00007fff8deb594a __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff887833dd start_wqthread + 13
Thread 4:
0 libsystem_kernel.dylib 0x00007fff8deb594a __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff887833dd start_wqthread + 13
Thread 5:: Dispatch queue: com.apple.NSXPCConnection.m-user.com.apple.airportd
0 libsystem_platform.dylib 0x00007fff8923378d _os_lock_handoff_lock + 23
1 libobjc.A.dylib 0x00007fff83258906 objc_object::sidetable_clearDeallocating() + 64
2 libobjc.A.dylib 0x00007fff8323e651 objc_destructInstance + 145
3 libobjc.A.dylib 0x00007fff8323e595 object_dispose + 22
4 com.apple.CoreFoundation 0x00007fff84eea448 -[__NSArrayM dealloc] + 376
5 libobjc.A.dylib 0x00007fff8325889c objc_object::sidetable_release(bool) + 236
6 com.apple.Foundation 0x00007fff85747909 -[_NSXPCInterfaceMethodInfo dealloc] + 63
7 libobjc.A.dylib 0x00007fff8325889c objc_object::sidetable_release(bool) + 236
8 com.apple.CoreFoundation 0x00007fff84ed5db0 CFRelease + 304
9 com.apple.CoreFoundation 0x00007fff84ee5b92 __CFBasicHashDrain + 498
10 com.apple.CoreFoundation 0x00007fff84ed5e8e CFRelease + 526
11 com.apple.Foundation 0x00007fff8578dd7a -[NSXPCInterface dealloc] + 28
12 libobjc.A.dylib 0x00007fff8325889c objc_object::sidetable_release(bool) + 236
13 com.apple.Foundation 0x00007fff8578df0c -[NSXPCConnection dealloc] + 281
14 libobjc.A.dylib 0x00007fff8325889c objc_object::sidetable_release(bool) + 236
15 libsystem_blocks.dylib 0x00007fff8d3166e5 _Block_release + 196
16 libdispatch.dylib 0x00007fff90effe73 _dispatch_client_callout + 8
17 libdispatch.dylib 0x00007fff90f035cd _dispatch_queue_drain + 1100
18 libdispatch.dylib 0x00007fff90f03030 _dispatch_queue_invoke + 202
19 libdispatch.dylib 0x00007fff90f02bef _dispatch_root_queue_drain + 463
20 libdispatch.dylib 0x00007fff90f02a1c _dispatch_worker_thread3 + 91
21 libsystem_pthread.dylib 0x00007fff88785a9d _pthread_wqthread + 729
22 libsystem_pthread.dylib 0x00007fff887833dd start_wqthread + 13
Thread 6 Crashed:: Qt bearer thread
0 org.qt-project.QtNetwork 0x0000000100a541cb QNetworkConfigurationManagerPrivate::~QNetworkConfigurationManagerPrivate() + 107
1 org.qt-project.QtNetwork 0x0000000100a5431e QNetworkConfigurationManagerPrivate::~QNetworkConfigurationManagerPrivate() + 14
2 org.qt-project.QtCore 0x0000000100d72427 QObject::event(QEvent*) + 823
3 org.qt-project.QtCore 0x0000000100d49588 QCoreApplication::notify(QObject*, QEvent*) + 104
4 org.qt-project.QtCore 0x0000000100d4a212 QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) + 1058
5 org.qt-project.QtCore 0x0000000100d997db QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 59
6 org.qt-project.QtCore 0x0000000100d46c1c QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 412
7 org.qt-project.QtCore 0x0000000100b9c07e QThread::exec() + 110
8 org.qt-project.QtCore 0x0000000100b9fc02 QThreadPrivate::start(void*) + 338
9 libsystem_pthread.dylib 0x00007fff8878605a _pthread_body + 131
10 libsystem_pthread.dylib 0x00007fff88785fd7 _pthread_start + 176
11 libsystem_pthread.dylib 0x00007fff887833ed thread_start + 13
As you can see, thread 0 is done - we're outside main. I'm sure there's some cleanup code I'm failing to call when we're disposing of our resources, but I don't know what it can be.
Without putting all our source up here, the basic chain of calls were doing is:
class RestServer : public QObject {
RestServer::RestServer() {
_tcpServer = new QTcpServer(this);
}
void RestServer::listen(quint16 port)
{
if (!_tcpServer->listen(QHostAddress::LocalHost, port)) {
LOG_ERROR("RestServer", "Failed to start server at: " << port);
throw std::exception();
}
_portNum = _tcpServer->serverPort();
LOG_INFO("RestServer", "Server is listening at: " << _portNum);
connect(_tcpServer, SIGNAL(newConnection()), this, SLOT(connectSocket()));
}
Then in our test code, we basically do:
void RestAPIServer_test::responseCallback(QNetworkReply *reply)
{
auto response = reply->readAll();
_uri = response;
reply->close();
QCoreApplication::exit();
}
TEST_F(RestAPIServer_test, urlWithPercents)
{
RestServer restServer();
restServer.listen(0);
quint16 port = restServer.serverPort();
// "widget/foo bar.txt"
QUrl serviceUrl(QString("http://localhost:%1/path/?path=widget%2Ffoo%20bar.txt").arg(port));
QNetworkAccessManager networkManager(this);
connect(&networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(responseCallback(QNetworkReply*)));
QNetworkRequest request(serviceUrl);
request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded");
networkManager.get(request);
QCoreApplication::exec();
ASSERT_EQ(QString("path=widget/foo bar.txt"), _uri);
}
It is not safe to instantiate a QObject on stack with a parent. Look at the line
QNetworkAccessManager networkManager(this);
The object would be destroyed twice, which is not possible, so you see the crash. Change that line as follows (of course, the use of variable networkManager must also be updated):
QNetworkAccessManager* networkManager=new QNetworkAccessManager(this);
The problem seemed to be due to some networking-related threads created by Qt still running for a bit after the call to QCoreApplication::quit() was called, probably because the quit() was called from within the callback function registered with the QTcpSocket. The solution was to put a 1-second sleep after the call to exit:
void RestAPIServer_test::responseCallback(QNetworkReply *reply)
{
auto response = reply->readAll();
_uri = response;
reply->close();
QCoreApplication::exit();
// This prevents a shutdown race condition where Qt service
// threads continue to run after the call to exit().
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
}

EXC_BAD_ACCESS - Random AND Incomprehensible

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.

Why is my Qt slot causing my program to crash?

So I've written the following Qt slot definition:
(header)
public slots:
void test1();
(method)
void myClass:test1()
{
//...
}
If I put some code in my slot definition, such as code to display a new window or a new messagebox, the code executes fine. However, if I stick in my own function, such as the following:
QString myClass::run_func(QString phase)
{
myOtherClass* moc = new myOtherClass();
moc->run(phase);
}
void myClass:test1()
{
run_func("hello world");
}
My program crashes, with the following message:
Sleep/Wake UUID: 03C9AE1C-32F3-4F2E-8396-80655C0AE1EA
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000010a08062020
VM Regions Near 0x10a08062020:
CG shared images 00000001c7eb2000-00000001c7eba000 [ 32K] r--/r-- SM=SHM
-->
STACK GUARD 00007fff5bc00000-00007fff5f400000 [ 56.0M] ---/rwx SM=NUL stack guard for thread 0
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 QtCore 0x0000000100d0c344 QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) + 52
1 QtWidgets 0x0000000100040f19 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 281
2 QtWidgets 0x00000001000427b2 QApplication::notify(QObject*, QEvent*) + 1442
3 QtCore 0x0000000100d0c0b2 QCoreApplication::notifyInternal(QObject*, QEvent*) + 114
4 QtWidgets 0x0000000100096344 QWidgetWindow::event(QEvent*) + 212
5 QtWidgets 0x0000000100040f2c QApplicationPrivate::notify_helper(QObject*, QEvent*) + 300
6 QtWidgets 0x0000000100043a1d QApplication::notify(QObject*, QEvent*) + 6157
7 QtCore 0x0000000100d0c0b2 QCoreApplication::notifyInternal(QObject*, QEvent*) + 114
8 QtGui 0x000000010068c9be QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*) + 190
9 QtGui 0x000000010068b5c8 QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) + 840
10 QtGui 0x000000010067b338 QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 136
11 libqcocoa.dylib 0x000000010441a4c7 QCocoaEventDispatcherPrivate::processPostedEvents() + 295
12 libqcocoa.dylib 0x000000010441afd8 QCocoaEventDispatcherPrivate::postedEventsSourceCallback(void*) + 40
13 com.apple.CoreFoundation 0x00007fff89c72731 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
14 com.apple.CoreFoundation 0x00007fff89c63ea2 __CFRunLoopDoSources0 + 242
15 com.apple.CoreFoundation 0x00007fff89c6362f __CFRunLoopRun + 831
16 com.apple.CoreFoundation 0x00007fff89c630b5 CFRunLoopRunSpecific + 309
17 com.apple.HIToolbox 0x00007fff874eea0d RunCurrentEventLoopInMode + 226
18 com.apple.HIToolbox 0x00007fff874ee685 ReceiveNextEventCommon + 173
19 com.apple.HIToolbox 0x00007fff874ee5bc _BlockUntilNextEventMatchingListInModeWithFilter + 65
20 com.apple.AppKit 0x00007fff8e83a3de _DPSNextEvent + 1434
21 com.apple.AppKit 0x00007fff8e839a2b -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 122
22 com.apple.AppKit 0x00007fff8e82db2c -[NSApplication run] + 553
23 libqcocoa.dylib 0x0000000104419d44 QCocoaEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 2404
24 QtCore 0x0000000100d0964d QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 397
25 QtCore 0x0000000100d0c652 QCoreApplication::exec() + 354
26 com.yourcompany.PwrCard 0x0000000100002f8b main + 91 (main.cpp:10)
27 com.yourcompany.PwrCard 0x0000000100002f24 start + 52
Thread 1:
0 libsystem_kernel.dylib 0x00007fff8c4c9e6a __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff900a8f08 _pthread_wqthread + 330
2 libsystem_pthread.dylib 0x00007fff900abfb9 start_wqthread + 13
Thread 2:: Dispatch queue: com.apple.libdispatch-manager
0 libsystem_kernel.dylib 0x00007fff8c4ca662 kevent64 + 10
1 libdispatch.dylib 0x00007fff872d243d _dispatch_mgr_invoke + 239
2 libdispatch.dylib 0x00007fff872d2152 _dispatch_mgr_thread + 52
Thread 3:
0 libsystem_kernel.dylib 0x00007fff8c4c9e6a __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff900a8f08 _pthread_wqthread + 330
2 libsystem_pthread.dylib 0x00007fff900abfb9 start_wqthread + 13
Thread 4:
0 libsystem_kernel.dylib 0x00007fff8c4c9e6a __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff900a8f08 _pthread_wqthread + 330
2 libsystem_pthread.dylib 0x00007fff900abfb9 start_wqthread + 13
Thread 5:
0 libsystem_kernel.dylib 0x00007fff8c4c9e6a __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff900a8f08 _pthread_wqthread + 330
2 libsystem_pthread.dylib 0x00007fff900abfb9 start_wqthread + 13
Thread 6:
0 libsystem_kernel.dylib 0x00007fff8c4c9e6a __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff900a8f08 _pthread_wqthread + 330
2 libsystem_pthread.dylib 0x00007fff900abfb9 start_wqthread + 13
Thread 7:
0 libsystem_kernel.dylib 0x00007fff8c4c9e6a __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff900a8f08 _pthread_wqthread + 330
2 libsystem_pthread.dylib 0x00007fff900abfb9 start_wqthread + 13
Thread 8:
0 libsystem_kernel.dylib 0x00007fff8c4c9e6a __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff900a8f08 _pthread_wqthread + 330
2 libsystem_pthread.dylib 0x00007fff900abfb9 start_wqthread + 13
Thread 9:
0 libsystem_kernel.dylib 0x00007fff8c4c9e6a __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff900a8f08 _pthread_wqthread + 330
2 libsystem_pthread.dylib 0x00007fff900abfb9 start_wqthread + 13
Thread 10:
0 libsystem_kernel.dylib 0x00007fff8c4c5a1a mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff8c4c4d18 mach_msg + 64
2 com.apple.CoreFoundation 0x00007fff89c64155 __CFRunLoopServiceMachPort + 181
3 com.apple.CoreFoundation 0x00007fff89c63779 __CFRunLoopRun + 1161
4 com.apple.CoreFoundation 0x00007fff89c630b5 CFRunLoopRunSpecific + 309
5 com.apple.AppKit 0x00007fff8e9da16e _NSEventThread + 144
6 libsystem_pthread.dylib 0x00007fff900a7899 _pthread_body + 138
7 libsystem_pthread.dylib 0x00007fff900a772a _pthread_start + 137
8 libsystem_pthread.dylib 0x00007fff900abfc9 thread_start + 13
I have my slot linked up with the returnPressed() signal of a lineEdit. I can't figure out for the life of me why this only happens for user-defined functions. Any help would be greatly appreciated. Thanks guys!
Solved it.. run_func has a string return type but didn't actually return a string. Didn't catch this because there wasn't a compile error.