Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Crashes inside UnityGfxDeviceWorker

Discussion in 'macOS' started by JoeStrout, Apr 14, 2017.

  1. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,848
    I've got a High Frontier (build made with Unity 5.5.0f3) player on OS X (10.10.5, build 14F2315) who's had a couple of random crashes. He sent in the crash logs, and both of them crashed in Thread 6, UnityGfxDeviceWorker, with this traceback:

    Any ideas what might be causing this, and what I can do about it?
     
    Elmundo likes this.
  2. jake-ruman

    jake-ruman

    Joined:
    Oct 21, 2016
    Posts:
    5
  3. Foxxis

    Foxxis

    Joined:
    Jun 27, 2006
    Posts:
    1,108
    Similar problem here. Built with Unity 5.4.5 and stable AFAIK except for one Mac customer reporting a crash in UnityGfxDeviceWorker.

    Can anyone shed some light on this...?

    Code (CSharp):
    1. Thread 6 Crashed:: UnityGfxDeviceWorker
    2. 0   libsystem_kernel.dylib            0x00007fff88d46f06 __pthread_kill + 10
    3. 1   libsystem_pthread.dylib           0x00007fff8b66b4ec pthread_kill + 90
    4. 2   libsystem_c.dylib                 0x00007fff8f2036df abort + 129
    5. 3   libmono.0.dylib                   0x0000000101d969a0 mono_handle_native_sigsegv + 726
    6. 4   libmono.0.dylib                   0x0000000101de0005 sigabrt_signal_handler + 97
    7. 5   libsystem_platform.dylib          0x00007fff8d25452a _sigtramp + 26
    8. 6   ???                               000000000000000000 0 + 0
    9. 7   libsystem_c.dylib                 0x00007fff8f2036df abort + 129
    10. 8   libGPUSupportMercury.dylib        0x00007fff8bfa5e5c gpusGenerateCrashLog + 158
    11. 9   com.apple.GeForceGLDriver         0x00007fff8ae52dc7 0x7fff8ac32000 + 2231751
    12. 10  libGPUSupportMercury.dylib        0x00007fff8bfa7204 gpusSubmitDataBuffers + 162
    13. 11  com.apple.GeForceGLDriver         0x00007fff8af46f0c 0x7fff8ac32000 + 3231500
    14. 12  com.apple.GeForceGLDriver         0x00007fff8af338d8 0x7fff8ac32000 + 3152088
    15. 13  GLEngine                          0x00007fff8fc229fc gleFlushRange + 58
    16. 14  unity.TrinoGames.MachineWorld2    0x00000001011d20eb ApiGLES::FlushBuffer(unsigned int, gl::BufferTarget, long, long) + 155
    17. 15  unity.TrinoGames.MachineWorld2    0x00000001011e94c5 DrawBufferGLES<VertexBuffer, VertexBufferUsageMapperGLES>::EndWrite(unsigned long) + 37
    18. 16  unity.TrinoGames.MachineWorld2    0x0000000100a59e09 GenericDynamicVBO::ReleaseChunkInternal(DynamicVBOChunkHandle const&, unsigned int, unsigned int) + 105
    19. 17  unity.TrinoGames.MachineWorld2    0x00000001012119e8 GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&) + 26136
    20. 18  unity.TrinoGames.MachineWorld2    0x0000000100c9d4dc GfxDeviceWorkerAutoreleasePoolProxy + 60
    21. 19  unity.TrinoGames.MachineWorld2    0x00000001012126a4 GfxDeviceWorker::Run() + 116
    22. 20  unity.TrinoGames.MachineWorld2    0x000000010120b2cc GfxDeviceWorker::RunGfxDeviceWorker(void*) + 60
    23. 21  unity.TrinoGames.MachineWorld2    0x0000000100c4f6cc Thread::RunThreadWrapper(void*) + 60
    24. 22  libsystem_pthread.dylib           0x00007fff8b66899d _pthread_body + 131
    25. 23  libsystem_pthread.dylib           0x00007fff8b66891a _pthread_start + 168
    26. 24  libsystem_pthread.dylib           0x00007fff8b666351 thread_start + 13
     
  4. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,848
    I never solved this. Still hoping somebody else has a clue.
     
  5. ilmario

    ilmario

    Joined:
    Feb 16, 2015
    Posts:
    70
    One clue: the crash might be one that occurs only on an OS X setup with multiple-monitors connected, resulting in startup crash with black screen.

    There are numerous issues with OS X standalone builds related to monitors, even in Unity 2017.1.1 (which I am using). I could not even reproduce the particular crash, but it was noticed by Mac OS App review which provided an error log. I assume they had a multi-monitor setup (not confirmed).

    I did a number of changes to the next build, some of which seem to have solved the crash:

    * Disable "Metal", use only OpenGLCore on Mac
    * Disable Universal build, only do x86_64 (main reason was problems with videos)
    * Set standalone relolution/fullscreen/aspect ratio settings to:
    - Default is Full Screen => true
    - Default is Native resolution => true
    - Capture Single Screen => false
    - Display Resolution Dialog => Hidden by default ("Enabled" might also help solve issues)
    - Resizable window => true
    - Mac fullscreen mode => Fullscreen Window with menu bar and dock
    - Visible in background => true
    - Allow full screen switch => true
    - Force single instance => false
    - Supported aspect ratios => allow all, including others
     
    Myrady likes this.
  6. scprotz

    scprotz

    Joined:
    Nov 26, 2017
    Posts:
    3
    On OSX I had a similar problem. The only way I could get it fixed was to go into player settings and go under Other Settings>Mac App Store Options> and change the bundle identifier from com.Company.ProductName to something else like com.Company.ProductName2 . Not sure what is causing the issue, but that was a workaround.
     
  7. TC_100

    TC_100

    Joined:
    Sep 4, 2018
    Posts:
    1
    Hello,
    I was running my app on iPad and I got the similar error: i.e.
    ios unity UnityGfxDeviceWorker (31): EXC_RESOURCE RESOURCE_TYPE_MEMORY (limit=700 MB, unused=0x0)
    More Info: I am using GAF files in my app, and my iPad's config are:
    Software version:12.2, RAM:1GB, Capacity:16Gb.
    Any help would be appreciated.
     
    ligafacens likes this.
  8. Ikaro88

    Ikaro88

    Joined:
    Jun 6, 2016
    Posts:
    280
    same problem...any solution?
     
  9. matrix211v1

    matrix211v1

    Joined:
    Jan 20, 2009
    Posts:
    193
    You need to change your texture sizes. Drop them down to lower sizes and try again.
     
  10. spreddy_unity

    spreddy_unity

    Joined:
    Nov 13, 2020
    Posts:
    4
    I am facing crash in iOS device with following stack trace. Any solution?
    Code (CSharp):
    1. Crashed: UnityGfxDeviceWorker
    2. 0  libsystem_c.dylib              0x19c986240 rb_tree_insert_node + 316
    3. 1  libsystem_c.dylib              0x19c98616c rb_tree_insert_node + 104
    4. 2  libsystem_trace.dylib          0x19cabb3a0 os_log_create + 664
    5. 3  QuartzCore                     0x1a12b6f54 x_log_init() + 276
    6. 4  libdispatch.dylib              0x19c8bd7d4 _dispatch_client_callout + 16
    7. 5  libdispatch.dylib              0x19c860eb8 _dispatch_once_callout + 28
    8. 6  QuartzCore                     0x1a12b7008 x_log_hook_p + 112
    9. 7  QuartzCore                     0x1a13b1a5c CADeviceUseCompression + 180
    10. 8  QuartzCore                     0x1a1411288 CA::Render::create_iosurface_with_pixel_format(unsigned int, unsigned int, unsigned int, bool, bool, unsigned int, bool) + 132
    11. 9  QuartzCore                     0x1a139fc10 allocate_drawable_private(unsigned int, unsigned int, id<MTLDevice>, MTLPixelFormat, MTLTextureRotation, bool, bool, unsigned int, CGColorSpace*, _CAImageQueue*) + 140
    12. 10 QuartzCore                     0x1a139ef84 -[CAMetalLayer nextDrawable] + 1540
    13. 11 UnityModule                    0x104e4c90c AcquireDrawableMTL + 332 (MetalHelper.mm:332)
    14. 12 UnityModule                    0x1056f87e8 UnityBlitToBackbuffer + 387 (CommonLibEntry.mm:387)
    15. 13 UnityModule                    0x104e4c748 PreparePresentMTL + 83 (UnityAppController.h:83)
    16. 14 UnityModule                    0x104d0914c -[DisplayConnection present] + 326 (UnityRendering.h:326)
    17. 15 UnityModule                    0x104e62a24 -[UnityAppController(Rendering) callbackPresent:] + 114 (UnityAppController+Rendering.mm:114)
    18. 16 UnityModule                    0x104e62ed8 UnityPresentContextCallback + 162 (UnityAppController+Rendering.mm:162)
    19. 17 UnityModule                    0x1056d5228 GfxDeviceMetal::PresentFrame() + 3295 (GfxDeviceMetal.mm:3295)
    20. 18 UnityModule                    0x105118fb4 GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&) + 1403 (GfxDeviceWorker.cpp:1403)
    21. 19 UnityModule                    0x1056d7014 GfxDeviceWorkerAutoreleasePoolProxy + 4114 (GfxDeviceMetal.mm:4114)
    22. 20 UnityModule                    0x10511987c GfxDeviceWorker::RunExt(ThreadedStreamBuffer&) + 528 (GfxDeviceWorker.cpp:528)
    23. 21 UnityModule                    0x105112010 GfxDeviceWorker::RunGfxDeviceWorker(void*) + 492 (GfxDeviceWorker.cpp:492)
    24. 22 UnityModule                    0x10539660c Thread::RunThreadWrapper(void*) + 78 (Thread.cpp:78)
    25. 23 libsystem_pthread.dylib        0x19ca9d2c0 _pthread_body + 128
    26. 24 libsystem_pthread.dylib        0x19ca9d220 _pthread_start + 44
    27. 25 libsystem_pthread.dylib        0x19caa0cdc thread_start + 4