Search Unity

Question UnityGfxDeviceWorker (32): EXC_BAD_ACCESS (code=1, address=0x20)

Discussion in 'AR' started by kXbira, Feb 4, 2022.

  1. kXbira

    kXbira

    Joined:
    Apr 11, 2021
    Posts:
    6
    Hey, I am using ARKit in Unity for some image tracking, my build target is iOS and I have 4 scenes each around with 25 reference images, I get this error whenever I press the back button to go to the main menu from one of the main scenes. This error occurs when I have scanned 7-10 images and then press back button. It doesn't occur when only 1-2 images are scanned. I am using LoadScene("scene_to_load", LoadSceneMode.Additive) to load the main scenes from the main menu and UnloadSceneAsync("scene_to_unload") to go back to the main menu.There are also buttons for changing the animation state and audio source for the models.

    I tried using Address Sainitizer in Xcode to debug the bug, the app got crashed and the debugger showed Out of memory ( thread name was com.arkit.imagetrackingtechnique). My guess is all the reference images which have been scanned fills up the memory.

    When I don't use the Address sanitizer, the app crashes with the error: unitygfxdeviceworker (32): exc_bad_access (code=1, address=0x20)

    Unity Version : 2020.3.27f1
    Xcode Version: 13.2.1
    Device Testing on: iPhone XR

    Any help would be appreciated.Thanks a lot.
     
    Last edited: Feb 8, 2022
  2. todds_unity

    todds_unity

    Joined:
    Aug 1, 2018
    Posts:
    324