Search Unity

Question Crash on UnityARKit_Camera_GetTextureReleaseCallbackHandle

Discussion in 'AR' started by MathijsDoetDingen, Oct 11, 2022.

  1. MathijsDoetDingen

    MathijsDoetDingen

    Joined:
    Nov 24, 2020
    Posts:
    3
    Hello,

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

    Code (CSharp):
    1. Exception Type: EXC_BREAKPOINT (SIGTRAP)
    2. Crashed Thread: 53
    3.  
    4. Application Specific Information:
    5. device
    6.  
    7. Thread 53 Crashed:
    8. 0   CoreFoundation                  0x32e66ca98         CFRelease
    9. 1   UnityFramework                  0x106b15dd0         [inlined] UnityARKit_Camera_GetTextureReleaseCallbackHandle
    10. 2   UnityFramework                  0x106b15dd0         UnityARKit_Camera_GetTextureReleaseCallbackHandle
    11. 3   Metal                           0x363b1ebec         MTLDispatchListApply
    12. 4   Metal                           0x363b1efd8         -[_MTLCommandBuffer didCompleteWithStartTime:endTime:error:]
    13. 5   IOGPU                           0x3ef7cad74         -[IOGPUMetalCommandBuffer didCompleteWithStartTime:endTime:error:]
    14. 6   Metal                           0x363b1ec9c         -[_MTLCommandQueue commandBufferDidComplete:startTime:completionTime:error:]
    15. 7   IOGPU                           0x3ef7caaf4         __IOGPUNotificationQueueSetDispatchQueue_block_invoke
    16. 8   libdispatch.dylib               0x32e04daec         _dispatch_client_callout4
    17. 9   libdispatch.dylib               0x32e069b28         _dispatch_mach_msg_invoke
    18. 10  libdispatch.dylib               0x32e054ffc         _dispatch_lane_serial_drain
    19. 11  libdispatch.dylib               0x32e06a848         _dispatch_mach_invoke
    20. 12  libdispatch.dylib               0x32e054ffc         _dispatch_lane_serial_drain
    21. 13  libdispatch.dylib               0x32e055cb0         _dispatch_lane_invoke
    22. 14  libdispatch.dylib               0x32e054ffc         _dispatch_lane_serial_drain
    23. 15  libdispatch.dylib               0x32e055c7c         _dispatch_lane_invoke
    24. 16  libdispatch.dylib               0x32e0604fc         _dispatch_workloop_worker_thread
    25. 17  libsystem_pthread.dylib         0x410a470b8         _pthread_wqthread
    26.  
    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 :)
     
  2. Adam_R_

    Adam_R_

    Joined:
    Apr 23, 2019
    Posts:
    5
    andyb-unity likes this.
  3. MathijsDoetDingen

    MathijsDoetDingen

    Joined:
    Nov 24, 2020
    Posts:
    3
  4. Sunday_Chou

    Sunday_Chou

    Joined:
    Nov 11, 2022
    Posts:
    1
    Hi, I've got exactly the same crash as you did. Could you share you method to solve this problem?
     
  5. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,062
    @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.
     
    ecof likes this.