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
Related
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
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
I would be so appreciated if anybody could spend their time to help me!!!
What I am facing now
I was trying to present an view controller from extension and the app crashed without leading me the line of error code.
What I tried:
I Added many breakpoints, found that if I don't present the table view controller to show the correct info, no crash. But after the presentation, after the info is loaded rightly in the table, seconds later, crash happens.
What I can provide:
I can provide the full crash report:
Incident Identifier: 03B53A6D-E069-4C4B-98C0-CB61C8C1A688
CrashReporter Key: 1dd64f8867f0eda63dfc5248be178fbebdd71653
Hardware Model: iPhone9,2
Process: EverykeyAutofillExtension [98811]
Path: /private/var/containers/Bundle/Application/63F02B78-71D9-405B-AC3F-314868CA262D/Privacy.app/PlugIns/PrivacyExtension.appex/EverykeyAutofillExtension
Identifier: comPrivacy.ios.PrivacyAutofillExtension
Version: 12 (2.4.0)
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: com.Privacy.ios.PrivacyAutofillExtension [24965]
Date/Time: 2020-08-26 14:20:40.7959 -0400
Launch Time: 2020-08-26 14:20:03.4675 -0400
OS Version: iPhone OS 13.5.1 (17F80)
Release Type: User
Baseband Version: 7.60.01
Report Version: 104
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x000000019819e9d0
Termination Signal: Trace/BPT trap: 5
Termination Reason: Namespace SIGNAL, Code 0x5
Terminating Process: exc handler [98811]
Triggered by Thread: 1
Last Exception Backtrace:
0 CoreFoundation 0x19853d794 __exceptionPreprocess + 224
1 libobjc.A.dylib 0x19825fbcc objc_exception_throw + 55
2 Foundation 0x198a151fc _AssertAutolayoutOnAllowedThreadsOnly + 419
3 Foundation 0x19882207c -[NSISEngine _optimizeWithoutRebuilding] + 67
4 Foundation 0x198821f98 -[NSISEngine optimize] + 111
5 Foundation 0x198821c0c -[NSISEngine performPendingChangeNotifications] + 111
6 UIKitCore 0x19ca97e88 -[UIView+ 15605384 (CALayerDelegate) _wantsReapplicationOfAutoLayoutWithLayoutDirtyOnEntry:] + 171
7 UIKitCore 0x19ca988c4 -[UIView+ 15608004 (CALayerDelegate) layoutSublayersOfLayer:] + 2247
8 QuartzCore 0x19f02b724 -[CALayer layoutSublayers] + 283
9 QuartzCore 0x19f03187c CA::Layer::layout_if_needed+ 1407100 (CA::Transaction*) + 467
10 QuartzCore 0x19f03c3c0 CA::Layer::layout_and_display_if_needed+ 1450944 (CA::Transaction*) + 139
11 QuartzCore 0x19ef84f1c CA::Context::commit_transaction+ 700188 (CA::Transaction*, double) + 295
12 QuartzCore 0x19efae8bc CA::Transaction::commit+ 870588 () + 675
13 QuartzCore 0x19efaf85c CA::Transaction::release_thread+ 874588 (void*) + 227
14 libsystem_pthread.dylib 0x198256f8c _pthread_tsd_cleanup + 579
15 libsystem_pthread.dylib 0x198253df4 _pthread_exit + 79
16 libsystem_pthread.dylib 0x198254e64 _pthread_wqthread_exit + 95
17 libsystem_pthread.dylib 0x198254c04 _pthread_wqthread + 415
18 libsystem_pthread.dylib 0x198257740 start_wqthread + 7
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0:
0 libsystem_kernel.dylib 0x0000000198311198 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x000000019831060c mach_msg + 72
2 CoreFoundation 0x00000001984bb468 __CFRunLoopServiceMachPort + 148
3 CoreFoundation 0x00000001984b649c __CFRunLoopRun + 1160
4 CoreFoundation 0x00000001984b5ce8 CFRunLoopRunSpecific + 424
5 GraphicsServices 0x00000001a260038c GSEventRunModal + 160
6 UIKitCore 0x000000019c5e4444 UIApplicationMain + 1932
7 libxpc.dylib 0x00000001981218fc _xpc_objc_main.cold.3 + 208
8 libxpc.dylib 0x000000019810d4f0 _xpc_objc_main + 212
9 libxpc.dylib 0x000000019810fb4c xpc_main + 148
10 Foundation 0x0000000198834534 +[NSXPCListener serviceListener] + 0
11 PlugInKit 0x00000001a599fd50 0x1a5989000 + 93520
12 PlugInKit 0x00000001a599fa68 0x1a5989000 + 92776
13 PlugInKit 0x00000001a59a015c 0x1a5989000 + 94556
14 Foundation 0x0000000198a0d2c0 NSExtensionMain + 64
15 libdyld.dylib 0x000000019833d8f0 start + 4
Thread 1 Crashed:
0 libsystem_c.dylib 0x000000019819e9d0 __abort + 144
1 libsystem_c.dylib 0x000000019819e9d0 __abort + 144
2 libsystem_c.dylib 0x000000019819e940 __abort + 0
3 libc++abi.dylib 0x0000000198306cc0 __cxxabiv1::__aligned_malloc_with_fallback+ 76992 (unsigned long) + 0
4 libc++abi.dylib 0x00000001982f8e10 demangling_unexpected_handler+ 19984 () + 0
5 libobjc.A.dylib 0x000000019825fe80 _objc_terminate+ 24192 () + 124
6 libc++abi.dylib 0x000000019830614c std::__terminate(void (*)+ 74060 ()) + 16
7 libc++abi.dylib 0x0000000198308bd8 __cxa_get_exception_ptr + 0
8 libc++abi.dylib 0x0000000198308b98 __cxxabiv1::exception_cleanup_func+ 84888 (_Unwind_Reason_Code, _Unwind_Exception*) + 0
9 libobjc.A.dylib 0x000000019825fcf8 _objc_exception_destructor+ 23800 (void*) + 0
10 Foundation 0x0000000198a151fc -[NSISEngine tryToOptimizeReturningMutuallyExclusiveConstraints] + 0
11 Foundation 0x000000019882207c -[NSISEngine _optimizeWithoutRebuilding] + 68
12 Foundation 0x0000000198821f98 -[NSISEngine optimize] + 112
13 Foundation 0x0000000198821c0c -[NSISEngine performPendingChangeNotifications] + 112
14 UIKitCore 0x000000019ca97e88 -[UIView+ 15605384 (CALayerDelegate) _wantsReapplicationOfAutoLayoutWithLayoutDirtyOnEntry:] + 172
15 UIKitCore 0x000000019ca988c4 -[UIView+ 15608004 (CALayerDelegate) layoutSublayersOfLayer:] + 2248
16 QuartzCore 0x000000019f02b724 -[CALayer layoutSublayers] + 284
17 QuartzCore 0x000000019f03187c CA::Layer::layout_if_needed+ 1407100 (CA::Transaction*) + 468
18 QuartzCore 0x000000019f03c3c0 CA::Layer::layout_and_display_if_needed+ 1450944 (CA::Transaction*) + 140
19 QuartzCore 0x000000019ef84f1c CA::Context::commit_transaction+ 700188 (CA::Transaction*, double) + 296
20 QuartzCore 0x000000019efae8bc CA::Transaction::commit+ 870588 () + 676
21 QuartzCore 0x000000019efaf85c CA::Transaction::release_thread+ 874588 (void*) + 228
22 libsystem_pthread.dylib 0x0000000198256f8c _pthread_tsd_cleanup + 580
23 libsystem_pthread.dylib 0x0000000198253df4 _pthread_exit + 80
24 libsystem_pthread.dylib 0x0000000198254e64 _pthread_wqthread_legacy_worker_wrap + 0
25 libsystem_pthread.dylib 0x0000000198254c04 _pthread_wqthread + 416
26 libsystem_pthread.dylib 0x0000000198257740 start_wqthread + 8
Thread 2 name: com.apple.uikit.eventfetch-thread
Thread 2:
0 libsystem_kernel.dylib 0x0000000198311198 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x000000019831060c mach_msg + 72
2 CoreFoundation 0x00000001984bb468 __CFRunLoopServiceMachPort + 148
3 CoreFoundation 0x00000001984b649c __CFRunLoopRun + 1160
4 CoreFoundation 0x00000001984b5ce8 CFRunLoopRunSpecific + 424
5 Foundation 0x00000001987f901c -[NSRunLoop+ 32796 (NSRunLoop) runMode:beforeDate:] + 228
6 Foundation 0x00000001987f8efc -[NSRunLoop+ 32508 (NSRunLoop) runUntilDate:] + 88
7 UIKitCore 0x000000019c6875dc -[UIEventFetcher threadMain] + 152
8 Foundation 0x0000000198927e20 __NSThread__start__ + 848
9 libsystem_pthread.dylib 0x0000000198253d98 _pthread_start + 156
10 libsystem_pthread.dylib 0x000000019825774c thread_start + 8
Thread 3:
0 libsystem_pthread.dylib 0x0000000198257738 start_wqthread + 0
Thread 4 name: com.apple.NSURLConnectionLoader
Thread 4:
0 libsystem_kernel.dylib 0x0000000198311198 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x000000019831060c mach_msg + 72
2 CoreFoundation 0x00000001984bb468 __CFRunLoopServiceMachPort + 148
3 CoreFoundation 0x00000001984b649c __CFRunLoopRun + 1160
4 CoreFoundation 0x00000001984b5ce8 CFRunLoopRunSpecific + 424
5 CFNetwork 0x000000019b776894 0x19b775000 + 6292
6 Foundation 0x0000000198927e20 __NSThread__start__ + 848
7 libsystem_pthread.dylib 0x0000000198253d98 _pthread_start + 156
8 libsystem_pthread.dylib 0x000000019825774c thread_start + 8
Thread 5:
0 libsystem_pthread.dylib 0x0000000198257738 start_wqthread + 0
Thread 6:
0 libsystem_pthread.dylib 0x0000000198257738 start_wqthread + 0
Thread 7:
0 libsystem_pthread.dylib 0x0000000198257738 start_wqthread + 0
Thread 1 crashed with ARM Thread State (64-bit):
x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0x0000000000000001
x4: 0x0000000000000000 x5: 0x0000000000989680 x6: 0x000000000000006e x7: 0xffffffffffffffec
x8: 0x00000000ffffffe7 x9: 0x00000001e565b228 x10: 0x00000000000003e8 x11: 0x000000000000000b
x12: 0x00000001d388d080 x13: 0x0000000000000001 x14: 0x0000000000000010 x15: 0x0000000000000007
x16: 0x0000000000000030 x17: 0x0000000000000000 x18: 0x0000000000000000 x19: 0x000000016fa62b58
x20: 0x00000001e2581810 x21: 0x000000016fa62c10 x22: 0x0000000281b4ce40 x23: 0x00000001d3b33000
x24: 0x0000000000000001 x25: 0x0000000000000068 x26: 0x000000000000009c x27: 0x0000000000000068
x28: 0x000000002b310019 fp: 0x000000016fa62b70 lr: 0x000000019819e9d0
sp: 0x000000016fa62b40 pc: 0x000000019819e9d0 cpsr: 0x40000000
esr: 0xf2000001 Address size fault
Look, Your app crashed at:
Triggered by Thread: 1
and use
[CALayer layoutSublayers]
looks like, You're updating UI not in main thread somewhere
Whenever you see something like this
1 libobjc.A.dylib 0x19825fbcc objc_exception_throw + 55
You should go to the breakpoints tab in Xcode, click the + button, then Exception Breakpoint...
This will create a breakpoint called "All Objective-C exceptions". This will pause the debugger at the moment the exception is thrown, letting you see the exact misuse of Apple's API that is causing the exception.
My app opens up another app and crashes on the splash screen when the user returns to my app.
I haven't been able to replicate the issue and have gone through the debug logs to no avail so far. I think the crash relates to application:openURL:options in App Delegate.
Any ideas?
Here's my code for that method:
-(BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options {
NSString *string = [options objectForKey:UIApplicationOpenURLOptionsSourceApplicationKey];
if (string && [string hasPrefix:#"com.squareup.square"]) {
PFObject *parseOrder = self.dataManager.parseOrderObject;
if (parseOrder && url && options) {
[self.dataExtraction squareUploadSuccessfulPaymentHelperWithParseOrder:parseOrder
URL:url
options:options];
}
return YES;
}
return NO;
}
Here are the logs:
Incident Identifier: 4506A316-557A-4E89-9A24-3A48AB167EE4
CrashReporter Key: ba26439f76bc207f8db936b344220e545a0b368d
Hardware Model: iPad5,4
Process: APPNAME [974]
Path: /private/var/containers/Bundle/Application/8810679A-29AB-41E1-8A9D-B08D1C68B72B/APPNAME.app/APPNAME
Identifier: com.NAME.APPNAME
Version: 1 (1.47)
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: com.NAME.APPNAME [815]
Date/Time: 2018-03-07 14:45:27.1669 -0500
Launch Time: 2018-03-07 14:45:26.2575 -0500
OS Version: iPhone OS 10.1.1 (14B100)
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
Filtered syslog:
None found
Last Exception Backtrace:
0 CoreFoundation 0x187a821c0 __exceptionPreprocess + 124
1 libobjc.A.dylib 0x1864bc55c objc_exception_throw + 55
2 CoreFoundation 0x187961600 -[__NSPlaceholderArray initWithObjects:count:] + 311
3 CoreFoundation 0x18796d38c +[NSArray arrayWithObjects:count:] + 51
4 Parse 0x10071823c 0x100690000 + 557628
5 APPNAME 0x100149ae4 0x1000d4000 + 482020
6 APPNAME 0x100148e64 0x1000d4000 + 478820
7 APPNAME 0x10014827c 0x1000d4000 + 475772
8 APPNAME 0x1001ab4fc 0x1000d4000 + 881916
9 UIKit 0x18db663a4 __45-[UIApplication _applicationOpenURL:payload:]_block_invoke + 751
10 UIKit 0x18db65e30 -[UIApplication _applicationOpenURL:payload:] + 655
11 UIKit 0x18db58ba8 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4371
12 UIKit 0x18db5e5c8 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1655
13 UIKit 0x18db72e60 __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke.3137 + 47
14 UIKit 0x18db5b5ac -[UIApplication workspaceDidEndTransaction:] + 167
15 FrontBoardServices 0x1896298bc __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 35
16 FrontBoardServices 0x189629728 -[FBSSerialQueue _performNext] + 175
17 FrontBoardServices 0x189629ad0 -[FBSSerialQueue _performNextFromRunLoopSource] + 55
18 CoreFoundation 0x187a30278 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 23
19 CoreFoundation 0x187a2fbc0 __CFRunLoopDoSources0 + 523
20 CoreFoundation 0x187a2d7c0 __CFRunLoopRun + 803
21 CoreFoundation 0x18795c048 CFRunLoopRunSpecific + 443
22 UIKit 0x18d9412b0 -[UIApplication _run] + 607
23 UIKit 0x18d93c034 UIApplicationMain + 207
24 APPNAME 0x1001b809c 0x1000d4000 + 934044
25 libdyld.dylib 0x1869405b8 start + 3
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x0000000186a52014 __pthread_kill + 8
1 libsystem_pthread.dylib 0x0000000186b1a450 pthread_kill + 112
2 libsystem_c.dylib 0x00000001869c63e0 abort + 140
3 libc++abi.dylib 0x00000001864912d4 __cxa_bad_cast + 0
4 libc++abi.dylib 0x00000001864aecc0 default_unexpected_handler+ 126144 () + 0
5 libobjc.A.dylib 0x00000001864bc844 _objc_terminate+ 34884 () + 124
6 libc++abi.dylib 0x00000001864ab66c std::__terminate(void (*)+ 112236 ()) + 16
7 libc++abi.dylib 0x00000001864ab234 __cxa_rethrow + 144
8 libobjc.A.dylib 0x00000001864bc71c objc_exception_rethrow + 44
9 CoreFoundation 0x000000018795c0bc CFRunLoopRunSpecific + 560
10 UIKit 0x000000018d9412b0 -[UIApplication _run] + 608
11 UIKit 0x000000018d93c034 UIApplicationMain + 208
12 APPNAME 0x00000001001b809c 0x1000d4000 + 934044
13 libdyld.dylib 0x00000001869405b8 start + 4
Thread 1:
0 libsystem_kernel.dylib 0x0000000186a52a88 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x0000000186b1635c _pthread_wqthread + 1452
2 libsystem_pthread.dylib 0x0000000186b15da4 start_wqthread + 4
Thread 2:
0 libsystem_kernel.dylib 0x0000000186a52a88 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x0000000186b1635c _pthread_wqthread + 1452
2 libsystem_pthread.dylib 0x0000000186b15da4 start_wqthread + 4
Thread 3:
0 libsystem_pthread.dylib 0x0000000186b15da0 start_wqthread + 0
Thread 4 name: com.apple.NSURLConnectionLoader
Thread 4:
0 libsystem_kernel.dylib 0x0000000186a3416c mach_msg_trap + 8
1 libsystem_kernel.dylib 0x0000000186a33fdc mach_msg + 72
2 CoreFoundation 0x0000000187a2fcec __CFRunLoopServiceMachPort + 192
3 CoreFoundation 0x0000000187a2d908 __CFRunLoopRun + 1132
4 CoreFoundation 0x000000018795c048 CFRunLoopRunSpecific + 444
5 CFNetwork 0x000000018814dfd0 +[NSURLConnection+ 847824 (Loader) _resourceLoadLoop:] + 336
6 Foundation 0x000000018856b47c __NSThread__start__ + 1024
7 libsystem_pthread.dylib 0x0000000186b18850 _pthread_body + 240
8 libsystem_pthread.dylib 0x0000000186b18760 _pthread_body + 0
9 libsystem_pthread.dylib 0x0000000186b15dac thread_start + 4
Thread 5:
0 libsystem_pthread.dylib 0x0000000186b15da0 start_wqthread + 0
Thread 6 name: Dispatch queue: com.parse.PFCommandCache.processing
Thread 6:
0 libsystem_kernel.dylib 0x0000000186a51e1c __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x0000000186b179c0 _pthread_cond_wait + 640
2 Foundation 0x00000001884be590 -[NSCondition wait] + 240
3 Bolts 0x0000000100498218 0x100484000 + 82456
4 Parse 0x0000000100698b1c 0x100690000 + 35612
5 Parse 0x0000000100698ad4 0x100690000 + 35540
6 Parse 0x00000001006cedc8 0x100690000 + 257480
7 Parse 0x00000001006ce930 0x100690000 + 256304
8 Parse 0x00000001006ce4d0 0x100690000 + 255184
9 libdispatch.dylib 0x000000018690d1c0 _dispatch_client_callout + 16
10 libdispatch.dylib 0x000000018691a008 _dispatch_continuation_pop + 576
11 libdispatch.dylib 0x0000000186926648 _dispatch_source_latch_and_call + 204
12 libdispatch.dylib 0x000000018690f164 _dispatch_source_invoke + 820
13 libdispatch.dylib 0x000000018691b278 _dispatch_queue_serial_drain + 468
14 libdispatch.dylib 0x00000001869109a8 _dispatch_queue_invoke + 652
15 libdispatch.dylib 0x000000018691d38c _dispatch_root_queue_drain + 572
16 libdispatch.dylib 0x000000018691d0ec _dispatch_worker_thread3 + 124
17 libsystem_pthread.dylib 0x0000000186b162b8 _pthread_wqthread + 1288
18 libsystem_pthread.dylib 0x0000000186b15da4 start_wqthread + 4
Thread 7 name: com.apple.uikit.eventfetch-thread
Thread 7:
0 libsystem_kernel.dylib 0x0000000186a3416c mach_msg_trap + 8
1 libsystem_kernel.dylib 0x0000000186a33fdc mach_msg + 72
2 CoreFoundation 0x0000000187a2fcec __CFRunLoopServiceMachPort + 192
3 CoreFoundation 0x0000000187a2d908 __CFRunLoopRun + 1132
4 CoreFoundation 0x000000018795c048 CFRunLoopRunSpecific + 444
5 Foundation 0x000000018846da8c -[NSRunLoop+ 51852 (NSRunLoop) runMode:beforeDate:] + 304
6 Foundation 0x000000018848e57c -[NSRunLoop+ 185724 (NSRunLoop) runUntilDate:] + 96
7 UIKit 0x000000018e2b6a2c -[UIEventFetcher threadMain] + 136
8 Foundation 0x000000018856b47c __NSThread__start__ + 1024
9 libsystem_pthread.dylib 0x0000000186b18850 _pthread_body + 240
10 libsystem_pthread.dylib 0x0000000186b18760 _pthread_body + 0
11 libsystem_pthread.dylib 0x0000000186b15dac thread_start + 4
Thread 8:
0 libsystem_pthread.dylib 0x0000000186b15da0 start_wqthread + 0
Thread 9:
0 libsystem_pthread.dylib 0x0000000186b15da0 start_wqthread + 0
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0x00000001700f6437
x4: 0x00000001864afbc3 x5: 0x000000016fd2b580 x6: 0x000000000000006e x7: 0xffffffffffffffec
x8: 0x0000000008000000 x9: 0x0000000004000000 x10: 0x000000000000000b x11: 0x0000000000000010
x12: 0x00000001869dd772 x13: 0x0000000000000000 x14: 0x0000030000000300 x15: 0x0000000000000000
x16: 0x0000000000000148 x17: 0x0000000000000000 x18: 0x0000000000000000 x19: 0x0000000000000006
x20: 0x00000001ac2cfc40 x21: 0x000000016fd2b580 x22: 0x00000001ac2d6bb8 x23: 0x0000000000000001
x24: 0x000000017001aad0 x25: 0x0000000000000000 x26: 0x0000000000000001 x27: 0x0000000000000000
x28: 0x000000016fd2bbd8 fp: 0x000000016fd2b4e0 lr: 0x0000000186b1a450
sp: 0x000000016fd2b4c0 pc: 0x0000000186a52014 cpsr: 0x00000000
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...
}