Search Unity

CRASH!: UnityGfxDeviceWorker (29): EXC_BAD_ACCESS (code=1

Discussion in 'iOS and tvOS' started by planetfactory, Feb 2, 2021.

  1. planetfactory

    planetfactory

    Joined:
    May 18, 2016
    Posts:
    56
    Hi,

    We are using Unity 2019.4.X. Our app works fine on new iOS devices, but it crashes with devices running iOS 12. XCode error is:

    "UnityGfxDeviceWorker (29): EXC_BAD_ACCESS (code=1...".

    So, with so much information, we don't know what the problem is or how to fix it. We have tried to disable Metal, but the crash persists.
    Any idea?

    Thanks!
     
  2. robertas-unity

    robertas-unity

    QA Minion Unity Technologies

    Joined:
    Mar 24, 2015
    Posts:
    29
    Hi, @planetfactory. Thanks for reaching out.

    It's really difficult to say anything with so little information.

    The best way for us to investigate would be getting your project and reproducing the issue in-house. Could you report a bug with your project attached so we could look into this further? Make sure you include the full stacktrace you get after the crash in the bug report (not just the initial line telling which thread crashed).
    You can post the bug ID here once you do that so we can get to it quicker.
     
  3. planetfactory

    planetfactory

    Joined:
    May 18, 2016
    Posts:
    56
    Hi,

    I'm attaching the Stack Trace from xCode. I will try to minimize my project so I can isolate the problem and send it to you.

    Stack Trace:

    * thread #30, name = 'UnityGfxDeviceWorker', stop reason = EXC_BAD_ACCESS (code=1, address=0x11252c010)
    * frame #0: 0x00000001013c9a94 UnityFramework`::TransformVerticesInnerLoop<false, false, true>() [inlined] MultiplyPoint3 at Matrix4x4.h:312:30 [opt]

    frame #1: 0x00000001013c9a90 UnityFramework`::TransformVerticesInnerLoop<false, false, true>() at TransformVertex.cpp:46 [opt]

    frame #2: 0x00000001013c8f90 UnityFramework`::TransformVerticesStridedREF() at TransformVertex.cpp:147:13 [opt]

    frame #3: 0x000000010149bae8 UnityFramework`::TransformVertices() at BatchRendering.cpp:941:5 [opt]

    frame #4: 0x000000010127f8ec UnityFramework`::processDynamicSpriteBatchGeometryJob() at SpriteRendererJobs.cpp:217:30 [opt]

    frame #5: 0x00000001013d05b8 UnityFramework`::Exec() [inlined] ExecuteJobFunc at JobQueue.cpp:402:9 [opt]

    frame #6: 0x00000001013d0598 UnityFramework`::Exec() at JobQueue.cpp:564 [opt]

    frame #7: 0x00000001013d081c UnityFramework`::Steal() at JobQueue.cpp:657:17 [opt]

    frame #8: 0x00000001013d1378 UnityFramework`::WaitForJobGroupID() at JobQueue.cpp:1572:17 [opt]

    frame #9: 0x00000001013cf3a8 UnityFramework`::CompleteFenceInternal() at Jobs.cpp:30:19 [opt]

    frame #10: 0x0000000101496d50 UnityFramework`::putGeometryJobFence() [inlined] SyncFence at Jobs.h:289:5 [opt]

    frame #11: 0x0000000101496d3c UnityFramework`::putGeometryJobFence() at GeometryJob.cpp:98 [opt]

    frame #12: 0x00000001014af17c UnityFramework`::putGeometryJobFence() at GfxDevice.cpp:848:21 [opt]

    frame #13: 0x00000001014af1f8 UnityFramework`::DrawSharedGeometryJobs() at GfxDevice.cpp:854:5 [opt]

    frame #14: 0x0000000101204be0 UnityFramework`::RunCommand() at GfxDeviceWorker.cpp:802:23 [opt]

    frame #15: 0x00000001016bd154 UnityFramework`GfxDeviceWorkerAutoreleasePoolProxy at GfxDeviceMetal.mm:4859:18 [opt]

    frame #16: 0x000000010120a550 UnityFramework`::RunExt() at GfxDeviceWorker.cpp:423:5 [opt]

    frame #17: 0x0000000101200cc0 UnityFramework`::RunGfxDeviceWorker() at GfxDeviceWorker.cpp:386:42 [opt]

    frame #18: 0x0000000101475f90 UnityFramework`::RunThreadWrapper() at Thread.cpp:78:14 [opt]

    frame #19: 0x000000022aac42c0 libsystem_pthread.dylib`_pthread_body + 128

    frame #20: 0x000000022aac4220 libsystem_pthread.dylib`_pthread_start + 44

    frame #21: 0x000000022aac7cdc libsystem_pthread.dylib`thread_start + 4
     
  4. Keyveo_Dev_00

    Keyveo_Dev_00

    Joined:
    Mar 15, 2016
    Posts:
    4
    Did tou find any fix ? I'm experiencing this one when quitting RA mode in my iOS iPad (14.7.1) application ; here is the stack trace :

    Code (CSharp):
    1. UnityFramework was compiled with optimization - stepping may behave oddly; variables may not be available.
    2. * thread #29, name = 'UnityGfxDeviceWorker', stop reason = EXC_BAD_ACCESS (code=1, address=0xb386491c8)
    3.   frame #0: 0x00000001bf9cbac0 libobjc.A.dylib`objc_retain + 16
    4. * frame #1: 0x0000000102e2d9e4 UnityFramework`AddCreatedTexture at TexturesMetal.mm:394 [opt]
    5.   frame #2: 0x00000001023f6f94 UnityFramework`::RunCommand() at GfxDeviceWorker.cpp:1318:23 [opt]
    6.   frame #3: 0x0000000102e102e8 UnityFramework`GfxDeviceWorkerAutoreleasePoolProxy at GfxDeviceMetal.mm:4686:18 [opt]
    7.   frame #4: 0x00000001023ff294 UnityFramework`::RunExt() at GfxDeviceWorker.cpp:562:5 [opt]
    8.   frame #5: 0x00000001023ff22c UnityFramework`::Run() at GfxDeviceWorker.cpp:546:5 [opt]
    9.   frame #6: 0x00000001023f65b0 UnityFramework`::RunGfxDeviceWorker() at GfxDeviceWorker.cpp:525:42 [opt]
    10.   frame #7: 0x0000000102a093c4 UnityFramework`::RunThreadWrapper() at Thread.cpp:78:14 [opt]
    11.   frame #8: 0x00000001f367bc74 libsystem_pthread.dylib`_pthread_start + 288
     
  5. lazortech13

    lazortech13

    Joined:
    Sep 10, 2021
    Posts:
    3
    Hi there! I'm having a very similar problem with the following stack trace:

    Application Specific Information:
    Exception 1, Code 32, Subcode 8 >
    Attempted to dereference garbage pointer 0x20.

    Thread 30 Crashed:
    0 libobjc.A.dylib 0x33266f3f0 objc_retain
    1 UnityFramework 0x108a61dbc TexturesMetal::AddCreatedTexture
    2 UnityFramework 0x1089d1e9c GfxDeviceWorker::RunCommand
    3 UnityFramework 0x108a37f14 GfxDeviceWorkerAutoreleasePoolProxy
    4 UnityFramework 0x1089d3ba0 GfxDeviceWorker::RunExt
    5 UnityFramework 0x1089cbd70 GfxDeviceWorker::RunGfxDeviceWorker
    6 UnityFramework 0x10874f640 Thread::RunThreadWrapper
    7 libsystem_pthread.dylib 0x3e3cf99a0 _pthread_start

    Has there been any progress on finding a solution for this error?
     
  6. kjyv

    kjyv

    Joined:
    Feb 20, 2018
    Posts:
    53
    Guys, there are at least two different crashes here, the OP has so little information it could be anything.
    Keyveo_Dev_00 and lazortech13 have the same crash (that we're also seeing)