Camera jitter and freezes after update to iOS 16

We’re using Unity 2019 with ARKit 4.0.8. Since the update to iOS 16, we notice two issues:

  1. The camera lags quite often and jitters (random distortions of the image)
  2. After a while, the app completely freezes. Sometimes, it is not even possible to swipe back to the home screen. Once it gets responsive again and switch back to our app, the camera is frozen as well. I have to restart the app to make it working again.

This is a super frustrating user experience. Any ideas how to resolve it? We’re not really able to update the app to a more recent Unity version, because some of the 3rd party packages we’re using aren’t compatible.

Here’s a stack trace of the time-point when the complete freeze occurs. The last lines will be repeated forever.

2022-09-21 18:10:01.274925+0200 Marbleverse[910:172654] Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service
2022-09-21 18:10:07.260921+0200 Marbleverse[910:172654] NatCorder: GIFRecorder prepared encoder at resolution 150x324 with 0.150000 frame duration
Thread Performance Checker: Thread running at QOS_CLASS_USER_INTERACTIVE waiting on a thread without a QoS class specified. Investigate ways to avoid priority inversions
PID: 910, TID: 172654
Backtrace

3 UnityFramework 0x000000010bd87118 Baselib_SystemSemaphore_Acquire + 28
4 UnityFramework 0x000000010b7c0010 _ZN15GfxDeviceClient16CreateGpuProgramE20ShaderGpuProgramTypeRK13dynamic_arrayIhLm0EER22CreateGpuProgramOutput + 408
5 UnityFramework 0x000000010ba2e704 _ZN9ShaderLab10SubProgram7CompileEv + 544
6 UnityFramework 0x000000010ba2f488 _ZNK9ShaderLab7Program40EnsureCompiledAndMarkUnsupportedIfFailedEPKNS_10SubProgramERK16ShaderKeywordSetPS4_R19ShaderSnippetResult + 64
7 UnityFramework 0x000000010ba2f694 _ZNK9ShaderLab7Program21GetMatchingSubProgramEPK6ShaderPKNS_4PassERK16ShaderKeywordSetjPS7_R19ShaderSnippetResultbb + 396

8 UnityFramework 0x000000010ba340a8 _ZNK9ShaderLab11ShaderState20FindSubProgramsToUseEPK6ShaderPKNS_4PassERNS_11SubProgramsERK17ShaderPassContextRK16ShaderKeywordSetb + 384
9 UnityFramework 0x000000010ba342e4 _ZNK9ShaderLab11ShaderState16ApplyShaderStateEjPK19ShaderPropertySheetRK17ShaderPassContextRK16ShaderKeywordSetP6ShaderPNS_4PassEPNS_11SubProgramsEPK22DeviceRenderStateBlock + 136
10 UnityFramework 0x000000010ba2d71c _ZN9ShaderLab4Pass9ApplyPassEjPK19ShaderPropertySheetR17ShaderPassContextP6ShaderiiPKNS_10GrabPassesEPNS_11SubProgramsEPK22DeviceRenderStateBlock + 200
11 UnityFramework 0x000000010b8bc0b0 ZN12ImageFilters4BlitER17ShaderPassContextP7TextureP13RenderTextureiPK18SharedMaterialDataPKcP6ShaderiNS_9BlitFlagsE11CubemapFaceRK8Vector2fSH + 820
12 UnityFramework 0x000000010b8b2150 ZN12ImageFilters4BlitER17ShaderPassContextP7TextureP13RenderTextureiP8MaterialiNS_9BlitFlagsE11CubemapFaceRK8Vector2fSC + 192
13 UnityFramework 0x000000010b8afaa4 _ZN12ImageFilters4BlitER17ShaderPassContextP7TextureP13RenderTextureiiRK8Vector2fS8_NS_9BlitFlagsE + 536
14 UnityFramework 0x000000010bb192e8 Z21Graphics_CUSTOM_Blit2P37ScriptingBackendNativeObjectPtrOpaqueS0 + 140
15 UnityFramework 0x000000010d211920 AsyncTextureInput_CommitFrame_m41BA6CC97A3033CEAD80B35B6F598EE3075D478F + 276
16 UnityFramework 0x000000010d212608 CameraInput_CommitFrame_mD3D3A4B0BD9800913DE6DDB297EBB9364591D331 + 452
17 UnityFramework 0x000000010d909ac0 Action_Invoke_mC8D676E5DDF967EC5D23DD0E96FB52AA499817FD + 276
18 UnityFramework 0x000000010b3c6694 Z65RuntimeInvoker_TrueVoid_t22962CB4C05B1D89B55A6E1139F0E87A90987017PFvvEPK10MethodInfoPvPS4 + 20
19 UnityFramework 0x000000010c141d24 _ZN6il2cpp2vm7Runtime6InvokeEPK10MethodInfoPvPS5_PP15Il2CppException + 116
20 UnityFramework 0x000000010baad1d4 _Z23scripting_method_invoke18ScriptingMethodPtr18ScriptingObjectPtrR18ScriptingArgumentsP21ScriptingExceptionPtrb + 116
21 UnityFramework 0x000000010bab11a8 _ZN19ScriptingInvocation6InvokeEP21ScriptingExceptionPtrb + 116
22 UnityFramework 0x000000010bac6290 _ZN13MonoBehaviour16CallUpdateMethodEi + 300
23 UnityFramework 0x000000010b902f98 _ZN20BaseBehaviourManager12CommonUpdateI16BehaviourManagerEEvv + 224
24 UnityFramework 0x000000010b9e84bc _Z17ExecutePlayerLoopP22NativePlayerLoopSystem + 88
25 UnityFramework 0x000000010b9e84f0 _Z17ExecutePlayerLoopP22NativePlayerLoopSystem + 140
26 UnityFramework 0x000000010b9e8758 _Z10PlayerLoopv + 356
27 UnityFramework 0x000000010bcc7ae0 _ZL19UnityPlayerLoopImplb + 224
28 UnityFramework 0x000000010b2f94d0 UnityRepaint + 116
29 UnityFramework 0x000000010b2f93ec -[UnityAppController(Rendering) repaintDisplayLink] + 64
30 QuartzCore 0x00000001bf92ea98 C4C4667B-6933-3B01-A37B-747CD0C00431 + 170648
31 QuartzCore 0x00000001bfa5d1c0 C4C4667B-6933-3B01-A37B-747CD0C00431 + 1409472
32 UIKitCore 0x00000001c0a7f678 7B942FA4-CB76-3375-9972-F58C14492FB4 + 6624888
33 UIKitCore 0x00000001c10be904 7B942FA4-CB76-3375-9972-F58C14492FB4 + 13175044
34 UIKitCore 0x00000001c10bdad0 7B942FA4-CB76-3375-9972-F58C14492FB4 + 13171408
35 CoreFoundation 0x00000001be37622c 42C5C917-0447-3995-B50F-DE4D132C2435 + 877100
36 CoreFoundation 0x00000001be382614 42C5C917-0447-3995-B50F-DE4D132C2435 + 927252
37 CoreFoundation 0x00000001be30651c 42C5C917-0447-3995-B50F-DE4D132C2435 + 419100
38 CoreFoundation 0x00000001be31beb8 42C5C917-0447-3995-B50F-DE4D132C2435 + 507576
39 CoreFoundation 0x00000001be3211e4 CFRunLoopRunSpecific + 612
40 GraphicsServices 0x00000001f7141368 GSEventRunModal + 164
41 UIKitCore 0x00000001c07d0d88 7B942FA4-CB76-3375-9972-F58C14492FB4 + 3812744
42 UIKitCore 0x00000001c07d09ec UIApplicationMain + 340
43 UnityFramework 0x000000010b2f8048 -[UnityFramework runUIApplicationMainWithArgc:argv:] + 92
44 Marbleverse 0x0000000104607ccc main + 60
45 dyld 0x00000001dc645948 341BBF64-6034-357E-8AA6-E1E4B988E03C + 88392
2022-09-21 18:10:08.759724+0200 Marbleverse[910:172654] NatCorder: GIFRecorder finishing
2022-09-21 18:10:10.562492+0200 Marbleverse[910:173008] [core] “Error returned from daemon: Error Domain=com.apple.accounts Code=7 “(null)””
2022-09-21 18:10:10.572162+0200 Marbleverse[910:173006] [PAAccessLogger] Failed to log access with error: access=<PATCCAccess 0x2844ffb10> accessor:<<PAApplication 0x28808dea0 identifierType:auditToken identifier:{pid:910, version:2463}>> identifier:A06B1BA4-7A89-47B6-87EA-61B66369B9B1 kind:intervalEvent timestampAdjustment:0 visibilityState:0 assetIdentifierCount:0 tccService:kTCCServicePhotos, error=Error Domain=NSCocoaErrorDomain Code=4097 “connection to service with pid 225 named com.apple.privacyaccountingd” UserInfo={NSDebugDescription=connection to service with pid 225 named com.apple.privacyaccountingd}
Thread Performance Checker: Thread running at QOS_CLASS_USER_INTERACTIVE waiting on a thread without a QoS class specified. Investigate ways to avoid priority inversions
PID: 910, TID: 172654
Backtrace

3 UnityFramework 0x000000010bd87118 Baselib_SystemSemaphore_Acquire + 28
4 UnityFramework 0x000000010b7c0010 _ZN15GfxDeviceClient16CreateGpuProgramE20ShaderGpuProgramTypeRK13dynamic_arrayIhLm0EER22CreateGpuProgramOutput + 408
5 UnityFramework 0x000000010ba2e704 _ZN9ShaderLab10SubProgram7CompileEv + 544
6 UnityFramework 0x000000010ba2f488 _ZNK9ShaderLab7Program40EnsureCompiledAndMarkUnsupportedIfFailedEPKNS_10SubProgramERK16ShaderKeywordSetPS4_R19ShaderSnippetResult + 64
7 UnityFramework 0x000000010ba2f694 _ZNK9ShaderLab7Program21GetMatchingSubProgramEPK6ShaderPKNS_4PassERK16ShaderKeywordSetjPS7_R19ShaderSnippetResultbb + 396

8 UnityFramework 0x000000010ba340a8 _ZNK9ShaderLab11ShaderState20FindSubProgramsToUseEPK6ShaderPKNS_4PassERNS_11SubProgramsERK17ShaderPassContextRK16ShaderKeywordSetb + 384
9 UnityFramework 0x000000010ba342e4 _ZNK9ShaderLab11ShaderState16ApplyShaderStateEjPK19ShaderPropertySheetRK17ShaderPassContextRK16ShaderKeywordSetP6ShaderPNS_4PassEPNS_11SubProgramsEPK22DeviceRenderStateBlock + 136
10 UnityFramework 0x000000010ba2d71c _ZN9ShaderLab4Pass9ApplyPassEjPK19ShaderPropertySheetR17ShaderPassContextP6ShaderiiPKNS_10GrabPassesEPNS_11SubProgramsEPK22DeviceRenderStateBlock + 200
11 UnityFramework 0x000000010ba04b98 _Z26ApplyMaterialPassWithCacheRK18SharedMaterialDataR17ShaderPassContextP6ShaderPN9ShaderLab4PassEiibPKNS6_10GrabPassesEPNS6_11SubProgramsEPK22DeviceRenderStateBlock + 96
12 UnityFramework 0x000000010ba160a4 _ZN8Material11SetPassFastEPN9ShaderLab4PassER17ShaderPassContextP6ShaderiibPNS0_11SubProgramsE + 184
13 UnityFramework 0x000000010ba16188 _ZN8Material11SetPassSlowEiR17ShaderPassContextib + 124
14 UnityFramework 0x000000010b71cef8 ZN2UI6Canvas11DrawRawMeshERNS_5BatchEP9GfxBufferS4 + 332
15 UnityFramework 0x000000010b71d2b8 _ZN2UI6Canvas14RenderOverlaysEv + 164
16 UnityFramework 0x000000010b714448 _ZN2UI13CanvasManager14RenderOverlaysEi + 156
17 UnityFramework 0x000000010b9ed224 _Z12PlayerRenderb + 660
18 UnityFramework 0x000000010b9e84bc _Z17ExecutePlayerLoopP22NativePlayerLoopSystem + 88
19 UnityFramework 0x000000010b9e84f0 _Z17ExecutePlayerLoopP22NativePlayerLoopSystem + 140
20 UnityFramework 0x000000010b9e8758 _Z10PlayerLoopv + 356
21 UnityFramework 0x000000010bcc7ae0 _ZL19UnityPlayerLoopImplb + 224
22 UnityFramework 0x000000010b2f94d0 UnityRepaint + 116
23 UnityFramework 0x000000010b2f93ec -[UnityAppController(Rendering) repaintDisplayLink] + 64
24 QuartzCore 0x00000001bf92ea98 C4C4667B-6933-3B01-A37B-747CD0C00431 + 170648
25 QuartzCore 0x00000001bfa5d1c0 C4C4667B-6933-3B01-A37B-747CD0C00431 + 1409472
26 UIKitCore 0x00000001c0a7f678 7B942FA4-CB76-3375-9972-F58C14492FB4 + 6624888
27 UIKitCore 0x00000001c10be904 7B942FA4-CB76-3375-9972-F58C14492FB4 + 13175044
28 UIKitCore 0x00000001c10bdad0 7B942FA4-CB76-3375-9972-F58C14492FB4 + 13171408
29 CoreFoundation 0x00000001be37622c 42C5C917-0447-3995-B50F-DE4D132C2435 + 877100
30 CoreFoundation 0x00000001be382614 42C5C917-0447-3995-B50F-DE4D132C2435 + 927252
31 CoreFoundation 0x00000001be30651c 42C5C917-0447-3995-B50F-DE4D132C2435 + 419100
32 CoreFoundation 0x00000001be31beb8 42C5C917-0447-3995-B50F-DE4D132C2435 + 507576
33 CoreFoundation 0x00000001be3211e4 CFRunLoopRunSpecific + 612
34 GraphicsServices 0x00000001f7141368 GSEventRunModal + 164
35 UIKitCore 0x00000001c07d0d88 7B942FA4-CB76-3375-9972-F58C14492FB4 + 3812744
36 UIKitCore 0x00000001c07d09ec UIApplicationMain + 340
37 UnityFramework 0x000000010b2f8048 -[UnityFramework runUIApplicationMainWithArgc:argv:] + 92
38 Marbleverse 0x0000000104607ccc main + 60
39 dyld 0x00000001dc645948 341BBF64-6034-357E-8AA6-E1E4B988E03C + 88392
2022-09-21 18:10:27.083013+0200 Marbleverse[910:173501] Execution of the command buffer was aborted due to an error during execution. Caused GPU Timeout Error (00000002:kIOGPUCommandBufferCallbackErrorTimeout)
2022-09-21 18:10:27.083415+0200 Marbleverse[910:173501] Execution of the command buffer was aborted due to an error during execution. Caused GPU Timeout Error (00000002:kIOGPUCommandBufferCallbackErrorTimeout)
2022-09-21 18:10:27.083571+0200 Marbleverse[910:173501] Execution of the command buffer was aborted due to an error during execution. Caused GPU Timeout Error (00000002:kIOGPUCommandBufferCallbackErrorTimeout)
2022-09-21 18:10:27.083715+0200 Marbleverse[910:173501] Execution of the command buffer was aborted due to an error during execution. Caused GPU Timeout Error (00000002:kIOGPUCommandBufferCallbackErrorTimeout)
2022-09-21 18:10:27.083857+0200 Marbleverse[910:173501] Execution of the command buffer was aborted due to an error during execution. Ignored (for causing prior/excessive GPU errors) (00000004:kIOGPUCommandBufferCallbackErrorSubmissionsIgnored)
2022-09-21 18:10:27.084027+0200 Marbleverse[910:173501] Execution of the command buffer was aborted due to an error during execution. Ignored (for causing prior/excessive GPU errors) (00000004:kIOGPUCommandBufferCallbackErrorSubmissionsIgnored)
2022-09-21 18:10:27.091300+0200 Marbleverse[910:173502] Execution of the command buffer was aborted due to an error during execution. Ignored (for causing prior/excessive GPU errors) (00000004:kIOGPUCommandBufferCallbackErrorSubmissionsIgnored)
2022-09-21 18:10:27.091425+0200 Marbleverse[910:173502] Execution of the command buffer was aborted due to an error during execution. Ignored (for causing prior/excessive GPU errors) (00000004:kIOGPUCommandBufferCallbackErrorSubmissionsIgnored)
2022-09-21 18:10:27.104119+0200 Marbleverse[910:173503] Execution of the command buffer was aborted due to an error during execution. Ignored (for causing prior/excessive GPU errors) (00000004:kIOGPUCommandBufferCallbackErrorSubmissionsIgnored)
2022-09-21 18:10:27.104173+0200 Marbleverse[910:173503] Execution of the command buffer was aborted due to an error during execution. Ignored (for causing prior/excessive GPU errors) (00000004:kIOGPUCommandBufferCallbackErrorSubmissionsIgnored)
2022-09-21 18:10:27.114535+0200 Marbleverse[910:173503] Execution of the command buffer was aborted due to an error during execution. Ignored (for causing prior/excessive GPU errors) (00000004:kIOGPUCommandBufferCallbackErrorSubmissionsIgnored)
2022-09-21 18:10:27.114639+0200 Marbleverse[910:173503] Execution of the command buffer was aborted due to an error during execution. Ignored (for causing prior/excessive GPU errors) (00000004:kIOGPUCommandBufferCallbackErrorSubmissionsIgnored)
2022-09-21 18:10:27.131987+0200 Marbleverse[910:173503] Execution of the command buffer was aborted due to an error during execution. Ignored (for causing prior/excessive GPU errors) (00000004:kIOGPUCommandBufferCallbackErrorSubmissionsIgnored)
2022-09-21 18:10:27.132069+0200 Marbleverse[910:173503] Execution of the command buffer was aborted due to an error during execution. Ignored (for causing prior/excessive GPU errors) (00000004:kIOGPUCommandBufferCallbackErrorSubmissionsIgnored)
2022-09-21 18:10:27.148460+0200 Marbleverse[910:173054] Execution of the command buffer was aborted due to an error during execution. Ignored (for causing

We no longer support AR Foundation 4.0, and FYI Unity 2019 has also reached end of life.

For others reading this, please follow the iOS 16 discussion here: When running on iOS 16 the camera feed is unstable (shaky and jittery) when multi-threaded rendering is enabled · Issue #988 · Unity-Technologies/arfoundation-samples · GitHub