I’m getting semi-random crashes while playing our game (I get like 1-2 per hour) on iOS, typically (maybe it’s always) when changing scenes.
I’m using latest 2021 LTS.
This is the stack trace:
* thread #37, name = 'UnityGfxDeviceWorker', stop reason = EXC_BAD_ACCESS (code=1, address=0xf)
frame #0: 0x00000002139aa910 IOGPU`-[IOGPUMetalBuffer dealloc] + 192
frame #1: 0x0000000234062bb0 AGXMetalG14`-[AGXG14FamilyBuffer dealloc] + 76
* frame #2: 0x0000000105d9f894 UnityFramework`~MetalVersionedBuffer [inlined] Clear at MetalScratchBuffer.h:28:18 [opt]
frame #3: 0x0000000105d9f888 UnityFramework`~MetalVersionedBuffer at BuffersMetal.mm:20:15 [opt]
frame #4: 0x0000000105da09f0 UnityFramework`Dispose [inlined] delete_internal<GfxVersionList::Entry> at MemoryMacros.h:202:15 [opt]
frame #5: 0x0000000105da09d0 UnityFramework`Dispose at GfxVersionList.h:61:13 [opt]
frame #6: 0x0000000105c3a6e4 UnityFramework`::GarbageCollect() at GfxVersionList.cpp:177:14 [opt]
frame #7: 0x0000000105c5dcc8 UnityFramework`::GarbageCollect() at GfxVersionManager.cpp:45:46 [opt]
frame #8: 0x0000000105da44e0 UnityFramework`StartFrame at FrameBufferMetal.mm:815:12 [opt]
frame #9: 0x0000000105d32ccc UnityFramework`::RunCommand() at GfxDeviceWorker.cpp:0 [opt]
frame #10: 0x0000000105db2dc4 UnityFramework`GfxDeviceWorkerAutoreleasePoolProxy at GfxDeviceMetal.mm:5750:18 [opt]
frame #11: 0x0000000105d34468 UnityFramework`::RunExt() at GfxDeviceWorker.cpp:381:5 [opt]
frame #12: 0x0000000105d2bfac UnityFramework`::RunGfxDeviceWorker() at GfxDeviceWorker.cpp:338:42 [opt]
frame #13: 0x0000000105920c80 UnityFramework`::RunThreadWrapper() at Thread.cpp:82:14 [opt]
frame #14: 0x00000002080056b8 libsystem_pthread.dylib`_pthread_start + 148
I don’t know what to do based on this. I do my own custom processing and I use temporary rendertextures, I have been doing this for years and haven’t had issues, but I’m not even sure if it is even related to that?
Also, for what it’s worth, the exact same project had no issues on tvOS.