Realm sometimes crashing in background mode - ios

I am using background mode for downloading data from the server and storing it in Realm. I am getting weird crash reports from my users. I attached an example crash log.
private func addParseReportToDb(serverResponses: [AddNewParseReportResponse], trackedProfileRecordId: String) {
let trackedProfile = TrackedProfile.getByPrimaryKey(recordId: trackedProfileRecordId)!
for serverResponse in serverResponses {
let parseReport = ParseReport()
parseReport.biograph = serverResponse.biography
let realm = try! Realm()
try! realm.write({
realm.add(parseReport)
})
createUserFeedWithLatestReports(trackedProfile: trackedProfile)
}
}
Above method is calling from below method:
func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: #escaping (UIBackgroundFetchResult) -> Void) {
let realm = try! Realm()
let tst = Test()
tst.type = "silent"
try! realm.write({
realm.add(tst)
})
let parseService = InstaParseService()
parseService.downloadLatestReports {
parseService.getUsersForFetch { status in
completionHandler(.newData)
}
}
}
parse.downloadLatestReports method calls the addParseReportToDb method.
The crash point is realm.add(parseReport)
As you can see actually I can add another object before adding the parseReport without any problem. Don't know why but that part crashes sometimes.
Crash log:
Incident Identifier: AB7B2EA0-F152-4F60-975E-5AA4FAA2CDFE
Hardware Model: iPhone10,6
Process: Insta Spy [35822]
Path: /private/var/containers/Bundle/Application/8A905DEA-41BF-4CA5-A026-1B7BF98919CC/Insta Spy.app/Insta Spy
Identifier: com.frost.instaspy
Version: 1.0.5 (6)
AppStoreTools: 13F15
AppVariant: 1:iPhone10,6:15
Beta: YES
Code Type: ARM-64 (Native)
Role: unknown
Parent Process: launchd [1]
Coalition: com.frost.instaspy [2476]
Date/Time: 2022-06-11 09:48:00.9830 +0300
Launch Time: 2022-06-11 09:47:58.7865 +0300
OS Version: iPhone OS 15.5 (19F77)
Release Type: User
Baseband Version: 5.03.01
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x18129fd0c __exceptionPreprocess + 216 (NSException.m:200)
1 libobjc.A.dylib 0x198a90ee4 objc_exception_throw + 56 (objc-exception.mm:565)
2 Insta Spy 0x102782e4c RLMAccessorContext::createObject(objc_object*, realm::CreatePolicy, bool, realm::ObjKey) + 1876 (RLMAccessor.mm:1097)
3 Insta Spy 0x1027cb3a8 RLMAddObjectToRealm + 200 (RLMObjectStore.mm:138)
4 Insta Spy 0x102767fb8 partial apply for thunk for #callee_guaranteed () -> (#error #owned Error) + 20 (<compiler-generated>:0)
5 Insta Spy 0x1029329b4 Realm.write<A>(withoutNotifying:_:) + 180 (Realm.swift:255)
6 Insta Spy 0x102767e70 specialized InstaParseService.addParseReportToDb(serverResponses:trackedProfileRecordId:) + 1068 (InstaParseService.swift:108)
7 Insta Spy 0x102764348 closure #1 in InstaParseService.downloadLatestReports(completionHandler:) + 268 (<compiler-generated>:0)
8 PromisedFuture 0x10358a368 closure #1 in Future.execute(onSuccess:onFailure:) + 288 (Future.swift:167)
9 Insta Spy 0x1027011d8 specialized closure #1 in closure #1 in static APIClient.performRequest<A>(route:) + 308
10 Insta Spy 0x102702768 partial apply for specialized closure #1 in closure #1 in static APIClient.performRequest<A>(route:) + 48 (<compiler-generated>:0)
11 Insta Spy 0x102d22e60 partial apply for closure #2 in closure #2 in closure #3 in closure #1 in DownloadRequest.response<A>(queue:responseSerializer:completionHandler:) + 136
12 Insta Spy 0x102cb6c94 thunk for #escaping #callee_guaranteed () -> () + 28 (<compiler-generated>:0)
13 libdispatch.dylib 0x180f5f094 _dispatch_call_block_and_release + 24 (init.c:1517)
14 libdispatch.dylib 0x180f60094 _dispatch_client_callout + 16 (object.m:560)
15 libdispatch.dylib 0x180f41858 _dispatch_main_queue_drain + 888 (inline_internal.h:2622)
16 libdispatch.dylib 0x180f414d0 _dispatch_main_queue_callback_4CF$VARIANT$armv81 + 36 (queue.c:7770)
17 CoreFoundation 0x18125b0c4 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12 (CFRunLoop.c:1795)
18 CoreFoundation 0x1812185e8 __CFRunLoopRun + 2544 (CFRunLoop.c:3144)
19 CoreFoundation 0x18122b240 CFRunLoopRunSpecific + 572 (CFRunLoop.c:3268)
20 GraphicsServices 0x1a1d2d988 GSEventRunModal + 160 (GSEvent.c:2200)
21 UIKitCore 0x183a2b41c -[UIApplication _run] + 1080 (UIApplication.m:3511)
22 UIKitCore 0x1837c4b88 UIApplicationMain + 336 (UIApplication.m:5064)
23 libswiftUIKit.dylib 0x197b7aee4 UIApplicationMain(_:_:_:_:) + 100 (UIKit.swift:530)
24 Insta Spy 0x1026f56f4 main + 80 (<compiler-generated>:14)
25 Insta Spy 0x1026f56f4 $main + 92 (AddTrackedProfileViewModel.swift:0)
26 Insta Spy 0x1026f56f4 main + 108
27 dyld 0x1034f83d0 start + 444 (dyldMain.cpp:879)
Thread 0 name:
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00000001bba8fbbc __pthread_kill + 8
1 libsystem_pthread.dylib 0x00000001dc4e3854 pthread_kill + 208 (pthread.c:1668)
2 libsystem_c.dylib 0x000000018b9d50b0 __abort + 124 (abort.c:155)
3 libsystem_c.dylib 0x000000018b9806b8 abort + 136 (abort.c:126)
4 libc++abi.dylib 0x0000000198b88dd8 abort_message + 128 (abort_message.cpp:78)
5 libc++abi.dylib 0x0000000198b7955c demangling_terminate_handler() + 300 (cxa_default_handlers.cpp:71)
6 libobjc.A.dylib 0x0000000198a968f8 _objc_terminate() + 124 (objc-exception.mm:701)
7 Insta Spy 0x0000000102ef6fec FIRCLSTerminateHandler() + 340 (FIRCLSException.mm:335)
8 libc++abi.dylib 0x0000000198b88274 std::__terminate(void (*)()) + 16 (cxa_handlers.cpp:59)
9 libc++abi.dylib 0x0000000198b8821c std::terminate() + 60 (cxa_handlers.cpp:88)
10 libdispatch.dylib 0x0000000180f600a8 _dispatch_client_callout + 36 (object.m:563)
11 libdispatch.dylib 0x0000000180f41858 _dispatch_main_queue_drain + 888 (inline_internal.h:2622)
12 libdispatch.dylib 0x0000000180f414d0 _dispatch_main_queue_callback_4CF$VARIANT$armv81 + 36 (queue.c:7770)
13 CoreFoundation 0x000000018125b0c4 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12 (CFRunLoop.c:1795)
14 CoreFoundation 0x00000001812185e8 __CFRunLoopRun + 2544 (CFRunLoop.c:3144)
15 CoreFoundation 0x000000018122b240 CFRunLoopRunSpecific + 572 (CFRunLoop.c:3268)
16 GraphicsServices 0x00000001a1d2d988 GSEventRunModal + 160 (GSEvent.c:2200)
17 UIKitCore 0x0000000183a2b41c -[UIApplication _run] + 1080 (UIApplication.m:3511)
18 UIKitCore 0x00000001837c4b88 UIApplicationMain + 336 (UIApplication.m:5064)
19 libswiftUIKit.dylib 0x0000000197b7aee4 UIApplicationMain(_:_:_:_:) + 100 (UIKit.swift:530)
20 Insta Spy 0x00000001026f56f4 main + 80 (<compiler-generated>:14)
21 Insta Spy 0x00000001026f56f4 $main + 92 (AddTrackedProfileViewModel.swift:0)
22 Insta Spy 0x00000001026f56f4 main + 108
23 dyld 0x00000001034f83d0 start + 444 (dyldMain.cpp:879)
Thread 1:
0 libsystem_pthread.dylib 0x00000001dc4d7934 start_wqthread + 0
Thread 2:
0 libsystem_pthread.dylib 0x00000001dc4d7934 start_wqthread + 0
Thread 3:
0 libsystem_pthread.dylib 0x00000001dc4d7934 start_wqthread + 0
Thread 4 name:
Thread 4:
0 libsystem_kernel.dylib 0x00000001bba8b710 fstatat64 + 8
1 libsystem_c.dylib 0x000000018b96f478 _mkpath + 152 (mkpath_np.c:57)
2 Foundation 0x000000018296e770 -[NSFileManager createDirectoryAtPath:withIntermediateDirectories:attributes:error:] + 120 (NSFileManager.m:5356)
3 Insta Spy 0x0000000102c3b2e0 __55-[GDTCORFlatFileStorage hasEventsForTarget:onComplete:]_block_invoke + 184 (GDTCORFlatFileStorage.m:382)
4 libdispatch.dylib 0x0000000180f5f094 _dispatch_call_block_and_release + 24 (init.c:1517)
5 libdispatch.dylib 0x0000000180f60094 _dispatch_client_callout + 16 (object.m:560)
6 libdispatch.dylib 0x0000000180f3b4a4 _dispatch_lane_serial_drain$VARIANT$armv81 + 600 (inline_internal.h:2622)
7 libdispatch.dylib 0x0000000180f3bf44 _dispatch_lane_invoke$VARIANT$armv81 + 388 (queue.c:3944)
8 libdispatch.dylib 0x0000000180f458e0 _dispatch_workloop_worker_thread + 608 (queue.c:6732)
9 libsystem_pthread.dylib 0x00000001dc4d7e10 _pthread_wqthread + 284 (pthread.c:2599)
10 libsystem_pthread.dylib 0x00000001dc4d793c start_wqthread + 8
Thread 5:
0 libsystem_pthread.dylib 0x00000001dc4d7934 start_wqthread + 0
Thread 6 name:
Thread 6:
0 libsystem_kernel.dylib 0x00000001bba89aac mach_msg_trap + 8
1 libsystem_kernel.dylib 0x00000001bba8a07c mach_msg + 72 (mach_msg.c:119)
2 CoreFoundation 0x0000000181213d78 __CFRunLoopServiceMachPort + 368 (CFRunLoop.c:2646)
3 CoreFoundation 0x0000000181218080 __CFRunLoopRun + 1160 (CFRunLoop.c:3000)
4 CoreFoundation 0x000000018122b240 CFRunLoopRunSpecific + 572 (CFRunLoop.c:3268)
5 Foundation 0x0000000182938efc -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 232 (NSRunLoop.m:373)
6 Foundation 0x0000000182978010 -[NSRunLoop(NSRunLoop) runUntilDate:] + 88 (NSRunLoop.m:420)
7 UIKitCore 0x00000001839aa86c -[UIEventFetcher threadMain] + 512 (UIEventFetcher.m:1167)
8 Foundation 0x0000000182985c0c __NSThread__start__ + 792 (NSThread.m:972)
9 libsystem_pthread.dylib 0x00000001dc4d9348 _pthread_start + 116 (pthread.c:891)
10 libsystem_pthread.dylib 0x00000001dc4d7948 thread_start + 8
Thread 7 name:
Thread 7:
0 libsystem_kernel.dylib 0x00000001bba89aac mach_msg_trap + 8
1 libsystem_kernel.dylib 0x00000001bba8a07c mach_msg + 72 (mach_msg.c:119)
2 Insta Spy 0x0000000102ef83f8 FIRCLSMachExceptionReadMessage + 60 (FIRCLSMachException.c:194)
3 Insta Spy 0x0000000102ef83f8 FIRCLSMachExceptionServer + 108 (FIRCLSMachException.c:170)
4 libsystem_pthread.dylib 0x00000001dc4d9348 _pthread_start + 116 (pthread.c:891)
5 libsystem_pthread.dylib 0x00000001dc4d7948 thread_start + 8
Thread 8 name:
Thread 8:
0 libsystem_kernel.dylib 0x00000001bba8b294 kevent + 8
1 Insta Spy 0x0000000102a2f218 realm::_impl::ExternalCommitHelper::listen() + 160 (external_commit_helper.cpp:220)
2 Insta Spy 0x0000000102a2fbdc operator() + 4 (external_commit_helper.cpp:176)
3 Insta Spy 0x0000000102a2fbdc _invoke<(lambda at /Users/tolgaytoklar/Library/Developer/Xcode/DerivedData/Insta_Spy-efuqnbeotewvyncxwyoycmcgayra/SourcePackages/checkouts/realm-core/src/realm/object-store/impl/apple/external_comm... + 4 (type_traits:3918)
4 Insta Spy 0x0000000102a2fbdc _thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, (lambda at /Users/tolgaytoklar/Library/Developer/Xcode/DerivedData/Insta_Spy-e... + 4 (thread:287)
5 Insta Spy 0x0000000102a2fbdc void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, realm::_impl::ExternalCommitHelper::ExternalCom... + 52 (thread:298)
6 libsystem_pthread.dylib 0x00000001dc4d9348 _pthread_start + 116 (pthread.c:891)
7 libsystem_pthread.dylib 0x00000001dc4d7948 thread_start + 8
Thread 9 name:
Thread 9:
0 libsystem_kernel.dylib 0x00000001bba89aac mach_msg_trap + 8
1 libsystem_kernel.dylib 0x00000001bba8a07c mach_msg + 72 (mach_msg.c:119)
2 CoreFoundation 0x0000000181213d78 __CFRunLoopServiceMachPort + 368 (CFRunLoop.c:2646)
3 CoreFoundation 0x0000000181218080 __CFRunLoopRun + 1160 (CFRunLoop.c:3000)
4 CoreFoundation 0x000000018122b240 CFRunLoopRunSpecific + 572 (CFRunLoop.c:3268)
5 CFNetwork 0x0000000181c30b08 +[__CFN_CoreSchedulingSetRunnable _run:] + 428 (CoreSchedulingSet.mm:1372)
6 Foundation 0x0000000182985c0c __NSThread__start__ + 792 (NSThread.m:972)
7 libsystem_pthread.dylib 0x00000001dc4d9348 _pthread_start + 116 (pthread.c:891)
8 libsystem_pthread.dylib 0x00000001dc4d7948 thread_start + 8
Thread 10:
0 libsystem_pthread.dylib 0x00000001dc4d7934 start_wqthread + 0
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0x0000000000000000
x4: 0x0000000000000000 x5: 0x0000000000989680 x6: 0x000000000000006e x7: 0xffffffff00000900
x8: 0x0000000103548580 x9: 0xd1fb99cae63401f2 x10: 0x00000000000003e8 x11: 0x000000000000000b
x12: 0x0000000000000000 x13: 0x0000000008a2f000 x14: 0x0000000000000010 x15: 0x0000000000000000
x16: 0x0000000000000148 x17: 0x0000000000000002 x18: 0x0000000000000000 x19: 0x0000000000000006
x20: 0x0000000000000103 x21: 0x0000000103548660 x22: 0x0000000000000007 x23: 0x0000000103048472
x24: 0x0000000000000000 x25: 0x0000000103548660 x26: 0x000000000000000f x27: 0x0000000000000000
x28: 0x00000002834a2280 fp: 0x000000016d70e290 lr: 0x00000001dc4e3854
sp: 0x000000016d70e270 pc: 0x00000001bba8fbbc cpsr: 0x40000000
esr: 0x56000080 Address size fault
Binary Images:
0x1026f0000 - 0x10316ffff Insta Spy arm64 <c7b80223ca0c30759a16544c17251c9b> /private/var/containers/Bundle/Application/8A905DEA-41BF-4CA5-A026-1B7BF98919CC/Insta Spy.app/Insta Spy
0x1034e0000 - 0x103533fff dyld arm64 <0912a37c959234f1938ffdbcfcd1cf2f> /usr/lib/dyld
0x103584000 - 0x10358bfff PromisedFuture arm64 <e1670c2d528c33f49d1cad6e42bdfe69> /private/var/containers/Bundle/Application/8A905DEA-41BF-4CA5-A026-1B7BF98919CC/Insta Spy.app/Frameworks/PromisedFuture.framework/PromisedFuture
0x180efc000 - 0x180f7efff libdispatch.dylib arm64 <f87efead673b3a09b7ab9c69b55a18a8> /usr/lib/system/libdispatch.dylib
0x18120d000 - 0x18164afff CoreFoundation arm64 <48cd0a807a9234ebb1408c475d135808> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
0x1819e9000 - 0x181e79fff CFNetwork arm64 <f154f6f6f7693743a48fc4828dca4e3c> /System/Library/Frameworks/CFNetwork.framework/CFNetwork
0x182921000 - 0x182c05fff Foundation arm64 <3cb1645d719b332f9a3a9c33a9bb4b6d> /System/Library/Frameworks/Foundation.framework/Foundation
0x183546000 - 0x184cdffff UIKitCore arm64 <a84e395e0b003162b1fdb861ce41349c> /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore
0x18b961000 - 0x18b9dcfff libsystem_c.dylib arm64 <929b8c7cb9523971a688c9c4aaf0f2b6> /usr/lib/system/libsystem_c.dylib
0x197b53000 - 0x197bb2fff libswiftUIKit.dylib arm64 <ade66154967a329d839ca3a65912d3b9> /usr/lib/swift/libswiftUIKit.dylib
0x198a7c000 - 0x198ab3fff libobjc.A.dylib arm64 <57ca31b758ea36d6a442728888f336ec> /usr/lib/libobjc.A.dylib
0x198b78000 - 0x198b8efff libc++abi.dylib arm64 <f886a31d5e493b6aa361a07fedecec59> /usr/lib/libc++abi.dylib
0x1a1d2c000 - 0x1a1d34fff GraphicsServices arm64 <996d6fdae7883abeb6d6ad8e0f4cc881> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
0x1bba89000 - 0x1bbabcfff libsystem_kernel.dylib arm64 <09e1dcdbe2c93f7ebbfc96dec6c161da> /usr/lib/system/libsystem_kernel.dylib
0x1dc4d6000 - 0x1dc4e6fff libsystem_pthread.dylib arm64 <5190be2141d433619249bfdc03b71e36> /usr/lib/system/libsystem_pthread.dylib
EOF

Related

Adding Camera Causes Crash on iPhone X

I'm getting reports of a crash in my camera-based app, but it seems to only be happening on iPhone X.
I can't understand why this is happening. The documentation for the function triggering the crash makes no mention of any exceptions that would be thrown and I can't find anything different about the iPhone X's camera compared to other devices. Any help will be appreciated!
This is the relevant code:
guard let camera = AVCaptureDevice.default(.builtInWideAngleCamera, for: .video, position: .back) else {
print("no camera")
return nil
}
let deviceInput: AVCaptureDeviceInput
do {
deviceInput = try AVCaptureDeviceInput(device: camera)
session.addInputWithNoConnections(deviceInput)
} catch {
print("no front input: \(error)")
return nil
}
// CRASH HAPPENS HERE
guard let videoPort = deviceInput.ports(for: .video, sourceDeviceType: camera.deviceType, sourceDevicePosition: camera.position).first else {
print("no front camera device input's video port")
return nil
}
This is the symbolicated crash log (CameraManager.addCamera is the function containing the above code and the referenced line (117) is the guard let videoPort = ... crash location pointed out above):
Incident Identifier: ACA6411C-1323-4857-957E-613433C7C2AC
CrashReporter Key: 9898af27a5a7d0054c20dc251e2ccb4ed398b551
Hardware Model: iPhone10,6
Process: Maloufie [869]
Path: /private/var/containers/Bundle/Application/DD268152-6131-4F0A-A895-F3C07ECDF17A/Maloufie.app/Maloufie
Identifier: com.dylan.Maloufie
Version: 1.3 (1)
AppStoreTools: 14A305
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: com.dylan.Maloufie [766]
Date/Time: 2022-10-17 06:20:19.4589 -0700
Launch Time: 2022-10-17 06:20:19.3621 -0700
OS Version: iPhone OS 16.0.3 (20A392)
Release Type: User
Baseband Version: 5.03.01
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 1
Application Specific Information:
abort() called
Last Exception Backtrace:
0 CoreFoundation 0x1c085adb4 __exceptionPreprocess + 160
1 libobjc.A.dylib 0x1bece59a0 objc_exception_throw + 56
2 AVFCapture 0x1dcd729dc -[AVCaptureFigVideoDevice setExposureMode:] + 0
3 Maloufie 0x1040f85f4 CameraManager.addCamera(_:) + 67060 (CameraManager.swift:117)
4 Maloufie 0x1040f8100 closure #1 in CameraManager.configure() + 65792 (CameraManager.swift:98)
5 Maloufie 0x1040f0a9c thunk for #escaping #callee_guaranteed () -> () + 35484 (<compiler-generated>:0)
6 libdispatch.dylib 0x1cc3f2850 _dispatch_call_block_and_release + 24
7 libdispatch.dylib 0x1cc3f37c8 _dispatch_client_callout + 16
8 libdispatch.dylib 0x1cc3ce854 _dispatch_lane_serial_drain$VARIANT$armv81 + 604
9 libdispatch.dylib 0x1cc3cf2e4 _dispatch_lane_invoke$VARIANT$armv81 + 380
10 libdispatch.dylib 0x1cc3d9000 _dispatch_workloop_worker_thread + 612
11 libsystem_pthread.dylib 0x20c90cb50 _pthread_wqthread + 284
12 libsystem_pthread.dylib 0x20c90c67c start_wqthread + 8
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0:
0 SwiftUI 0x1c9f7b7d4 0x1c8df5000 + 18376660
1 SwiftUI 0x1c9f75568 0x1c8df5000 + 18351464
2 SwiftUI 0x1c9f7aa64 0x1c8df5000 + 18373220
3 SwiftUI 0x1c8f06e50 0x1c8df5000 + 1121872
4 SwiftUI 0x1c9f74e68 0x1c8df5000 + 18349672
5 SwiftUI 0x1c8dfa078 0x1c8df5000 + 20600
6 SwiftUI 0x1c9aceb70 0x1c8df5000 + 13474672
7 SwiftUI 0x1c9579d44 0x1c8df5000 + 7884100
8 SwiftUI 0x1c8e1e784 0x1c8df5000 + 169860
9 SwiftUI 0x1c8e4de4c 0x1c8df5000 + 364108
10 SwiftUI 0x1c8e2550c 0x1c8df5000 + 197900
11 SwiftUI 0x1c8e4dc44 0x1c8df5000 + 363588
12 SwiftUI 0x1c8e2550c 0x1c8df5000 + 197900
13 SwiftUI 0x1c9ace8c0 0x1c8df5000 + 13473984
14 SwiftUI 0x1c9ace700 0x1c8df5000 + 13473536
15 SwiftUI 0x1c9be1d74 0x1c8df5000 + 14601588
16 SwiftUI 0x1c9423d48 0x1c8df5000 + 6483272
17 SwiftUI 0x1c9425f6c 0x1c8df5000 + 6492012
18 SwiftUI 0x1c8eab868 0x1c8df5000 + 747624
19 SwiftUI 0x1c8fce550 0x1c8df5000 + 1938768
20 UIKitCore 0x1c7769478 +[UIView(Animation) performWithoutAnimation:] + 68
21 SwiftUI 0x1c8e4b8e4 0x1c8df5000 + 354532
22 SwiftUI 0x1c8e0f98c 0x1c8df5000 + 108940
23 SwiftUI 0x1c8ea085c 0x1c8df5000 + 702556
24 SwiftUI 0x1c8e1f644 0x1c8df5000 + 173636
25 SwiftUI 0x1c8e22968 0x1c8df5000 + 186728
26 UIKitCore 0x1c773ea58 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1920
27 QuartzCore 0x1c6c63a60 CA::Layer::layout_if_needed(CA::Transaction*) + 496
28 QuartzCore 0x1c6c764cc CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 144
29 QuartzCore 0x1c6c870bc CA::Context::commit_transaction(CA::Transaction*, double, double*) + 464
30 QuartzCore 0x1c6cbb58c CA::Transaction::commit() + 652
31 UIKitCore 0x1c7b9656c __34-[UIApplication _firstCommitBlock]_block_invoke_2 + 32
32 CoreFoundation 0x1c089162c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 20
33 CoreFoundation 0x1c08f51a8 __CFRunLoopDoBlocks + 364
34 CoreFoundation 0x1c08c8244 __CFRunLoopRun + 800
35 CoreFoundation 0x1c08ccdfc CFRunLoopRunSpecific + 584
36 GraphicsServices 0x1fa782984 GSEventRunModal + 160
37 UIKitCore 0x1c7ab0e7c -[UIApplication _run] + 868
38 UIKitCore 0x1c7ab0af4 UIApplicationMain + 312
39 SwiftUI 0x1c8f90940 0x1c8df5000 + 1685824
40 SwiftUI 0x1c8f03ba0 0x1c8df5000 + 1108896
41 SwiftUI 0x1c8ef000c 0x1c8df5000 + 1028108
42 Maloufie 0x1040efaf4 main + 31476 (DefaultsStore.swift:0)
43 dyld 0x1e1f8ade0 start + 2080
Thread 1 name: Dispatch queue: com.dylan.SessionQ
Thread 1 Crashed:
0 libsystem_kernel.dylib 0x1fdd4c2f4 __pthread_kill + 8
1 libsystem_pthread.dylib 0x20c918654 pthread_kill + 208
2 libsystem_c.dylib 0x1cc432e9c abort + 124
3 libc++abi.dylib 0x20c852dec abort_message + 128
4 libc++abi.dylib 0x20c84365c demangling_terminate_handler() + 300
5 libobjc.A.dylib 0x1beceb1c4 _objc_terminate() + 124
6 libc++abi.dylib 0x20c852288 std::__terminate(void (*)()) + 16
7 libc++abi.dylib 0x20c852230 std::terminate() + 52
8 libdispatch.dylib 0x1cc3f37dc _dispatch_client_callout + 36
9 libdispatch.dylib 0x1cc3ce854 _dispatch_lane_serial_drain$VARIANT$armv81 + 604
10 libdispatch.dylib 0x1cc3cf2e4 _dispatch_lane_invoke$VARIANT$armv81 + 380
11 libdispatch.dylib 0x1cc3d9000 _dispatch_workloop_worker_thread + 612
12 libsystem_pthread.dylib 0x20c90cb50 _pthread_wqthread + 284
13 libsystem_pthread.dylib 0x20c90c67c start_wqthread + 8
Thread 2:
0 libsystem_pthread.dylib 0x20c90c674 start_wqthread + 0
Thread 3:
0 libsystem_pthread.dylib 0x20c90c674 start_wqthread + 0
Thread 4:
0 libsystem_pthread.dylib 0x20c90c674 start_wqthread + 0
Thread 5 name: com.apple.uikit.eventfetch-thread
Thread 5:
0 libsystem_kernel.dylib 0x1fdd46194 mach_msg2_trap + 8
1 libsystem_kernel.dylib 0x1fdd57a08 mach_msg2_internal + 76
2 libsystem_kernel.dylib 0x1fdd57c44 mach_msg_overwrite + 384
3 libsystem_kernel.dylib 0x1fdd46688 mach_msg + 20
4 CoreFoundation 0x1c08c7244 __CFRunLoopServiceMachPort + 156
5 CoreFoundation 0x1c08c83f4 __CFRunLoopRun + 1232
6 CoreFoundation 0x1c08ccdfc CFRunLoopRunSpecific + 584
7 Foundation 0x1bfc2f3fc -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 208
8 Foundation 0x1bfc2f2f8 -[NSRunLoop(NSRunLoop) runUntilDate:] + 60
9 UIKitCore 0x1c7bd56d0 -[UIEventFetcher threadMain] + 424
10 Foundation 0x1bfc46f44 __NSThread__start__ + 704
11 libsystem_pthread.dylib 0x20c90e060 _pthread_start + 116
12 libsystem_pthread.dylib 0x20c90c688 thread_start + 8
Thread 6:
0 libsystem_pthread.dylib 0x20c90c674 start_wqthread + 0
Thread 7:
0 libsystem_pthread.dylib 0x20c90c674 start_wqthread + 0
Thread 8:
0 libsystem_pthread.dylib 0x20c90c674 start_wqthread + 0
Thread 1 crashed with ARM Thread State (64-bit):
x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0x0000000000000000
x4: 0x000000020c855ea1 x5: 0x000000016bd9e430 x6: 0x000000000000006e x7: 0xffffffff00000400
x8: 0x000000016bd9f000 x9: 0x3c7ae18321bb5c99 x10: 0x0000000000000200 x11: 0x000000000000000b
x12: 0x000000000000000b x13: 0x0000000000000000 x14: 0x0000000000000010 x15: 0x0000000000000000
x16: 0x0000000000000148 x17: 0x0000000000000002 x18: 0x0000000000000000 x19: 0x0000000000000006
x20: 0x0000000000000f0b x21: 0x000000016bd9f0e0 x22: 0x000000016bd9f0e0 x23: 0x0000000000000000
x24: 0x0000000000000000 x25: 0x0000000282d442e8 x26: 0x0000000000000000 x27: 0x0000000000000114
x28: 0x0000000281650a80 fp: 0x000000016bd9e3a0 lr: 0x000000020c918654
sp: 0x000000016bd9e380 pc: 0x00000001fdd4c2f4 cpsr: 0x40000000
far: 0x000000021c514430 esr: 0x56000080 Address size fault
Binary Images:
0x1c8df5000 - 0x1ca2dffff SwiftUI arm64 <03f678aed39a3db88001f994dd375024> /System/Library/Frameworks/SwiftUI.framework/SwiftUI
0x1c773a000 - 0x1c8df4fff UIKitCore arm64 <0a5f2ff1a67f3263bafc1224b1501a17> /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore
0x1c6c5a000 - 0x1c6f86fff QuartzCore arm64 <27270b31fdb434b8acde7a118d9f3c5b> /System/Library/Frameworks/QuartzCore.framework/QuartzCore
0x1c0851000 - 0x1c0c1cfff CoreFoundation arm64 <5f4831c9494934eab3733f45c312b753> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
0x1fa781000 - 0x1fa789fff GraphicsServices arm64 <df370b2c9baa33c8ba00b54d2f4538dc> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
0x1040e8000 - 0x1040fffff Maloufie arm64 <b17c7c22b5e639be9a8421e1233c7121> /private/var/containers/Bundle/Application/DD268152-6131-4F0A-A895-F3C07ECDF17A/Maloufie.app/Maloufie
0x1e1f77000 - 0x1e1ff0dcb dyld arm64 <761f47f5a57031c3ac49af3ded335020> /usr/lib/dyld
0x1fdd45000 - 0x1fdd7afef libsystem_kernel.dylib arm64 <146974c516ed354ab334ee8730c3b715> /usr/lib/system/libsystem_kernel.dylib
0x20c90b000 - 0x20c91bfff libsystem_pthread.dylib arm64 <ad80420a2ce3395ebfe7386912138296> /usr/lib/system/libsystem_pthread.dylib
0x1cc413000 - 0x1cc48efff libsystem_c.dylib arm64 <637814c516103a04b2544eb2b26b750b> /usr/lib/system/libsystem_c.dylib
0x20c842000 - 0x20c858ffb libc++abi.dylib arm64 <b2aff428242e3f0e99621ca63ca8fa10> /usr/lib/libc++abi.dylib
0x1becd0000 - 0x1bed0ac9f libobjc.A.dylib arm64 <661c3febed903377864fe35f30e1e644> /usr/lib/libobjc.A.dylib
0x1cc38f000 - 0x1cc412fff libdispatch.dylib arm64 <abe14ca70020314dbba65f92f0bbb1c4> /usr/lib/system/libdispatch.dylib
0x1bfbf1000 - 0x1c049dfff Foundation arm64 <0b0d93617efa31da95246f4a7412b618> /System/Library/Frameworks/Foundation.framework/Foundation
0x1dcd3e000 - 0x1dce30fff AVFCapture arm64 <212ca108e55d3a429861cd676dede25d> /System/Library/PrivateFrameworks/AVFCapture.framework/AVFCapture
EOF

Difference between Device in Xcode Organizer and Hardware Model in symbolicated crash report

I recently released an app update on app store. And there have been some crashes reported which I am able to view in Xcode Organizer window under Crashes section. However, I see there is a discrepancy between Device name mentioned in Xcode Organizer and Hardware Model when I open the locally symoblicated crash report from Finder window.
As seen in the above screenshot, Device in Organizer window is shown as iPhone 4.
Incident Identifier: 5A59A68B-7A0D-491B-865A-C37D5C9BA122
Hardware Model: iPhone12,5
Process: My_App [15568]
Path: /private/var/containers/Bundle/Application/212B5311-CCE3-46F1-9F94-11BB09B4391D/My_App.app/My_App
Identifier: com.MyApp
Version: 4.0.0 (4.0.0.8)
AppStoreTools: 13A1030d
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: com.MyApp [3842]
Date/Time: 2022-01-11 10:46:03.1159 -0500
Launch Time: 2022-01-11 10:45:50.4872 -0500
OS Version: iPhone OS 15.2 (19C56)
Release Type: User
Baseband Version: 3.01.02
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 6
Last Exception Backtrace:
0 CoreFoundation 0x1817850fc __exceptionPreprocess + 220 (NSException.m:200)
1 libobjc.A.dylib 0x199fc0d64 objc_exception_throw + 60 (objc-exception.mm:565)
2 AVFCapture 0x1a0171d8c -[AVCaptureSession startRunning] + 308 (AVCaptureSession.m:1935)
3 My_App 0x104d2acc0 closure #1 in closure #1 in CameraScanner.startCapturing() + 592 (CameraScanner.swift:207)
4 My_App 0x104d2a94c closure #1 in CameraScanner.startCapturing() + 172 (VideoPermission.swift:17)
5 My_App 0x104d28ac0 thunk for #escaping #callee_guaranteed () -> () + 20 (<compiler-generated>:0)
6 libdispatch.dylib 0x1813f5924 _dispatch_call_block_and_release + 32 (init.c:1517)
7 libdispatch.dylib 0x1813f7670 _dispatch_client_callout + 20 (object.m:560)
8 libdispatch.dylib 0x1813fedf4 _dispatch_lane_serial_drain + 672 (inline_internal.h:2601)
9 libdispatch.dylib 0x1813ff968 _dispatch_lane_invoke + 392 (queue.c:3937)
10 libdispatch.dylib 0x18140a1b8 _dispatch_workloop_worker_thread + 656 (queue.c:6727)
11 libsystem_pthread.dylib 0x1f21570f4 _pthread_wqthread + 288 (pthread.c:2599)
12 libsystem_pthread.dylib 0x1f2156e94 start_wqthread + 8
Thread 0 name:
Thread 0:
0 libsystem_kernel.dylib 0x00000001b8cb9504 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x00000001b8cb9b9c mach_msg + 76 (mach_msg.c:119)
2 CoreFoundation 0x00000001816f3738 __CFRunLoopServiceMachPort + 372 (CFRunLoop.c:2646)
3 CoreFoundation 0x00000001816f7a2c __CFRunLoopRun + 1212 (CFRunLoop.c:3000)
4 CoreFoundation 0x000000018170b468 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
5 AVFCore 0x000000018ab70d8c -[AVRunLoopCondition _waitInMode:untilDate:] + 412 (AVRunLoopCondition.m:174)
6 AVFCapture 0x00000001a01ea958 -[AVCaptureSession _buildAndRunGraph:] + 1168 (AVCaptureSession.m:3065)
7 AVFCapture 0x00000001a01617d4 -[AVCaptureSession _commitConfiguration] + 148 (AVCaptureSession.m:1012)
8 Foundation 0x0000000182f410dc NSKeyValueNotifyObserver + 292 (NSKeyValueObserving.m:433)
9 Foundation 0x0000000182f2cda0 NSKeyValueDidChange + 356 (NSKeyValueObserving.m:552)
10 Foundation 0x0000000182f66518 NSKeyValueDidChangeWithPerThreadPendingNotifications + 160 (NSKeyValueObserving.m:1209)
11 My_App 0x0000000104d2adc0 closure #1 in CameraScanner.configureWorkItem() + 100 (CameraScanner.swift:192)
12 My_App 0x0000000104d28ac0 thunk for #escaping #callee_guaranteed () -> () + 20 (<compiler-generated>:0)
13 libdispatch.dylib 0x0000000181406454 _dispatch_block_async_invoke2 + 148 (queue.c:548)
14 libdispatch.dylib 0x00000001813f7670 _dispatch_client_callout + 20 (object.m:560)
15 libdispatch.dylib 0x0000000181405b70 _dispatch_main_queue_callback_4CF + 944 (inline_internal.h:2601)
16 CoreFoundation 0x000000018173dd84 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 (CFRunLoop.c:1795)
17 CoreFoundation 0x00000001816f7f5c __CFRunLoopRun + 2540 (CFRunLoop.c:3144)
18 CoreFoundation 0x000000018170b468 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
19 GraphicsServices 0x000000019d29738c GSEventRunModal + 164 (GSEvent.c:2200)
20 UIKitCore 0x00000001840ad088 -[UIApplication _run] + 1100 (UIApplication.m:3493)
21 UIKitCore 0x0000000183e2b958 UIApplicationMain + 2092 (UIApplication.m:5046)
22 My_App 0x0000000104c56034 main + 68 (LAContextExtension.swift:12)
23 dyld 0x0000000104fa5aa4 start + 520 (dyldMain.cpp:879)
Thread 1:
0 libsystem_pthread.dylib 0x00000001f2156e8c start_wqthread + 0
Thread 2 name:
Thread 2:
0 libsqlite3.dylib 0x00000001a0080294 tokenExpr + 268 (sqlite3.c:0)
1 libsqlite3.dylib 0x00000001a0080204 tokenExpr + 124 (sqlite3.c:165844)
2 libsqlite3.dylib 0x000000019ffb5254 yy_reduce + 2448 (sqlite3.c:169951)
3 libsqlite3.dylib 0x000000019ffb38ec sqlite3RunParser + 796 (sqlite3.c:170882)
4 libsqlite3.dylib 0x000000019ffb2f80 sqlite3Prepare + 432 (sqlite3.c:139396)
5 libsqlite3.dylib 0x000000019ffb2c24 sqlite3LockAndPrepare + 244 (sqlite3.c:139474)
6 My_App 0x0000000104db66dc -[APMSqliteStore prepareSQL:error:] + 236
7 My_App 0x0000000104db72e8 -[APMSqliteStore upsertStatementForRecord:inTableWithName:error:] + 572
8 My_App 0x0000000104db4dec -[APMSqliteStore upsertRecord:inTableWithName:error:] + 200
9 My_App 0x0000000104d5464c -[APMDatabase insertDataType:inTableWithName:error:] + 144
10 My_App 0x0000000104d4a050 -[APMDatabase insertRawEvent:metadataFingerprint:isRealtime:error:] + 684
11 My_App 0x0000000104d7bc90 -[APMMeasurement+ 1244304 (Event) writeEvent:isPublicEvent:isRealtime:] + 1944
12 My_App 0x0000000104d78fa8 __49-[APMMeasurement+ 1232808 (Event) writeEventOnWorkerQueue:]_block_invoke + 604
13 My_App 0x0000000104db6110 -[APMSqliteStore performTransactionWithError:block:] + 176
14 My_App 0x0000000104d488d4 -[APMDatabase performTransaction:] + 48
15 My_App 0x0000000104d78c6c -[APMMeasurement+ 1231980 (Event) writeEventOnWorkerQueue:] + 820
16 My_App 0x0000000104d787c8 -[APMMeasurement+ 1230792 (Event) handleEventOnWorkerQueue:] + 540
17 My_App 0x0000000104d86bfc -[APMMeasurement logEventOnWorkerQueue:notifyEventListeners:] + 76
18 My_App 0x0000000104d86bac -[APMMeasurement logEventOnWorkerQueueWithOrigin:isPublicEvent:name:parameters:timestamp:enabled:ignoreEnabled:ignoreInterceptor:interceptor:addedScreenParameters:] + 708
19 My_App 0x0000000104d86840 __151-[APMMeasurement logEventWithOrigin:isPublicEvent:name:parameters:timestamp:enabled:ignoreEnabled:ignoreInterceptor:interceptor:addedScreenParameters:]_block_invoke + 68
20 My_App 0x0000000104dab210 __51-[APMScheduler scheduleOnWorkerQueueBlockID:block:]_block_invoke + 44
21 libdispatch.dylib 0x00000001813f5924 _dispatch_call_block_and_release + 32 (init.c:1517)
22 libdispatch.dylib 0x00000001813f7670 _dispatch_client_callout + 20 (object.m:560)
23 libdispatch.dylib 0x00000001813fedf4 _dispatch_lane_serial_drain + 672 (inline_internal.h:2601)
24 libdispatch.dylib 0x00000001813ff968 _dispatch_lane_invoke + 392 (queue.c:3937)
25 libdispatch.dylib 0x000000018140a1b8 _dispatch_workloop_worker_thread + 656 (queue.c:6727)
26 libsystem_pthread.dylib 0x00000001f21570f4 _pthread_wqthread + 288 (pthread.c:2599)
27 libsystem_pthread.dylib 0x00000001f2156e94 start_wqthread + 8
Thread 3:
0 libsystem_pthread.dylib 0x00000001f2156e8c start_wqthread + 0
Thread 4 name:
Thread 4:
0 libsystem_kernel.dylib 0x00000001b8cb9504 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x00000001b8cb9b9c mach_msg + 76 (mach_msg.c:119)
2 CoreFoundation 0x00000001816f3738 __CFRunLoopServiceMachPort + 372 (CFRunLoop.c:2646)
3 CoreFoundation 0x00000001816f7a2c __CFRunLoopRun + 1212 (CFRunLoop.c:3000)
4 CoreFoundation 0x000000018170b468 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
5 Foundation 0x0000000182f27c94 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 236 (NSRunLoop.m:373)
6 Foundation 0x0000000182f68dc8 -[NSRunLoop(NSRunLoop) runUntilDate:] + 92 (NSRunLoop.m:420)
7 UIKitCore 0x0000000184026230 -[UIEventFetcher threadMain] + 524 (UIEventFetcher.m:1167)
8 Foundation 0x0000000182f7740c __NSThread__start__ + 808 (NSThread.m:972)
9 libsystem_pthread.dylib 0x00000001f21579a4 _pthread_start + 148 (pthread.c:891)
10 libsystem_pthread.dylib 0x00000001f2156ea0 thread_start + 8
Thread 5:
0 libsystem_pthread.dylib 0x00000001f2156e8c start_wqthread + 0
Thread 6 name:
Thread 6 Crashed:
0 libsystem_kernel.dylib 0x00000001b8cbf964 __pthread_kill + 8
1 libsystem_pthread.dylib 0x00000001f215d378 pthread_kill + 268 (pthread.c:1668)
2 libsystem_c.dylib 0x000000018c648f50 abort + 164 (abort.c:118)
3 libc++abi.dylib 0x000000019a0c8bc4 abort_message + 132 (abort_message.cpp:78)
4 libc++abi.dylib 0x000000019a0b9fd8 demangling_terminate_handler() + 332 (cxa_default_handlers.cpp:71)
5 libobjc.A.dylib 0x0000000199fc6e34 _objc_terminate() + 144 (objc-exception.mm:701)
6 libc++abi.dylib 0x000000019a0c7f58 std::__terminate(void (*)()) + 20 (cxa_handlers.cpp:59)
7 libc++abi.dylib 0x000000019a0c7ef4 std::terminate() + 64 (cxa_handlers.cpp:88)
8 libdispatch.dylib 0x00000001813f7684 _dispatch_client_callout + 40 (object.m:563)
9 libdispatch.dylib 0x00000001813fedf4 _dispatch_lane_serial_drain + 672 (inline_internal.h:2601)
10 libdispatch.dylib 0x00000001813ff968 _dispatch_lane_invoke + 392 (queue.c:3937)
11 libdispatch.dylib 0x000000018140a1b8 _dispatch_workloop_worker_thread + 656 (queue.c:6727)
12 libsystem_pthread.dylib 0x00000001f21570f4 _pthread_wqthread + 288 (pthread.c:2599)
13 libsystem_pthread.dylib 0x00000001f2156e94 start_wqthread + 8
Thread 7:
0 libsystem_pthread.dylib 0x00000001f2156e8c start_wqthread + 0
Thread 8 name:
Thread 8:
0 libsystem_kernel.dylib 0x00000001b8cb9504 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x00000001b8cb9b9c mach_msg + 76 (mach_msg.c:119)
2 CoreFoundation 0x00000001816f3738 __CFRunLoopServiceMachPort + 372 (CFRunLoop.c:2646)
3 CoreFoundation 0x00000001816f7a2c __CFRunLoopRun + 1212 (CFRunLoop.c:3000)
4 CoreFoundation 0x000000018170b468 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
5 CFNetwork 0x000000018217f3f0 +[__CFN_CoreSchedulingSetRunnable _run:] + 464 (CoreSchedulingSet.mm:1372)
6 Foundation 0x0000000182f7740c __NSThread__start__ + 808 (NSThread.m:972)
7 libsystem_pthread.dylib 0x00000001f21579a4 _pthread_start + 148 (pthread.c:891)
8 libsystem_pthread.dylib 0x00000001f2156ea0 thread_start + 8
Thread 9 name:
Thread 9:
0 libsystem_kernel.dylib 0x00000001b8cb9504 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x00000001b8cb9b9c mach_msg + 76 (mach_msg.c:119)
2 CoreFoundation 0x00000001816f3738 __CFRunLoopServiceMachPort + 372 (CFRunLoop.c:2646)
3 CoreFoundation 0x00000001816f7a2c __CFRunLoopRun + 1212 (CFRunLoop.c:3000)
4 CoreFoundation 0x000000018170b468 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
5 AudioSession 0x000000018ab1e308 CADeprecated::GenericRunLoopThread::Entry(void*) + 164 (GenericRunLoopThread.h:95)
6 AudioSession 0x000000018ab27d64 CADeprecated::CAPThread::Entry(CADeprecated::CAPThread*) + 92 (CAPThread.cpp:324)
7 libsystem_pthread.dylib 0x00000001f21579a4 _pthread_start + 148 (pthread.c:891)
8 libsystem_pthread.dylib 0x00000001f2156ea0 thread_start + 8
Thread 6 crashed with ARM Thread State (64-bit):
x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0x0000000000000000
x4: 0x000000019a0cc0ad x5: 0x000000016b582440 x6: 0x000000000000006e x7: 0x0000000000000800
x8: 0xa0731984927acb78 x9: 0xa0731985f922fb78 x10: 0x0000000000000002 x11: 0x000000000000000b
x12: 0x00000000f381e80f x13: 0x000000007381e800 x14: 0x0000000000000010 x15: 0x0000000000000002
x16: 0x0000000000000148 x17: 0x000000016b583000 x18: 0x0000000000000000 x19: 0x0000000000000006
x20: 0x0000000000003703 x21: 0x000000016b5830e0 x22: 0x0000000000000000 x23: 0x000000016b5830e0
x24: 0x00000002817abee8 x25: 0x0000000000000000 x26: 0x0000000000000114 x27: 0x0000000000000000
x28: 0x0000000282ccc840 fp: 0x000000016b5823b0 lr: 0x00000001f215d378
sp: 0x000000016b582390 pc: 0x00000001b8cbf964 cpsr: 0x40000000
esr: 0x56000080 Address size fault
Binary Images:
0x104c4c000 - 0x104e0ffff My_App arm64 <dee02279d86431709c9bd750b7483261> /private/var/containers/Bundle/Application/212B5311-CCE3-46F1-9F94-11BB09B4391D/My_App.app/My_App
0x104f8c000 - 0x104fe3fff dyld arm64e <f94ccc7a6d1a33c7997ff611a6caa7e0> /usr/lib/dyld
0x1813f3000 - 0x181439fff libdispatch.dylib arm64e <edd169e1d0db3808a19e99c1cd5a1c4c> /usr/lib/system/libdispatch.dylib
0x1816ec000 - 0x181b3ffff CoreFoundation arm64e <16faa70c278c3561859ecec407c2dc7c> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
0x181f05000 - 0x1823c9fff CFNetwork arm64e <b63d7160ebc33de7b98bca51e08b72f1> /System/Library/Frameworks/CFNetwork.framework/CFNetwork
0x182f0f000 - 0x183215fff Foundation arm64e <9618b2f2a4c23e07b7eed8d9e1bdeaec> /System/Library/Frameworks/Foundation.framework/Foundation
0x183b93000 - 0x18541dfff UIKitCore arm64e <cd7f7ba2a2c63727aff69baab60cc6ab> /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore
0x18ab18000 - 0x18ab41fff AudioSession arm64e <8fa06a47169f3f56bc5b2ad366ad8f9e> /System/Library/PrivateFrameworks/AudioSession.framework/AudioSession
0x18ab42000 - 0x18ad54fff AVFCore arm64e <f013e5685ba83213b017ab4381c03131> /System/Library/PrivateFrameworks/AVFCore.framework/AVFCore
0x18c629000 - 0x18c6a7fff libsystem_c.dylib arm64e <f3afe30409793cba8338bebe9722ecd8> /usr/lib/system/libsystem_c.dylib
0x199fab000 - 0x199fe4fff libobjc.A.dylib arm64e <73e920f0e7ce394197d87a10dd2cd390> /usr/lib/libobjc.A.dylib
0x19a0b5000 - 0x19a0cefff libc++abi.dylib arm64e <71b1e39fb291315daf46a4343e707387> /usr/lib/libc++abi.dylib
0x19d296000 - 0x19d29efff GraphicsServices arm64e <064a1bb60e413ad2a402fb563fc141f5> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
0x19ffa9000 - 0x1a013bfff libsqlite3.dylib arm64e <adece8478f3b3ba494e3901286e0af41> /usr/lib/libsqlite3.dylib
0x1a013c000 - 0x1a0238fff AVFCapture arm64e <2b0d03c3a03c371e946dc36ef8318451> /System/Library/PrivateFrameworks/AVFCapture.framework/AVFCapture
0x1b8cb8000 - 0x1b8cebfff libsystem_kernel.dylib arm64e <eb3e47f3395335839feefb6cff8a8d7a> /usr/lib/system/libsystem_kernel.dylib
0x1f2156000 - 0x1f2161fff libsystem_pthread.dylib arm64e <c5c27e9d955739c9b9c65f6e7323ee1c> /usr/lib/system/libsystem_pthread.dylib
EOF
In the crash log above, Hardware Model is iPhone12,5.
Why is there this discrepancy between the two? Just to mention, the above crash report was symoblicated using Xcode itself and then I copied it from Finder window. I have not used symoblicatecrash tool in Terminal. But using that too, it is the same.
Also, can someone help with the actual crash in this case? We have a CameraScanner class where we have implemented a feature to scan QRCode using AVCaptureSession. If required, I can copy some code too.

PHImageManager requestImage Crashing

anyone has any idea what could cause a crash in request Image. I have this symbolicated crash but no idea.
I'm just trying to get the data of a photo after using the image picker. One million thanks if you have!
The problem has been found in the review of my app but I'm not able to reproduce it :(
EDit: I have Added more information about the crash log
{"app_name":"VideoLUT","timestamp":"2020-10-12 16:50:59.00 -0700","app_version":"1.06","slice_uuid":"37a6afee-cc6e-3e64-8d33-4bac9759f096","adam_id":1532861990,"build_version":"15","platform":2,"bundleID":"com.malatok.tonebox","share_with_app_devs":0,"is_first_party":0,"bug_type":"109","os_version":"iPhone OS 14.0.1 (18A393)","incident_id":"0DB9EFD3-B359-4587-AD4D-E8B83B1A398D","name":"VideoLUT"}
Incident Identifier: 0DB9EFD3-B359-4587-AD4D-E8B83B1A398D
CrashReporter Key: 8f4684b617f51ed34d09ed52c6b1a1160a43773c
Hardware Model: iPad11,3
Process: VideoLUT [1986]
Path: /private/var/containers/Bundle/Application/444CE516-B292-4EA9-A0AD-649F85479289/VideoLUT.app/VideoLUT
Identifier: com.videolut
Version: 15 (1.06)
AppStoreTools: 12A7207
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Date/Time: 2020-10-12 16:50:59.0271 -0700
Launch Time: 2020-10-12 13:47:32.6334 -0700
OS Version: iPhone OS 14.0.1 (18A393)
Release Type: User
Baseband Version: n/a
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Application Specific Information:
abort() called
Last Exception Backtrace:
0 CoreFoundation 0x1938eb5ac __exceptionPreprocess + 220
1 libobjc.A.dylib 0x1a796542c objc_exception_throw + 59
2 CoreFoundation 0x1937f41b4 +[NSException raise:format:arguments:] + 99
3 Foundation 0x194b527bc -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 131
4 Photos 0x1a3fe7390 +[PHImageManagerRequestTracer registerRequestID:withAssetUUID:] + 287
5 Photos 0x1a40626cc -[PHImageManager runRequestWithContext:] + 683
6 Photos 0x1a4061900 -[PHImageManager requestImageDataAndOrientationForAsset:options:resultHandler:] + 995
7 VideoLUT 0x1009158d8 -[ProjectManager importPhoto13:dismiss:] + 465112 (ProjectManager.m:195)
8 VideoLUT 0x100914828 -[ProjectManager createProjectWithAsset:uti:] + 460840 (ProjectManager.m:0)
9 VideoLUT 0x1009d7eb4 __74-[HomeViewController imagePickerController:didFinishPickingMediaWithInfo:]_block_invoke + 1261236 (HomeViewController.m:347)
10 UIKitCore 0x1959f4df0 -[UIPresentationController transitionDidFinish:] + 1019
11 UIKitCore 0x1959ff25c -[_UICurrentContextPresentationController transitionDidFinish:] + 43
12 UIKitCore 0x1959f9540 __56-[UIPresentationController runTransitionForCurrentState]_block_invoke.528 + 211
13 UIKitCore 0x195b3477c -[_UIViewControllerTransitionContext completeTransition:] + 111
14 UIKitCore 0x1966f0260 -[UITransitionView notifyDidCompleteTransition:] + 243
15 UIKitCore 0x1966eff0c -[UITransitionView _didCompleteTransition:] + 1135
16 UIKitCore 0x196726ca8 -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] + 723
17 UIKitCore 0x1966f9f48 -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 247
18 UIKitCore 0x1966fa47c -[UIViewAnimationState animationDidStop:finished:] + 247
19 UIKitCore 0x1966fa5e0 -[UIViewAnimationState animationDidStop:finished:] + 603
20 QuartzCore 0x196c51cb4 CA::Layer::run_animation_callbacks+ 1510580 (void*) + 279
21 libdispatch.dylib 0x1934e9ac8 _dispatch_client_callout + 19
22 libdispatch.dylib 0x1934f704c _dispatch_main_queue_callback_4CF + 835
23 CoreFoundation 0x1938681e4 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 15
24 CoreFoundation 0x1938623b4 __CFRunLoopRun + 2507
25 CoreFoundation 0x1938614bc CFRunLoopRunSpecific + 599
26 GraphicsServices 0x1aa2e6820 GSEventRunModal + 163
27 UIKitCore 0x196205734 -[UIApplication _run] + 1071
28 UIKitCore 0x19620ae10 UIApplicationMain + 167
29 VideoLUT 0x100931674 main + 579188 (main.m:14)
30 libdyld.dylib 0x193528e60 start + 3
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00000001bf1a998c __pthread_kill + 8
1 libsystem_pthread.dylib 0x00000001da1c3c74 pthread_kill + 272
2 libsystem_c.dylib 0x000000019c9edbb4 abort + 104
3 libc++abi.dylib 0x00000001a7a64e24 __cxxabiv1::__aligned_malloc_with_fallback+ 65060 (unsigned long) + 0
4 libc++abi.dylib 0x00000001a7a56434 demangling_unexpected_handler+ 5172 () + 0
5 libobjc.A.dylib 0x00000001a7965710 _objc_terminate+ 42768 () + 132
6 libc++abi.dylib 0x00000001a7a642a8 std::__terminate(void (*)+ 62120 ()) + 20
7 libc++abi.dylib 0x00000001a7a64234 std::terminate+ 62004 () + 44
8 libdispatch.dylib 0x00000001934e9adc _dispatch_client_callout + 40
9 libdispatch.dylib 0x00000001934f704c _dispatch_main_queue_callback_4CF + 836
10 CoreFoundation 0x00000001938681e4 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
11 CoreFoundation 0x00000001938623b4 __CFRunLoopRun + 2508
12 CoreFoundation 0x00000001938614bc CFRunLoopRunSpecific + 600
13 GraphicsServices 0x00000001aa2e6820 GSEventRunModal + 164
14 UIKitCore 0x0000000196205734 -[UIApplication _run] + 1072
15 UIKitCore 0x000000019620ae10 UIApplicationMain + 168
16 VideoLUT 0x0000000100931674 main + 579188 (main.m:14)
17 libdyld.dylib 0x0000000193528e60 start + 4
Thread 1 name: com.apple.uikit.eventfetch-thread
Thread 1:
0 libsystem_kernel.dylib 0x00000001bf185dd0 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x00000001bf185184 mach_msg + 76
2 CoreFoundation 0x0000000193867cf8 __CFRunLoopServiceMachPort + 380
3 CoreFoundation 0x0000000193861ea8 __CFRunLoopRun + 1216
4 CoreFoundation 0x00000001938614bc CFRunLoopRunSpecific + 600
5 Foundation 0x0000000194adee30 -[NSRunLoop+ 32304 (NSRunLoop) runMode:beforeDate:] + 232
6 Foundation 0x0000000194aded08 -[NSRunLoop+ 32008 (NSRunLoop) runUntilDate:] + 92
7 UIKitCore 0x00000001962b5e94 -[UIEventFetcher threadMain] + 516
8 Foundation 0x0000000194c490f0 __NSThread__start__ + 864
9 libsystem_pthread.dylib 0x00000001da1c2ca8 _pthread_start + 320
10 libsystem_pthread.dylib 0x00000001da1cb788 thread_start + 8
Thread 2 name: AVAudioSession Notify Thread
Thread 2:
0 libsystem_kernel.dylib 0x00000001bf185dd0 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x00000001bf185184 mach_msg + 76
2 CoreFoundation 0x0000000193867cf8 __CFRunLoopServiceMachPort + 380
3 CoreFoundation 0x0000000193861ea8 __CFRunLoopRun + 1216
4 CoreFoundation 0x00000001938614bc CFRunLoopRunSpecific + 600
5 AudioSession 0x000000019b1032ac GenericRunLoopThread::Entry+ 53932 (void*) + 164
6 AudioSession 0x000000019b105390 CAPThread::Entry+ 62352 (CAPThread*) + 92
7 libsystem_pthread.dylib 0x00000001da1c2ca8 _pthread_start + 320
8 libsystem_pthread.dylib 0x00000001da1cb788 thread_start + 8
Thread 3:
0 libsystem_pthread.dylib 0x00000001da1cb774 start_wqthread + 0
Thread 4:
0 libsystem_pthread.dylib 0x00000001da1cb774 start_wqthread + 0
Thread 5:
0 libsystem_pthread.dylib 0x00000001da1cb774 start_wqthread + 0
Thread 6 name: Dispatch queue: com.apple.root.default-qos
Thread 6:
0 libsystem_kernel.dylib 0x00000001bf185e0c semaphore_wait_trap + 8
1 libdispatch.dylib 0x00000001934ea018 _dispatch_sema4_wait + 28
2 libdispatch.dylib 0x00000001934ea6b0 _dispatch_semaphore_wait_slow + 132
3 UIKitCore 0x000000019661b51c __69+[_UIAsyncInvocationObserver whenInvocationsCompleteForObservers:do:]_block_invoke_2 + 72
4 libdispatch.dylib 0x00000001934e7fd0 _dispatch_call_block_and_release + 32
5 libdispatch.dylib 0x00000001934e9ac8 _dispatch_client_callout + 20
6 libdispatch.dylib 0x00000001934eca10 _dispatch_queue_override_invoke + 692
7 libdispatch.dylib 0x00000001934fa104 _dispatch_root_queue_drain + 356
8 libdispatch.dylib 0x00000001934fa8e8 _dispatch_worker_thread2 + 116
9 libsystem_pthread.dylib 0x00000001da1c48cc _pthread_wqthread + 216
10 libsystem_pthread.dylib 0x00000001da1cb77c start_wqthread + 8
Thread 7:
0 libsystem_pthread.dylib 0x00000001da1cb774 start_wqthread + 0
Thread 8:
0 libsystem_pthread.dylib 0x00000001da1cb774 start_wqthread + 0
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0x0000000000000000
x4: 0x000000016f559ff0 x5: 0x000000016f55a5a0 x6: 0x000000000000006e x7: 0x00000000000dab00
x8: 0x00000000000005b9 x9: 0xb08acf1d630ebb4e x10: 0x0000000000000002 x11: 0x0000000000000003
x12: 0x0000000000000000 x13: 0x0000000000000001 x14: 0x0000000000000010 x15: 0x0000000000000010
x16: 0x0000000000000148 x17: 0x00000001010c38c0 x18: 0x00000001070ad630 x19: 0x0000000000000006
x20: 0x0000000000000407 x21: 0x00000001010c39a0 x22: 0x0000000000000000 x23: 0x0000000000000000
x24: 0x0000000002ffffff x25: 0x00000001010c39a0 x26: 0x00000000000020ff x27: 0x0000000000000104
x28: 0x0000000283a0cf00 fp: 0x000000016f55a500 lr: 0x00000001da1c3c74
sp: 0x000000016f55a4e0 pc: 0x00000001bf1a998c cpsr: 0x40000000
esr: 0x56000080 Address size fault

Can't determine cause from this crash log

I had an app in the App Store with lots of crashes, but I can't reproduce it myself.
I have lots of crash logs but they don't contain a backtrace making it difficult to diagnose the issue.
The crash logs show CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER which possibly could be caused by a notification being sent to a deallocated observer according to other questions on SO.
However the app only runs on iOS 10+, and according to Apple its not necessary to de-register observers from iOS 9 onwards unless they are block observers. Which my app doesn't use so that can't be the cause as far as my own apps notifications are concerned.
Incident Identifier: 77AB1312-9C1F-4BC1-957E-B742856DC635
CrashReporter Key: 6ad59ac64c53d2fc92208e8df23d4ddc8fed39fd
Hardware Model: iPhone10,3
Process: My App [378]
Path: /private/var/containers/Bundle/Application/99C2E2C8-9655-4D07-9608-870B5DD17C21/My app.app/My app
Identifier: com.myapp
OS Version: iPhone OS 10.3.2 (14F89)
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: com.myapp[498]
Date/Time: 2018-06-06 00:18:34.2085 -0700
Launch Time: 2018-06-06 00:17:39.1406 -0700
Baseband Version: 2.03.00
Report Version: 104
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 0x000000018ec4d014 __pthread_kill + 8
1 libsystem_pthread.dylib 0x000000018ed17264 pthread_kill + 112 (pthread.c:1366)
2 libsystem_c.dylib 0x000000018ebc19c4 abort + 140 (abort.c:91)
3 libswiftCore.dylib 0x0000000100ad976c 0x1007ec000 + 3069804
4 libswiftCore.dylib 0x0000000100b0614c 0x1007ec000 + 3252556
5 CoreFoundation 0x000000018fc56f54 ___forwarding___ + 916 (NSForwarding.m:3126)
6 CoreFoundation 0x000000018fb52d4c _CF_forwarding_prep_0 + 92
7 CoreFoundation 0x000000018fbed5f4 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 20 (CFNotificationCenter.c:650)
8 CoreFoundation 0x000000018fbecd08 _CFXRegistrationPost + 400 (CFNotificationCenter.c:164)
9 CoreFoundation 0x000000018fbeca84 ___CFXNotificationPost_block_invoke + 60 (CFNotificationCenter.c:1031)
10 CoreFoundation 0x000000018fc5b7a8 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1412 (CFXNotificationRegistrar.m:163)
11 CoreFoundation 0x000000018fb3095c _CFXNotificationPost + 376 (CFNotificationCenter.c:1028)
12 Foundation 0x0000000190642930 -[NSNotificationCenter postNotificationName:object:userInfo:] + 68 (NSNotification.m:482)
13 UIKit 0x0000000195e07ea8 -[UIApplication _stopDeactivatingForReason:] + 1124 (UIApplication.m:1534)
14 UIKit 0x0000000196005b4c __62-[UIApplication _sceneSettingsPostLifecycleEventDiffInspector]_block_invoke.1259 + 124 (UIApplication.m:3247)
15 FrontBoardServices 0x00000001917e4be8 __52-[FBSSettingsDiffInspector inspectDiff:withContext:]_block_invoke.27 + 204 (FBSSettingsDiffInspector.m:46)
16 Foundation 0x00000001906fc7fc __NSIndexSetEnumerate + 724 (NSIndexSet.m:1347)
17 BaseBoard 0x0000000191757510 -[BSSettingsDiff inspectChangesWithBlock:] + 104 (BSSettingsDiff.m:187)
18 FrontBoardServices 0x00000001917dece4 -[FBSSettingsDiff inspectOtherChangesWithBlock:] + 88 (FBSSettingsDiff.m:65)
19 FrontBoardServices 0x00000001917e49bc -[FBSSettingsDiffInspector inspectDiff:withContext:] + 280 (FBSSettingsDiffInspector.m:44)
20 UIKit 0x00000001960064d4 __70-[UIApplication scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 196 (UIApplication.m:3346)
21 UIKit 0x0000000196006124 -[UIApplication scene:didUpdateWithDiff:transitionContext:completion:] + 892 (UIApplication.m:3357)
22 UIKit 0x00000001963407c8 -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:] + 464 (UIApplicationSceneClientAgent.m:74)
23 FrontBoardServices 0x00000001917ce22c __80-[FBSSceneImpl updater:didUpdateSettings:withDiff:transitionContext:completion:]_block_invoke.376 + 208 (FBSSceneImpl.m:598)
24 FrontBoardServices 0x00000001917fb884 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 36 (FBSSerialQueue.m:158)
25 FrontBoardServices 0x00000001917fb6f0 -[FBSSerialQueue _performNext] + 176 (FBSSerialQueue.m:177)
26 FrontBoardServices 0x00000001917fbaa0 -[FBSSerialQueue _performNextFromRunLoopSource] + 56 (FBSSerialQueue.m:206)
27 CoreFoundation 0x000000018fc0142c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24 (CFRunLoop.c:1943)
28 CoreFoundation 0x000000018fc00d9c __CFRunLoopDoSources0 + 540 (CFRunLoop.c:1989)
29 CoreFoundation 0x000000018fbfe9a8 __CFRunLoopRun + 744 (CFRunLoop.c:2821)
30 CoreFoundation 0x000000018fb2eda4 CFRunLoopRunSpecific + 424 (CFRunLoop.c:3113)
31 GraphicsServices 0x0000000191598074 GSEventRunModal + 100 (GSEvent.c:2245)
32 UIKit 0x0000000195de9058 UIApplicationMain + 208 (UIApplication.m:4089)
33 My App 0x00000001000be2e4 main + 56 (MyFile.swift:17)
34 libdyld.dylib 0x000000018eb3d59c start + 4
hread 1:
0 libsystem_pthread.dylib 0x0000000220f92064 start_wqthread + 0
Thread 2 name:
Thread 2:
0 libsystem_kernel.dylib 0x0000000220ef6ac8 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x0000000220ef6940 mach_msg + 72 (mach_msg.c:103)
2 CoreFoundation 0x000000022131d2f0 __CFRunLoopServiceMachPort + 236 (CFRunLoop.c:2615)
3 CoreFoundation 0x000000022131af80 __CFRunLoopRun + 1404 (CFRunLoop.c:2971)
4 CoreFoundation 0x0000000221254abc CFRunLoopRunSpecific + 436 (CFRunLoop.c:3247)
5 Foundation 0x0000000221cd0544 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 300 (NSRunLoop.m:367)
6 Foundation 0x0000000221cd03f0 -[NSRunLoop(NSRunLoop) runUntilDate:] + 148 (NSRunLoop.m:411)
7 UIKitCore 0x000000024c433a7c -[UIEventFetcher threadMain] + 136 (UIEventFetcher.m:524)
8 Foundation 0x0000000221de0a94 __NSThread__start__ + 1040 (NSThread.m:1175)
9 libsystem_pthread.dylib 0x0000000220f931e4 _pthread_body + 128 (pthread.c:804)
10 libsystem_pthread.dylib 0x0000000220f93164 _pthread_start + 40 (pthread.c:827)
11 libsystem_pthread.dylib 0x0000000220f92070 thread_start + 4
Thread 3 name:
Thread 3:
0 libsystem_kernel.dylib 0x0000000220ef6ac8 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x0000000220ef6940 mach_msg + 72 (mach_msg.c:103)
2 CoreFoundation 0x000000022131d2f0 __CFRunLoopServiceMachPort + 236 (CFRunLoop.c:2615)
3 CoreFoundation 0x000000022131af80 __CFRunLoopRun + 1404 (CFRunLoop.c:2971)
4 CoreFoundation 0x0000000221254abc CFRunLoopRunSpecific + 436 (CFRunLoop.c:3247)
5 CFNetwork 0x0000000221b5fc8c -[__CoreSchedulingSetRunnable runForever] + 212 (CoreSchedulingSet.mm:1365)
6 Foundation 0x0000000221de0a94 __NSThread__start__ + 1040 (NSThread.m:1175)
7 libsystem_pthread.dylib 0x0000000220f931e4 _pthread_body + 128 (pthread.c:804)
8 libsystem_pthread.dylib 0x0000000220f93164 _pthread_start + 40 (pthread.c:827)
9 libsystem_pthread.dylib 0x0000000220f92070 thread_start + 4
Thread 4 name:
Thread 4:
0 libsystem_kernel.dylib 0x0000000220f184ac __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x0000000220f9a638 _pthread_cond_wait$VARIANT$armv81 + 620 (pthread_cond.c:578)
2 libc++.1.dylib 0x00000002205b2e28 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 24 (__threading_support:278)
3 JavaScriptCore 0x0000000228f44524 void std::__1::condition_variable_any::wait<std::__1::unique_lock<bmalloc::Mutex> >(std::__1::unique_lock<bmalloc::Mutex>&) + 104 (condition_variable:204)
4 JavaScriptCore 0x0000000228f48300 bmalloc::Scavenger::threadRunLoop() + 172 (condition_variable:213)
5 JavaScriptCore 0x0000000228f47ac4 bmalloc::Scavenger::threadEntryPoint(bmalloc::Scavenger*) + 12 (Scavenger.cpp:352)
6 JavaScriptCore 0x0000000228f494b8 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 (*)(bmalloc::Scavenger*), bmalloc::Scavenger*> >(void*) + 44 (type_traits:4428)
7 libsystem_pthread.dylib 0x0000000220f931e4 _pthread_body + 128 (pthread.c:804)
8 libsystem_pthread.dylib 0x0000000220f93164 _pthread_start + 40 (pthread.c:827)
9 libsystem_pthread.dylib 0x0000000220f92070 thread_start + 4
Thread 5 name:
Thread 5:
0 libsystem_kernel.dylib 0x0000000220efb088 kevent + 8
1 Realm 0x00000001025f112c realm::_impl::ExternalCommitHelper::listen() + 212 (external_commit_helper.cpp:202)
2 Realm 0x00000001025f1d20 std::__1::__async_func<realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0>::operator()() + 28 (external_commit_helper.cpp:159)
3 Realm 0x00000001025f1ca8 std::__1::__async_assoc_state<void, std::__1::__async_func<realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0> >::__execute() + 28 (future:1039)
4 Realm 0x00000001025f1e58 std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (std::__1::__async_assoc_state<void, std::__1::__async_func<realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0> >::*)(), std::__1::__async_assoc_state<void, std::__1::__async_func<realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0> >*> >(void*, void*) + 64 (type_traits:4232)
5 libsystem_pthread.dylib 0x0000000220f931e4 _pthread_body + 128 (pthread.c:804)
6 libsystem_pthread.dylib 0x0000000220f93164 _pthread_start + 40 (pthread.c:827)
7 libsystem_pthread.dylib 0x0000000220f92070 thread_start + 4
Thread 6 name:
Thread 6:
0 libsystem_kernel.dylib 0x0000000220ef6ac8 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x0000000220ef6940 mach_msg + 72 (mach_msg.c:103)
2 CoreFoundation 0x000000022131d2f0 __CFRunLoopServiceMachPort + 236 (CFRunLoop.c:2615)
3 CoreFoundation 0x000000022131af80 __CFRunLoopRun + 1404 (CFRunLoop.c:2971)
4 CoreFoundation 0x0000000221254abc CFRunLoopRunSpecific + 436 (CFRunLoop.c:3247)
5 AVFAudio 0x0000000227a31cd0 GenericRunLoopThread::Entry(void*) + 164 (GenericRunLoopThread.h:92)
6 AVFAudio 0x0000000227a5ce94 CAPThread::Entry(CAPThread*) + 88
7 libsystem_pthread.dylib 0x0000000220f931e4 _pthread_body + 128 (pthread.c:804)
8 libsystem_pthread.dylib 0x0000000220f93164 _pthread_start + 40 (pthread.c:827)
9 libsystem_pthread.dylib 0x0000000220f92070 thread_start + 4
Thread 7:
0 libsystem_pthread.dylib 0x0000000220f92064 start_wqthread + 0
Thread 8:
0 libsystem_pthread.dylib 0x0000000220f92064 start_wqthread + 0
Thread 9:
0 libsystem_pthread.dylib 0x0000000220f92064 start_wqthread + 0
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0x0000000282a1a766
x4: 0x0000000103938280 x5: 0x0000000000000020 x6: 0x0046000004210103 x7: 0x00000000ffba0038
x8: 0x0000000000000800 x9: 0x0000000220f98b44 x10: 0x0000000220f9408c x11: 0x000000025b529562
x12: 0x000000025b529562 x13: 0x0000000000000018 x14: 0x0000000000000001 x15: 0x0000000000000881
x16: 0x0000000000000148 x17: 0x0000000000000000 x18: 0x0000000000000000 x19: 0x0000000000000006
x20: 0x0000000259099100 x21: 0x000000000000002d x22: 0x0000000000000303 x23: 0x00000002590991e0
x24: 0x0000000000000000 x25: 0x000000024d2a3912 x26: 0x0000000102eec200 x27: 0x000000025909cf10
x28: 0x0000000000000001 fp: 0x000000016ddd9960 lr: 0x0000000220f98c70
sp: 0x000000016ddd9930 pc: 0x0000000220f186a4 cpsr: 0x00000000
FYI Line 17 of MyFile.swift is just this:
#objc class RealmDatabase : NSObject
{
var configuration:Realm.Configuration? = nil // Line 17
Thats just a declaration of an optional, so I don't see how that could cause any problems.
Are there any other clues as to what the problem could be?
Just a wild stab in the dark:
One reason that this error can happen is due to ARC and weak references.
A common pattern in iOS is the delegate pattern, where a separate object is constructed to handle the messages of another object. These references are often weak, so that you don't get a memory cycle, where two objects own a strong reference to each other.
Now, it could be, somewhere in your code, that you are generating a RealmDatabase instance somewhere, and handing it off to another object as a weak reference. If this is the case, then it will be destroyed by ARC as soon as all the strong references to it are gone: for example, if it is being referenced by a Realm connection instance of some sort, and the connection is dropped.
This is just a wild guess, but if you are dynamically creating RealmDatabase instances when certain events happen, store references to those objects in a stored property on some object, as an optional, to keep them from being destroyed by ARC.
Good luck, and I hope you solve this for your users.

Interpretation of iOS crash log with -[UIApplication _cachedSystemAnimationFenceCreatingIfNecessary:]

My submission to the App Store was rejected due to a crash. However, I am unable to reproduce the crash on multiple hardware devices and simulators. I've symbolicated the crash log, and it seems the issue is occurring in an area of code where the app is fetching some data from a server and closing a UIAlertController that notifies the user to "Please wait..." Below is the crash log.
Date/Time: 2017-05-06 00:27:06.7009 +0700
Launch Time: 2017-05-06 00:26:43.8793 +0700
OS Version: iPhone OS 10.3.1 (14E304)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 1
Application Specific Information:
abort() called
Filtered syslog:
None found
Last Exception Backtrace:
0 CoreFoundation 0x18c47efd8 __exceptionPreprocess + 124
1 libobjc.A.dylib 0x18aee0538 objc_exception_throw + 56
2 CoreFoundation 0x18c47eeac +[NSException raise:format:arguments:] + 104
3 Foundation 0x18cf16710 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 112
4 UIKit 0x192823454 -[UIApplication _cachedSystemAnimationFenceCreatingIfNecessary:] + 196
5 UIKit 0x192823514 -[UIApplication _systemAnimationFenceCreatingIfNecessary:] + 24
6 UIKit 0x19287c7a0 +[UIWindow _synchronizedDrawingFence] + 116
7 UIKit 0x192a3a150 +[_UIKeyboardChangedInformation informationForKeyboardUp:withIAV:] + 104
8 UIKit 0x192d338d4 -[_UIRemoteKeyboards prepareToMoveKeyboard:withIAV:showing:forScreen:] + 464
9 UIKit 0x19266bc04 -[UIPeripheralHost(UIKitInternal) setInputViews:animationStyle:] + 820
10 UIKit 0x192688cf4 -[UIPeripheralHost(UIKitInternal) _restoreInputViewsWithId:animated:] + 584
11 UIKit 0x19291bd64 -[UIViewController _restoreInputViewsForPresentation] + 280
12 UIKit 0x1928f6e3c -[UIPresentationController runTransitionForCurrentState] + 1560
13 UIKit 0x1928f50f8 -[UIPresentationController _dismissWithAnimationController:interactionController:target:didEndSelector:] + 764
14 UIKit 0x19291b8c0 -[UIViewController _dismissViewControllerWithAnimationController:interactionController:completion:] + 464
15 UIKit 0x1926d0cd4 -[UIViewController _dismissViewControllerWithTransition:from:completion:] + 600
16 UIKit 0x192678b6c -[UIViewController dismissViewControllerWithTransition:completion:] + 1144
17 UIKit 0x19267894c -[UIViewController dismissViewControllerWithTransition:completion:] + 600
18 UIKit 0x19291ab68 -[UIViewController _performCoordinatedPresentOrDismiss:animated:] + 524
19 UIKit 0x1926786c0 -[UIViewController dismissViewControllerAnimated:completion:] + 152
20 DinokEtp 0x1001014c4 specialized ViewController.(downloadCaseTypesFile(workFlowVersionMobileShouleBeOn : Double, validateUserResponse : ValidateUserResponse) -> ()).(closure #1) (ViewController.swift:360)
21 DinokEtp 0x1000fd84c ViewController.(downloadCaseTypesFile(workFlowVersionMobileShouleBeOn : Double, validateUserResponse : ValidateUserResponse) -> ()).(closure #1) (ViewController.swift:0)
22 DinokEtp 0x100101b38 partial apply for ViewController.(downloadCaseTypesFile(workFlowVersionMobileShouleBeOn : Double, validateUserResponse : ValidateUserResponse) -> ()).(closure #1) (ViewController.swift:0)
23 CFNetwork 0x18ca89358 __85-[__NSURLSessionLocal downloadTaskForRequest:downloadFilePath:resumeData:completion:]_block_invoke + 32
24 CFNetwork 0x18caeb18c __50-[__NSCFLocalDownloadTask _private_fileCompletion]_block_invoke.321 + 84
25 Foundation 0x18cf4d804 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 16
26 Foundation 0x18ce92760 -[NSBlockOperation main] + 96
27 Foundation 0x18ce82b18 -[__NSOperationInternal _start:] + 612
28 Foundation 0x18cf4fba0 __NSOQSchedule_f + 228
29 libdispatch.dylib 0x18b3369a0 _dispatch_client_callout + 16
30 libdispatch.dylib 0x18b344ad4 _dispatch_queue_serial_drain + 928
31 libdispatch.dylib 0x18b33a2cc _dispatch_queue_invoke + 884
32 libdispatch.dylib 0x18b346a50 _dispatch_root_queue_drain + 540
33 libdispatch.dylib 0x18b3467d0 _dispatch_worker_thread3 + 124
34 libsystem_pthread.dylib 0x18b53f1d0 _pthread_wqthread + 1096
35 libsystem_pthread.dylib 0x18b53ed7c start_wqthread + 4
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0:
0 libsystem_kernel.dylib 0x000000018b45b224 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x000000018b45b09c mach_msg + 72
2 CoreFoundation 0x000000018c42ce88 __CFRunLoopServiceMachPort + 192
3 CoreFoundation 0x000000018c42aadc __CFRunLoopRun + 1060
4 CoreFoundation 0x000000018c35ad94 CFRunLoopRunSpecific + 424
5 GraphicsServices 0x000000018ddc4074 GSEventRunModal + 100
6 UIKit 0x000000019260c130 UIApplicationMain + 208
7 DinokEtp 0x00000001000654bc main (EMSCaseUpload.swift:14)
8 libdyld.dylib 0x000000018b36959c start + 4
Thread 1 name: Dispatch queue: NSOperationQueue 0x17003e2c0 :: NSOperation 0x17025e5d0 (QOS: DEFAULT)
Thread 1 Crashed:
0 libsystem_kernel.dylib 0x000000018b479014 __pthread_kill + 8
1 libsystem_pthread.dylib 0x000000018b543334 pthread_kill + 112
2 libsystem_c.dylib 0x000000018b3ed9c4 abort + 140
3 libc++abi.dylib 0x000000018aeb91b0 __cxa_bad_cast + 0
4 libc++abi.dylib 0x000000018aed2c04 default_unexpected_handler() + 0
5 libobjc.A.dylib 0x000000018aee0820 _objc_terminate() + 124
6 libc++abi.dylib 0x000000018aecf5d4 std::__terminate(void (*)()) + 16
7 libc++abi.dylib 0x000000018aecf640 std::terminate() + 60
8 libdispatch.dylib 0x000000018b3369b4 _dispatch_client_callout + 36
9 libdispatch.dylib 0x000000018b344ad4 _dispatch_queue_serial_drain + 928
10 libdispatch.dylib 0x000000018b33a2cc _dispatch_queue_invoke + 884
11 libdispatch.dylib 0x000000018b346a50 _dispatch_root_queue_drain + 540
12 libdispatch.dylib 0x000000018b3467d0 _dispatch_worker_thread3 + 124
13 libsystem_pthread.dylib 0x000000018b53f1d0 _pthread_wqthread + 1096
14 libsystem_pthread.dylib 0x000000018b53ed7c start_wqthread + 4
Thread 2:
0 libsystem_pthread.dylib 0x000000018b53ed78 start_wqthread + 0
Thread 3 name: com.apple.uikit.eventfetch-thread
Thread 3:
0 libsystem_kernel.dylib 0x000000018b45b224 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x000000018b45b09c mach_msg + 72
2 CoreFoundation 0x000000018c42ce88 __CFRunLoopServiceMachPort + 192
3 CoreFoundation 0x000000018c42aadc __CFRunLoopRun + 1060
4 CoreFoundation 0x000000018c35ad94 CFRunLoopRunSpecific + 424
5 Foundation 0x000000018ce74d64 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 304
6 Foundation 0x000000018ce95b34 -[NSRunLoop(NSRunLoop) runUntilDate:] + 96
7 UIKit 0x0000000192f965f8 -[UIEventFetcher threadMain] + 136
8 Foundation 0x000000018cf722c8 __NSThread__start__ + 996
9 libsystem_pthread.dylib 0x000000018b54175c _pthread_body + 240
10 libsystem_pthread.dylib 0x000000018b54166c _pthread_body + 0
11 libsystem_pthread.dylib 0x000000018b53ed84 thread_start + 4
Thread 4:
0 libsystem_kernel.dylib 0x000000018b479a88 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x000000018b53f274 _pthread_wqthread + 1260
2 libsystem_pthread.dylib 0x000000018b53ed7c start_wqthread + 4
Thread 5:
0 libsystem_pthread.dylib 0x000000018b53ed78 start_wqthread + 0
Thread 6 name: com.apple.NSURLConnectionLoader
Thread 6:
0 libsystem_kernel.dylib 0x000000018b45b224 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x000000018b45b09c mach_msg + 72
2 CoreFoundation 0x000000018c42ce88 __CFRunLoopServiceMachPort + 192
3 CoreFoundation 0x000000018c42aadc __CFRunLoopRun + 1060
4 CoreFoundation 0x000000018c35ad94 CFRunLoopRunSpecific + 424
5 CFNetwork 0x000000018cb66ca4 +[NSURLConnection(Loader) _resourceLoadLoop:] + 404
6 Foundation 0x000000018cf722c8 __NSThread__start__ + 996
7 libsystem_pthread.dylib 0x000000018b54175c _pthread_body + 240
8 libsystem_pthread.dylib 0x000000018b54166c _pthread_body + 0
9 libsystem_pthread.dylib 0x000000018b53ed84 thread_start + 4
Thread 1 crashed with ARM Thread State (64-bit):
x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0x00000001700f8c37
x4: 0x000000018aed3b07 x5: 0x000000016de9a850 x6: 0x000000000000006e x7: 0xffffffffffffffec
x8: 0x000000000c000000 x9: 0x0000000004000000 x10: 0x000000000000000b x11: 0x000000000000000b
x12: 0x0000000000000010 x13: 0x000000018c6c9c0e x14: 0x0000030000000300 x15: 0x0000000000000000
x16: 0x0000000000000148 x17: 0x0000000000000000 x18: 0x0000000000000000 x19: 0x0000000000000006
x20: 0x000000016de9b000 x21: 0x000000016de9a850 x22: 0x00000001700ff380 x23: 0x0000000000000004
x24: 0x00000001b1ebd400 x25: 0x0000000000000000 x26: 0x00000001b1ebd400 x27: 0x000000016de9b0e0
x28: 0x0000000000000000 fp: 0x000000016de9a7b0 lr: 0x000000018b543334
sp: 0x000000016de9a790 pc: 0x000000018b479014 cpsr: 0x00000000
I would recommend double checking that you are not interacting with that UIAlertController (or any other UIKit API) outside the main thread (aka, Thread 0 above). Many UIKit APIs are designed to be used only from the main thread.
Worth noting that the crash happened on Thread 1…
If you are in doubt, wrap the call with:
DispatchQueue.main.async {
// Call UIAlertController code here...
}

Resources