Crash on UnityARKit_Camera_GetTextureReleaseCallbackHandle

Hello,

I’m seeing issues with my app since i implemented ARFoundation.
There is a huge increase in crashes and Sentry gives this log:

Exception Type: EXC_BREAKPOINT (SIGTRAP)
Crashed Thread: 53

Application Specific Information:
device

Thread 53 Crashed:
0   CoreFoundation                  0x32e66ca98         CFRelease
1   UnityFramework                  0x106b15dd0         [inlined] UnityARKit_Camera_GetTextureReleaseCallbackHandle
2   UnityFramework                  0x106b15dd0         UnityARKit_Camera_GetTextureReleaseCallbackHandle
3   Metal                           0x363b1ebec         MTLDispatchListApply
4   Metal                           0x363b1efd8         -[_MTLCommandBuffer didCompleteWithStartTime:endTime:error:]
5   IOGPU                           0x3ef7cad74         -[IOGPUMetalCommandBuffer didCompleteWithStartTime:endTime:error:]
6   Metal                           0x363b1ec9c         -[_MTLCommandQueue commandBufferDidComplete:startTime:completionTime:error:]
7   IOGPU                           0x3ef7caaf4         __IOGPUNotificationQueueSetDispatchQueue_block_invoke
8   libdispatch.dylib               0x32e04daec         _dispatch_client_callout4
9   libdispatch.dylib               0x32e069b28         _dispatch_mach_msg_invoke
10  libdispatch.dylib               0x32e054ffc         _dispatch_lane_serial_drain
11  libdispatch.dylib               0x32e06a848         _dispatch_mach_invoke
12  libdispatch.dylib               0x32e054ffc         _dispatch_lane_serial_drain
13  libdispatch.dylib               0x32e055cb0         _dispatch_lane_invoke
14  libdispatch.dylib               0x32e054ffc         _dispatch_lane_serial_drain
15  libdispatch.dylib               0x32e055c7c         _dispatch_lane_invoke
16  libdispatch.dylib               0x32e0604fc         _dispatch_workloop_worker_thread
17  libsystem_pthread.dylib         0x410a470b8         _pthread_wqthread

I was hoping someone could give me any clue where to look or any insight on what UnityARKit_Camera_GetTextureReleaseCallbackHandle exactly does.

I’m using Unity 2021.3.11f1
ARFoundation 5.0.2
Apple ARKit 5.0.2

The App uses the image target technique to show AR

Thank you in advance for any replies :slight_smile:

If you have multi-threaded rendering enabled you might be hitting a similar issue being discussed 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

1 Like

Thank you for the reply! It turned out to be a memory issue :slight_smile: found the culprit and everything is working fine now

Hi, I’ve got exactly the same crash as you did. Could you share you method to solve this problem?

@Sunday_Chou your issue is likely due to a bug in your current version of the Apple ARKit XR Plug-in. The quickest workaround is to disable multithreaded rendering in your project settings.

We are also rolling out patches right now that should address this: 4.1.13, 4.2.7, 5.0.3, and 5.1.0-pre.2. At time of writing, 3 of these 4 patches are available now, with 5.0.3 currently in process. If you are on AR Foundation 5 and can’t disable multithreaded rendering, my recommendation would be to revert to 5.0.0-pre.12 until 5.0.3 is available to avoid possible crashes.

1 Like