The application crashes in the App Store when launch on iPhone with iOS 15.3.1.

My application is currently crashing in production in iPhone devices running iOS 15.x. The app will work as normal while running developer mode, enterprise builds and Test Flight builds. Unfortunately, I am unable to reproduce this issue even app is downloaded from the app store. I observed crash is happening at main.m. Can someone help me to reproduce this issue? How to read this crash log file?

Please find the crash log details attached.

Incident Identifier: xxxxxxxxxxxxxxxxxxxxxxxxx
Hardware Model:      iPhone14,2
Process:             MyApplication [3602]
Path:                /private/var/containers/Bundle/Application/2F3E007D-053E-4EC2-9F15-FA2970B1BA87/MyApplication.app/MyApplication
Identifier:          xxxxxxxxxxxxxxxxxxxxxxxxx
Version:             2.5.0 (25)
AppStoreTools:       13C90b
AppVariant:          1:iPhone14,2:15
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           xxxxxxxxxxxxxxxxxxxxxxxxx [1039]

Date/Time:           2022-03-04 14:15:23.6227 +0900
Launch Time:         2022-03-04 14:14:10.6386 +0900
OS Version:          iPhone OS 15.3.1 (19D52)
Release Type:        User
Baseband Version:    1.41.06
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                	0x1811c90fc __exceptionPreprocess + 220 (NSException.m:200)
1   libobjc.A.dylib               	0x199a19d64 objc_exception_throw + 60 (objc-exception.mm:565)
2   UIKitCore                     	0x183aad988 -[UIViewController _presentViewController:withAnimationController:completion:] + 5616 (UIViewController.m:0)
3   UIKitCore                     	0x1838983f8 __63-[UIViewController _presentViewController:animated:completion:]_block_invoke + 108 (UIViewController.m:8655)
4   UIKitCore                     	0x183835c74 -[UIViewController _performCoordinatedPresentOrDismiss:animated:] + 536 (UIViewController.m:8795)
5   UIKitCore                     	0x1839ab2e0 -[UIViewController _presentViewController:animated:completion:] + 208 (UIViewController.m:8662)
6   UIKitCore                     	0x1838bd884 -[UIViewController presentViewController:animated:completion:] + 188 (UIViewController.m:8739)
7   libdispatch.dylib             	0x180e39924 _dispatch_call_block_and_release + 32 (init.c:1517)
8   libdispatch.dylib             	0x180e3b670 _dispatch_client_callout + 20 (object.m:560)
9   libdispatch.dylib             	0x180e49b70 _dispatch_main_queue_callback_4CF + 944 (inline_internal.h:2601)
10  CoreFoundation                	0x181181d84 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 (CFRunLoop.c:1795)
11  CoreFoundation                	0x18113bf5c __CFRunLoopRun + 2540 (CFRunLoop.c:3144)
12  CoreFoundation                	0x18114f468 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
13  GraphicsServices              	0x19ccf338c GSEventRunModal + 164 (GSEvent.c:2200)
14  UIKitCore                     	0x183af25d0 -[UIApplication _run] + 1100 (UIApplication.m:3493)
15  UIKitCore                     	0x183870f74 UIApplicationMain + 364 (UIApplication.m:5047)
16  MyApplication               	        0x10231088c main + 80 (main.m:8)
17  dyld                          	0x102a8daa4 start + 520 (dyldMain.cpp:879)

Thread 0 name:
Thread 0 Crashed:
0   libsystem_kernel.dylib        	0x00000001b888b964 __pthread_kill + 8
1   libsystem_pthread.dylib       	0x00000001f2551378 pthread_kill + 268 (pthread.c:1668)
2   libsystem_c.dylib             	0x000000018c094f50 abort + 164 (abort.c:118)
3   libc++abi.dylib               	0x0000000199b21bc4 abort_message + 132 (abort_message.cpp:78)
4   libc++abi.dylib               	0x0000000199b12fd8 demangling_terminate_handler() + 332 (cxa_default_handlers.cpp:71)
5   libobjc.A.dylib               	0x0000000199a1fe34 _objc_terminate() + 144 (objc-exception.mm:701)
6   libc++abi.dylib               	0x0000000199b20f58 std::__terminate(void (*)()) + 20 (cxa_handlers.cpp:59)
7   libc++abi.dylib               	0x0000000199b20ef4 std::terminate() + 64 (cxa_handlers.cpp:88)
8   libdispatch.dylib             	0x0000000180e3b684 _dispatch_client_callout + 40 (object.m:563)
9   libdispatch.dylib             	0x0000000180e49b70 _dispatch_main_queue_callback_4CF + 944 (inline_internal.h:2601)
10  CoreFoundation                	0x0000000181181d84 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 (CFRunLoop.c:1795)
11  CoreFoundation                	0x000000018113bf5c __CFRunLoopRun + 2540 (CFRunLoop.c:3144)
12  CoreFoundation                	0x000000018114f468 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
13  GraphicsServices              	0x000000019ccf338c GSEventRunModal + 164 (GSEvent.c:2200)
14  UIKitCore                     	0x0000000183af25d0 -[UIApplication _run] + 1100 (UIApplication.m:3493)
15  UIKitCore                     	0x0000000183870f74 UIApplicationMain + 364 (UIApplication.m:5047)
16  MyApplication               	        0x000000010231088c main + 80 (main.m:8)
17  dyld                          	0x0000000102a8daa4 start + 520 (dyldMain.cpp:879)

Thread 1:
0   libsystem_pthread.dylib       	0x00000001f254ae8c start_wqthread + 0

Thread 2 name:
Thread 2:
0   libsystem_kernel.dylib        	0x00000001b88861a4 __ulock_wait + 8
1   libdispatch.dylib             	0x0000000180e3c064 _dlock_wait + 56 (lock.c:326)
2   libdispatch.dylib             	0x0000000180e3be08 _dispatch_thread_event_wait_slow + 56 (lock.c:366)
3   libdispatch.dylib             	0x0000000180e4abac __DISPATCH_WAIT_FOR_QUEUE__ + 364 (lock.h:330)
4   libdispatch.dylib             	0x0000000180e4a754 _dispatch_sync_f_slow + 144 (queue.c:1762)
5   libsystem_trace.dylib         	0x000000019bb4b82c ___os_state_request_for_self_block_invoke + 368 (state.c:199)
6   libdispatch.dylib             	0x0000000180e39924 _dispatch_call_block_and_release + 32 (init.c:1517)
7   libdispatch.dylib             	0x0000000180e3b670 _dispatch_client_callout + 20 (object.m:560)
8   libdispatch.dylib             	0x0000000180e42df4 _dispatch_lane_serial_drain + 672 (inline_internal.h:2601)
9   libdispatch.dylib             	0x0000000180e4399c _dispatch_lane_invoke + 444 (queue.c:3937)
10  libdispatch.dylib             	0x0000000180e4e1b8 _dispatch_workloop_worker_thread + 656 (queue.c:6727)
11  libsystem_pthread.dylib       	0x00000001f254b0f4 _pthread_wqthread + 288 (pthread.c:2599)
12  libsystem_pthread.dylib       	0x00000001f254ae94 start_wqthread + 8

Thread 3 name:
Thread 3:
0   libsystem_kernel.dylib        	0x00000001b8885504 mach_msg_trap + 8
1   libsystem_kernel.dylib        	0x00000001b8885b9c mach_msg + 76 (mach_msg.c:119)
2   CoreFoundation                	0x0000000181137738 __CFRunLoopServiceMachPort + 372 (CFRunLoop.c:2646)
3   CoreFoundation                	0x000000018113ba2c __CFRunLoopRun + 1212 (CFRunLoop.c:3000)
4   CoreFoundation                	0x000000018114f468 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
5   Foundation                    	0x000000018296dc84 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 236 (NSRunLoop.m:373)
6   Foundation                    	0x00000001829aedb8 -[NSRunLoop(NSRunLoop) runUntilDate:] + 92 (NSRunLoop.m:420)
7   UIKitCore                     	0x0000000183a6b74c -[UIEventFetcher threadMain] + 524 (UIEventFetcher.m:1167)
8   Foundation                    	0x00000001829bd3fc __NSThread__start__ + 808 (NSThread.m:972)
9   libsystem_pthread.dylib       	0x00000001f254b9a4 _pthread_start + 148 (pthread.c:891)
10  libsystem_pthread.dylib       	0x00000001f254aea0 thread_start + 8

Thread 4:
0   libsystem_pthread.dylib       	0x00000001f254ae8c start_wqthread + 0

Thread 5 name:
Thread 5:
0   libsystem_kernel.dylib        	0x00000001b8885504 mach_msg_trap + 8
1   libsystem_kernel.dylib        	0x00000001b8885b9c mach_msg + 76 (mach_msg.c:119)
2   CoreFoundation                	0x0000000181137738 __CFRunLoopServiceMachPort + 372 (CFRunLoop.c:2646)
3   CoreFoundation                	0x000000018113ba2c __CFRunLoopRun + 1212 (CFRunLoop.c:3000)
4   CoreFoundation                	0x000000018114f468 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
5   AudioSession                  	0x000000018a56a308 CADeprecated::GenericRunLoopThread::Entry(void*) + 164 (GenericRunLoopThread.h:95)
6   AudioSession                  	0x000000018a573d64 CADeprecated::CAPThread::Entry(CADeprecated::CAPThread*) + 92 (CAPThread.cpp:324)
7   libsystem_pthread.dylib       	0x00000001f254b9a4 _pthread_start + 148 (pthread.c:891)
8   libsystem_pthread.dylib       	0x00000001f254aea0 thread_start + 8


Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000   x1: 0x0000000000000000   x2: 0x0000000000000000   x3: 0x0000000000000000
    x4: 0x0000000199b250ad   x5: 0x000000016daf6420   x6: 0x000000000000006e   x7: 0x0000000000006700
    x8: 0xfd6114d3ef1a2115   x9: 0xfd6114d2edb42495  x10: 0x0000000000000002  x11: 0x000000000000000b
   x12: 0x00000000f6a3a024  x13: 0x0000000076a3a000  x14: 0x0000000000000010  x15: 0x0000000000000002
   x16: 0x0000000000000148  x17: 0x0000000102ae0580  x18: 0x00000001056af8bc  x19: 0x0000000000000006
   x20: 0x0000000000000103  x21: 0x0000000102ae0660  x22: 0x000000016dd22730  x23: 0x0000000000000114
   x24: 0x0000000000000000  x25: 0x0000000102ae0660  x26: 0x000000016dd22730  x27: 0x000000000000000f
   x28: 0x0000000002ffffff   fp: 0x000000016daf6390   lr: 0x00000001f2551378
    sp: 0x000000016daf6370   pc: 0x00000001b888b964 cpsr: 0x40001000
   esr: 0x56000080  Address size fault


Binary Images:
0x102308000 - 0x10269bfff MyApplication arm64  <7ec2cfd8bd0b3107abff9f33531796e2> /private/var/containers/Bundle/Application/2F3E007D-053E-4EC2-9F15-FA2970B1BA87/MyApplication.app/MyApplication
0x102a74000 - 0x102acbfff dyld arm64e  <780553c7d39f322a8cb9f4f6de52610d> /usr/lib/dyld
0x180e37000 - 0x180e7dfff libdispatch.dylib arm64e  <bd02a62584753fd68dc38aed25d1573b> /usr/lib/system/libdispatch.dylib
0x181130000 - 0x181583fff CoreFoundation arm64e  <e2f84645290531ef8ec73cc19c3cddb3> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
0x182955000 - 0x182c5bfff Foundation arm64e  <925a43cdeaf2316193783ed87468301d> /System/Library/Frameworks/Foundation.framework/Foundation
0x1835d9000 - 0x184e64fff UIKitCore arm64e  <920a0ee6d2663058814427a27b23ad62> /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore
0x18a564000 - 0x18a58dfff AudioSession arm64e  <cfe93669499d3d2b972b0f516064a8a6> /System/Library/PrivateFrameworks/AudioSession.framework/AudioSession
0x18c075000 - 0x18c0f3fff libsystem_c.dylib arm64e  <9b299ee5b3793856848b524d82640dbc> /usr/lib/system/libsystem_c.dylib
0x199a04000 - 0x199a3dfff libobjc.A.dylib arm64e  <56a134b6c3d83d91b1fc7bdb75c5903b> /usr/lib/libobjc.A.dylib
0x199b0e000 - 0x199b27fff libc++abi.dylib arm64e  <b9c8dab929c637fea9b5e8c22b5bc9f0> /usr/lib/libc++abi.dylib
0x19bb42000 - 0x19bb5afff libsystem_trace.dylib arm64e  <1feb54511285334a80b1284862ebedb1> /usr/lib/system/libsystem_trace.dylib
0x19ccf2000 - 0x19ccfafff GraphicsServices arm64e  <b40e3b1790c73ebcb6bc8c7b605f47a9> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
0x1b8884000 - 0x1b88b7fff libsystem_kernel.dylib arm64e  <ff3ee512a0bc3123b983d365a71fb06a> /usr/lib/system/libsystem_kernel.dylib
0x1f254a000 - 0x1f2555fff libsystem_pthread.dylib arm64e  <a17d07cfe86a392387c4921045898a8a> /usr/lib/system/libsystem_pthread.dylib

EOF
Exception Type:  EXC_CRASH (SIGABRT)

This indicates that the app crashed itself by calling abort. The presence of the Last Exception Backtrace section confirms that this was caused by an unhandled language exception:

Last Exception Backtrace:
0   CoreFoundation    … __exceptionPreprocess + 220 (NSException.m:200)
1   libobjc.A.dylib   … objc_exception_throw + 60 (objc-exception.mm:565)
2   UIKitCore         … -[UIViewController _presentViewController:withAnimationController:completion:] + 5616 …
3   UIKitCore         … __63-[UIViewController _presentViewController:animated:completion:]_block_invoke + 108 …
4   UIKitCore         … -[UIViewController _performCoordinatedPresentOrDismiss:animated:] + 536 …
5   UIKitCore         … -[UIViewController _presentViewController:animated:completion:] + 208 …
6   UIKitCore         … -[UIViewController presentViewController:animated:completion:] + 188 …
7   libdispatch.dylib … _dispatch_call_block_and_release + 32 (init.c:1517)

The backtrace indicates that you’re tripping an assert in the UIKit view controller presentation subsystem. I’m not a UIKit expert, so I can’t offer any further insight. I’ve added the UIKit tag to your question and hopefully someone else can chime in.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I have same problem. how to solve it?

So many crashes of presentViewController, we are seeing from Nov 2023. Two of them were because of viewWillTransition and UIAlertController, so we fully removed these two from our app.

But now, after removing , we saw this issue popping up again showing GameCenterUI.

Last Exception Backtrace:
0   CoreFoundation                	0x193c28f20 __exceptionPreprocess + 164 (NSException.m:249)
1   libobjc.A.dylib               	0x18bad2018 objc_exception_throw + 60 (objc-exception.mm:356)
2   UIKitCore                     	0x196394154 -[UIViewController _presentViewController:withAnimationController:completion:] + 4272 (UIViewController.m:0)
3   UIKitCore                     	0x1963957e4 __63-[UIViewController _presentViewController:animated:completion:]_block_invoke + 88 (UIViewController.m:9733)
4   UIKitCore                     	0x19638f81c -[UIViewController _performCoordinatedPresentOrDismiss:animated:] + 484 (UIViewController.m:9999)
5   UIKitCore                     	0x19638f544 -[UIViewController _presentViewController:animated:completion:] + 188 (UIViewController.m:9740)
6   UIKitCore                     	0x19638f3d8 -[UIViewController presentViewController:animated:completion:] + 164 (UIViewController.m:9936)
7   GameCenterUICore              	0x21941d91c -[GKLocalPlayer(iOSAuthenticationUI) showViewController:usingPresentingViewController:wrapInNavController:] + 492 (GKLocalPlayer+iOSAuthenticationUI.m:87)
8   GameCenterUI                  	0x1bc2db5f8 __87-[GKLocalPlayer(AuthenticationExtras) showOnboardingUIFromViewController:signInOrigin:]_block_invoke.20 + 64 (GKLocalPlayer+AuthenticationExtras.m:248)
9   libdispatch.dylib             	0x19bacddd4 _dispatch_client_callout + 20 (object.m:576)
10  libdispatch.dylib             	0x19bad12d8 _dispatch_continuation_pop + 600 (queue.c:321)
11  libdispatch.dylib             	0x19bae51c8 _dispatch_source_latch_and_call + 420 (source.c:596)
12  libdispatch.dylib             	0x19bae3d8c _dispatch_source_invoke + 832 (source.c:961)
13  libdispatch.dylib             	0x19badc4b4 _dispatch_main_queue_drain + 748 (queue.c:7898)
14  libdispatch.dylib             	0x19badc1b8 _dispatch_main_queue_callback_4CF + 44 (queue.c:8058)
15  CoreFoundation                	0x193bfb710 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 (CFRunLoop.c:1780)
16  CoreFoundation                	0x193bf8914 __CFRunLoopRun + 1996 (CFRunLoop.c:3149)
17  CoreFoundation                	0x193bf7cd8 CFRunLoopRunSpecific + 608 (CFRunLoop.c:3420)
18  GraphicsServices              	0x1d8aa81a8 GSEventRunModal + 164 (GSEvent.c:2196)
19  UIKitCore                     	0x19623090c -[UIApplication _run] + 888 (UIApplication.m:3713)
20  UIKitCore                     	0x1962e49d0 UIApplicationMain + 340 (UIApplication.m:5303)
21  MyApp           	0x102875f7c main + 64 (AppDelegate.swift:20)
22  dyld                          	0x1b72a9e4c start + 2240 (dyldMain.cpp:1298)

After adding GameCenter 72 days ago and 60k session, we see this crash. Surprising , we updated our app 5 days ago with removing viewwilltransition & uialertccontroller so that presentviewcontroller dont happen.

But this popped up first and only time now.

The code for GameCenter, we are using in our UIKit code is - https://github.com/fserrazes/GameCenterKit

The application crashes in the App Store when launch on iPhone with iOS 15.3.1.
 
 
Q