Hi,
For the past few weeks, I’ve noticed users on my app are experiencing an intermittent crash on iOS. The app is built with Unity 2021.2.8f1. Affected users are both iPad and iPhone users, on both iOS 14 and 15.
In all cases, the app seems to be killed by iOS due to freezing. Some cases due to “exhausted real (wall clock) time allowance of 10.00 seconds”, other cases due to “failed to terminate gracefully after 5.0s”
However, in all cases, the process seems to be waiting for a graphics job to complete. Users report that the app visually freezes until it eventually crashes while this is happening.
Below is the stack trace that seems to be common to all of these issues. Any guidance/tips on debugging would be greatly appreciated.
Exception Type: EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Thread 0 name:
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00000001b8d7c540 semaphore_wait_trap + 8
1 libdispatch.dylib 0x000000018142fc00 _dispatch_sema4_wait + 28 (lock.c:139)
2 libdispatch.dylib 0x00000001814302b8 _dispatch_semaphore_wait_slow + 132 (semaphore.c:132)
3 UnityFramework 0x000000010971ec48 Acquire + 12 (Baselib_SystemSemaphore_DarwinApi.inl.h:36)
4 UnityFramework 0x000000010971ec48 Baselib_SystemSemaphore_Acquire + 12 (Baselib_SystemSemaphore_DarwinApi.inl.h:62)
5 UnityFramework 0x000000010971ec48 UnityClassic::Baselib_SystemSemaphore_Acquire(UnityClassic::Baselib_SystemSemaphore_Handle) + 28 (Baselib_SystemSemaphore_CProxy.inl.h:19)
6 UnityFramework 0x000000010902bef4 Baselib_Semaphore_Acquire + 8 (Baselib_Semaphore_SemaphoreBased.inl.h:47)
7 UnityFramework 0x000000010902bef4 WaitForSignal + 8 (Semaphore.h:23)
8 UnityFramework 0x000000010902bef4 JobQueue::WaitForJobGroupID(JobGroupID, JobQueue::JobQueueWorkStealMode) + 628 (JobQueue.cpp:1771)
9 UnityFramework 0x0000000109480b80 GfxDevice::EndAsyncJobFrame() + 36 (GfxDevice.cpp:807)
10 UnityFramework 0x000000010947f7cc GfxDevice::EndGraphicsJobs(GfxDeviceGraphicsJobsSyncPoint) + 64 (GfxDevice.cpp:336)
11 UnityFramework 0x0000000109046260 ExecutePlayerLoop(NativePlayerLoopSystem*) + 100 (PlayerLoop.cpp:383)
12 UnityFramework 0x00000001090462a0 ExecutePlayerLoop(NativePlayerLoopSystem*) + 164 (PlayerLoop.cpp:404)
13 UnityFramework 0x00000001090464f8 PlayerLoop() + 272 (PlayerLoop.cpp:508)
14 UnityFramework 0x000000010959f320 UnityPlayerLoopImpl(bool) + 112 (LibEntryPoint.mm:327)
15 UnityFramework 0x00000001087d78e8 UnityRepaint + 12 (UnityAppController+Rendering.mm:241)
16 UnityFramework 0x00000001087d78e8 -[UnityAppController(Rendering) repaint] + 108 (UnityAppController+Rendering.mm:90)
17 UnityFramework 0x00000001087d7850 -[UnityAppController(Rendering) repaintDisplayLink] + 108 (UnityAppController+Rendering.mm:71)
18 QuartzCore 0x000000018548bd1c CA::smile:isplay::smile:isplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 756 (CADisplay.mm:4177)
19 QuartzCore 0x0000000185492950 display_timer_callback(__CFMachPort*, void*, long, void*) + 372 (CADisplayTimer.cpp:219)
20 CoreFoundation 0x000000018172f440 __CFMachPortPerform + 176 (CFMachPort.c:549)
21 CoreFoundation 0x00000001817727d4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 60 (CFRunLoop.c:1996)
22 CoreFoundation 0x0000000181775fe0 __CFRunLoopDoSource1 + 596 (CFRunLoop.c:2136)
23 CoreFoundation 0x000000018172febc __CFRunLoopRun + 2380 (CFRunLoop.c:3172)
24 CoreFoundation 0x0000000181743468 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
25 GraphicsServices 0x000000019d2ce38c GSEventRunModal + 164 (GSEvent.c:2200)
26 UIKitCore 0x00000001840e5088 -[UIApplication _run] + 1100 (UIApplication.m:3493)
27 UIKitCore 0x0000000183e63958 UIApplicationMain + 2092 (UIApplication.m:5046)
28 UnityFramework 0x00000001087d7324 -[UnityFramework runUIApplicationMainWithArgc:argv:] + 108 (main.mm:96)
29 TruffleHogs 0x0000000102a19ff0 main + 68 (main.mm:26)
30 dyld 0x0000000102da5aa4 start + 520 (dyldMain.cpp:879)