Search Unity

IMGSGX554GLDriver crashes after updating to Unity 2019 LTS

Discussion in 'iOS and tvOS' started by stopiccot_tds, Jan 14, 2021.

  1. stopiccot_tds

    stopiccot_tds

    Joined:
    Oct 1, 2016
    Posts:
    111
    We recently updated our project from Unity 2018.4.16 to 2019.4.16. Because you are not allowed to make more strict UIRequiredDeviceCapabilities capabilities when updating your app in 2019 we were forced to remove Auto Graphics API checkmark and add OpenGLES2 back to the list of apis. (Auto Graphics API no longer includes OpenGLES2 in Unity 2019).
    After this update we started to receive crashes mainly from iPad4 devices
    Code (csharp):
    1.  
    2. Thread 26 Crashed:
    3. 0   IMGSGX554GLDriver                0x2f013e16 sgxBeginRender + 230 (imgsgx_state.c:2464)
    4. 1   IMGSGX554GLDriver                0x2f026846 glrSGXRenderVertexArray + 1138 (imgsgx_vertex_array.c:427)
    5. 2   GLEngine                          0x2f78f6b8 glDrawElements_ACC_ES2Exec + 380 (gl_vertex_array_draw.c:154)
    6. 3   OpenGLES                          0x1f53b24c glDrawElements + 38 (eagl_api.m:472)
    7. 4   UnityFramework                    0x03b78b20 GfxDeviceGLES::DrawBufferRanges(GfxBuffer*, unsigned int, GfxBuffer* const*, unsigned int const*, int, DrawBuffersRange const*, int, VertexDeclaration*, unsigned long, int) + 636 (GfxDeviceGLES.cpp:1766)
    8. 5   UnityFramework                    0x03cfc798 SinglePassStereoSupportExt::DrawBuffersStereo(GfxBuffer*, unsigned int, GfxBuffer* const*, unsigned int const*, int, DrawBuffersRange const*, int, VertexDeclaration*, unsigned long) + 264 (StereoSupportExt.cpp:0)
    9. 6   UnityFramework                    0x03b7d348 GfxDeviceGLES::DrawBuffers(GfxBuffer*, unsigned int, GfxBuffer* const*, unsigned int const*, int, DrawBuffersRange const*, int, VertexDeclaration*) + 304 (GfxDeviceGLES.cpp:1809)
    10. 7   UnityFramework                    0x03b6c44c GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&) + 50108 (GfxDeviceWorker.cpp:2123)
    11. 8   UnityFramework                    0x03b6cb90 GfxDeviceWorker::RunExt(ThreadedStreamBuffer&) + 188 (GfxDeviceWorker.cpp:423)
    12. 9   UnityFramework                    0x03b5fb34 GfxDeviceWorker::RunGfxDeviceWorker(void*) + 12 (GfxDeviceWorker.cpp:386)
    13. 10  UnityFramework                    0x03ea3abc Thread::RunThreadWrapper(void*) + 84 (Thread.cpp:78)
    14. 11  libsystem_pthread.dylib          0x1cb2c93a _pthread_body + 216 (pthread.c:697)
    15. 12  libsystem_pthread.dylib          0x1cb2c85c _pthread_start + 234 (pthread.c:744)
    16. 13  libsystem_pthread.dylib          0x1cb2a468 thread_start + 8
    17.  
    So obviously there is some issue with OpenGL rendering in Unity 2019. Any ideas why?
     
    Last edited: Jan 14, 2021
    hiryma likes this.
  2. stopiccot_tds

    stopiccot_tds

    Joined:
    Oct 1, 2016
    Posts:
    111
    Looks like it's somehow related to portrait/landspace orientation change. Cause crash happens in different threads in sgxBeginRender call while on main thread there is always
    Code (csharp):
    1.  
    2. Thread 0 name:
    3. Thread 0:
    4. 0   libsystem_kernel.dylib            0x1cb14950 semaphore_wait_trap + 8
    5. 1   libdispatch.dylib                0x1ca3a91e _os_semaphore_wait + 16 (lock.c:115)
    6. 2   libdispatch.dylib                0x1ca3a092 _dispatch_semaphore_wait_slow + 76 (semaphore.c:143)
    7. 3   UnityFramework                    0x03fab508 DarwinApi::detail::Acquire(Baselib_SystemSemaphore_Handle, unsigned long long) + 16 (Baselib_SystemSemaphore_DarwinApi.inl.h:35)
    8. 4   UnityFramework                    0x03fab508 DarwinApi::Baselib_SystemSemaphore_Acquire(Baselib_SystemSemaphore_Handle) + 16 (Baselib_SystemSemaphore_DarwinApi.inl.h:54)
    9. 5   UnityFramework                    0x03fab508 Baselib_SystemSemaphore_Acquire + 28 (Baselib_SystemSemaphore_CProxy.inl.h:14)
    10. 6   UnityFramework                    0x038c2608 WaitForSignal + 36 (GfxDeviceClient.cpp:5177)
    11. 7   UnityFramework                    0x038c2608 GfxDeviceClient::AcquireThreadOwnership() + 196 (GfxDeviceClient.cpp:3179)
    12. 8   UnityFramework                    0x038f3fd8 AutoGfxDeviceAcquireThreadOwnership + 128 (GfxDevice.h:1361)
    13. 9   UnityFramework                    0x038f3fd8 AutoGfxDeviceAcquireThreadOwnership + 128 (GfxDevice.h:1358)
    14. 10  UnityFramework                    0x038f3fd8 gles::CreateUpdateRenderSurface(ApiGLES*, RenderSurfaceGLES*, RenderSurfaceType, TextureDimension, TextureID, unsigned int, GraphicsFormat, SurfaceCreateFlags, RenderSurfaceDesc const&) + 180 (RenderSurfaceGLES.cpp:261)
    15. 11  UnityFramework                    0x038f449c gles::CreateUpdateRenderSurface(ApiGLES*, RenderSurfaceGLES*, bool, TextureDimension, TextureID, unsigned int, unsigned int, SurfaceCreateFlags, RenderSurfaceDesc const&) + 152 (RenderSurfaceGLES.cpp:314)
    16. 12  UnityFramework                    0x03ef9c20 UnityCreateExternalSurfaceGLES + 116 (CommonLibEntry.mm:172)
    17. 13  UnityFramework                    0x024dccea CreateUnityRenderBuffersGLES + 82 (GlesHelper.mm:196)
    18. 14  UnityFramework                    0x024cbc78 CreateUnityRenderBuffers(UnityDisplaySurfaceBase*) + 32 (UnityRendering.h:326)
    19. 15  UnityFramework                    0x024cbc78 -[DisplayConnection recreateSurface:] + 832 (DisplayManager.mm:207)
    20. 16  UnityFramework                    0x024db0fa -[UnityView recreateRenderingSurface] + 454 (UnityView.mm:138)
    21. 17  UnityFramework                    0x024daee2 -[UnityView recreateRenderingSurfaceIfNeeded] + 354 (UnityView.mm:113)
    22. 18  UnityFramework                    0x024dd7e4 -[UnityAppController(Rendering) repaint] + 56 (UnityAppController+Rendering.mm:85)
    23. 19  UnityFramework                    0x024c98c4 -[UnityAppController(ViewHandling) showGameUI] + 268 (UnityAppController+ViewHandling.mm:210)
    24. 20  UnityFramework                    0x024d48d0 0x24bb000 + 104656
    25. 21  Foundation                        0x1dc8e06e __NSFireDelayedPerform + 458 (NSRunLoop.m:620)
    26. 22  CoreFoundation                    0x1d318636 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 14 (CFRunLoop.c:1810)
    27. 23  CoreFoundation                    0x1d318338 __CFRunLoopDoTimer + 832 (CFRunLoop.c:2349)
    28. 24  CoreFoundation                    0x1d317d36 __CFRunLoopDoTimers + 188 (CFRunLoop.c:2488)
    29. 25  CoreFoundation                    0x1d315dd4 __CFRunLoopRun + 780 (CFRunLoop.c:2984)
    30. 26  CoreFoundation                    0x1d2691ae CFRunLoopRunSpecific + 470 (CFRunLoop.c:3113)
    31. 27  CoreFoundation                    0x1d268fd0 CFRunLoopRunInMode + 104 (CFRunLoop.c:3143)
    32. 28  GraphicsServices                  0x1ea13b40 GSEventRunModal + 80 (GSEvent.c:2245)
    33. 29  UIKit                            0x225eba52 UIApplicationMain + 150 (UIApplication.m:4089)
    34. 30  UnityFramework                    0x024dbbb8 -[UnityFramework runUIApplicationMainWithArgc:argv:] + 164 (main.mm:98)
    35. 31  sudoku                            0x000521c0 main + 68 (main.mm:26)
    36. 32  libdyld.dylib                    0x1ca564ea start + 2
    37.  
     
  3. BriLef

    BriLef

    Joined:
    Aug 2, 2018
    Posts:
    1
    Is there any update on this? Encountering the exact same issue due to upgrading from Unity 2018 to unity 2019. We have started getting crashlytic reports for iPad 4s(only) stating

    IMGSGX544GLDriver

    Crashed: UnityGfxDeviceWorker
    EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000001

    Im willing to give more reports if anyone out there has information on this or thinks that they could help. google leads in many directions not leading to anything fruitful. One mention in google is that it is related to using VBOs and VAOs which may make sense with where the app is crashing for users and reporting this but my knowledge of shaders is somewhat limited.

    Unity version was 2018.4.23fa LTS and upgraded to Unity Version 2019.4.21f1 LTS.

    Stack Trace:

    Crashed: UnityGfxDeviceWorker
    0 libGPUSupportMercury.dylib 0x295ac3f8 gpus_ReturnGuiltyForHardwareRestart + 9
    1 libGPUSupportMercury.dylib 0x295aced1 gpusSubmitDataBuffers + 118
    2 IMGSGX554GLDriver 0x2cfab611 <redacted> + 118
    3 GLEngine 0x2d7b51a9 gliPresentViewES_Exec + 172
    4 GLEngine 0x2d7b50d9 gliPresentViewES + 92
    5 OpenGLES 0x1d4def3b -[EAGLContext presentRenderbuffer:] + 78
    6 UnityFramework 0x620867 PresentGLES + 371 (GlesHelper.mm:371)
    7 UnityFramework 0x60fa67 -[DisplayConnection present] + 251 (DisplayManager.mm:251)
    8 UnityFramework 0x610b41 __25-[DisplayManager present]_block_invoke + 411 (DisplayManager.mm:411)
    9 UnityFramework 0x610659 -[DisplayManager enumerateDisplaysWithBlock:] + 379 (DisplayManager.mm:379)
    10 UnityFramework 0x6210a1 -[UnityAppController(Rendering) callbackPresent:] + 122 (UnityAppController+Rendering.mm:122)
    11 UnityFramework 0x621815 UnityPresentContextCallback + 162 (UnityAppController+Rendering.mm:162)
    12 UnityFramework 0x1b5c498 ContextGLES::present() + 94 (ContextGLESApple.cpp:94)
    13 UnityFramework 0x16dc9c0 GfxDeviceGLES::presentFrame() + 3709008
    14 UnityFramework 0x16ce5c4 GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&) + 3650644
    15 UnityFramework 0x16cf02c GfxDeviceWorker::RunExt(ThreadedStreamBuffer&) + 3653308
    16 UnityFramework 0x16c1b1c GfxDeviceWorker::RunGfxDeviceWorker(void*) + 3598764
    17 UnityFramework 0x1a5a3e0 Thread::RunThreadWrapper(void*) + 2919252
    18 libsystem_pthread.dylib 0x1aacc93b _pthread_body + 216
    19 libsystem_pthread.dylib 0x1aacc85d _pthread_start + 234
    20 libsystem_pthread.dylib 0x1aaca468 thread_start + 8