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. Dismiss Notice

Question Crashes in Open GLES graphics rendering on OnePlus mobiles

Discussion in 'Android' started by LemanColt, May 14, 2020.

  1. LemanColt

    LemanColt

    Joined:
    Oct 17, 2014
    Posts:
    15
    Hi!
    We see multiple crash reports through the Unity Cloud Diagnostics occuring on OnePlus 6, 6T, 7T, 7Pro and 7TPro mobiles.
    The crash seems to be in the graphics rendering area. And we have been trying to dig into this the past few days without being able to figure out why it crashes
    We are using Unity 2019.2.17f1. OpenGLES 2 and 3 enabled.

    Would greatly appreciate help on this topic. Anyone that have any clues? Or anything we should try?

    Stack trace:

    Native StackTrace:

    Thread 0 (crashed)
    0 libunity.so 0x00000073844bf30c CrashReporting::Android::SignalHandler(int, siginfo*, void*) (CrashReporter.cpp:354)
    1 libunity.so 0x0000007384851c6c NativeRuntimeException::signal_handler(int, siginfo*, void*) (NativeRuntimeException.cpp:757)
    2 app_process64 0x0000005c01b88dcc <system symbols missing>
    3 [vdso] 0x00000074854b8690 <system symbols missing>
    4 libc.so 0x000000748108c4cc <system symbols missing>
    5 libunity.so 0x0000007384902e24 ApiGLES::ClearBufferSubData(unsigned int, gl::BufferTarget, long, long) (ApiGLES.cpp:2288)
    6 libunity.so 0x00000073848e4714 BufferManagerGLES::AcquireBuffer(unsigned long, DataBufferGLES::BufferUsage, bool) (DataBuffersGLES.cpp:344)
    7 libunity.so 0x00000073848e3a3c BufferGLES::EnsureBuffer(DataBufferGLES*&, unsigned long, DataBufferGLES::BufferUsage) (BuffersGLES.h:224)
    8 libunity.so 0x00000073848f1764 GfxDeviceGLES::SetComputeBufferData(GfxBuffer*, void const*, unsigned long, unsigned long) (BuffersGLES.h:44)
    9 libunity.so 0x0000007384a5ef6c GfxDevice::UpdateComputeSkinPoseBuffer(GfxBuffer*, MatrixArrayJobOutput*) (SharedObject.h:167)
    10 libunity.so 0x00000073845d97f4 GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&) (GfxDeviceWorker.cpp:0)
    11 libunity.so 0x00000073845da5b4 GfxDeviceWorker::RunExt(ThreadedStreamBuffer&) (GfxDeviceWorker.cpp:528)
    12 libunity.so 0x00000073845d3048 GfxDeviceWorker::RunGfxDeviceWorker(void*) (GfxDeviceWorker.cpp:492)
    13 libunity.so 0x00000073847a0a84 Thread::RunThreadWrapper(void*) (Thread.cpp:81)
    14 libc.so 0x00000074810f3894 <system symbols missing>
    15 libc.so 0x0000007481091b70 <system symbols missing>
    16 . 0x0000000000000000 <unknown>
     
  2. florianpenzkofer

    florianpenzkofer

    Unity Technologies

    Joined:
    Sep 2, 2014
    Posts:
    479
    Since the crash happens in GPU skinning a workaround could be to turn that off.

    Sounds like cannot reproduce the crash yourself?
     
  3. Wielok

    Wielok

    Joined:
    May 25, 2020
    Posts:
    3
    Hi
    We are experiecing similar bug and we can't find the way to fix it or even reproduce it appears randomly. We tried turning off GPU skinning, diffrent unity versions 2019.3.5f, 2019.3.15f and 32 bit builds. This is our stack trace from unity dashboard:

    1 libunity.so 0x0000007f612dd218 ApiGLES::ClearBufferSubData(unsigned int, gl::BufferTarget, long, long)
    2 libunity.so 0x0000007f612bdb24 BufferManagerGLES::AcquireBuffer(unsigned long, DataBufferGLES::BufferUsage, bool)
    3 libunity.so 0x0000007f612bcd9c BufferGLES::EnsureBuffer(DataBufferGLES*&, unsigned long, DataBufferGLES::BufferUsage)
    4 libunity.so 0x0000007f612caef0 GfxDeviceGLES::SetComputeBufferData(GfxBuffer*, void const*, unsigned long, unsigned long)
    5 libunity.so 0x0000007f61436c14 GfxDevice::UpdateComputeSkinPoseBuffer(GfxBuffer*, MatrixArrayJobOutput*)
    6 libunity.so 0x0000007f6176fae8 GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&)
    7 libunity.so 0x0000007f61771818 GfxDeviceWorker::RunExt(ThreadedStreamBuffer&)
    8 libunity.so 0x0000007f61768cd0 GfxDeviceWorker::RunGfxDeviceWorker(void*)
    9 libunity.so 0x0000007f611d5f9c Thread::RunThreadWrapper(void*)

    Did you find a way to fix it?
    Greetings
    Wielok
     
  4. tessellation

    tessellation

    Joined:
    Aug 11, 2015
    Posts:
    383
    We are experiencing the same issues in Unity 2018.4.25f1, reported by users on Galaxy S9 Android 10. @Wielok did you find that turning off GPU skinning fixed the problem?
     
  5. ImpossibleRobert

    ImpossibleRobert

    Joined:
    Oct 10, 2013
    Posts:
    511
    I got the same in 2020.1 on Android just right now, when quickly hovering over many different UI canvases in VR. It happens always @florianpenzkofer if you need an APK to debug, I have one.

    When deactivating graphics jobs, it still happens but the backtrace changes to:

    2020.08.21 22:21:54.242 12393 12499 Error CRASH Version '2020.1.3f1 (cf5c4788e1d8)', Build type 'Development', Scripting Backend 'mono', CPU 'armeabi-v7a'
    2020.08.21 22:21:54.242 12393 12499 Error CRASH Build fingerprint: 'oculus/vr_monterey/monterey:7.1.1/NGI77B/821490.13210.0:user/release-keys'
    2020.08.21 22:21:54.242 12393 12499 Error CRASH Revision: '0'
    2020.08.21 22:21:54.242 12393 12499 Error CRASH ABI: 'arm'
    2020.08.21 22:21:54.242 12393 12499 Error CRASH Timestamp: 2020-08-21 22:21:54+0200
    2020.08.21 22:21:54.242 12393 12499 Error CRASH pid: 12393, tid: 12499, name: Thread-8 >>> com.wetzold.travrsal <<<
    2020.08.21 22:21:54.242 12393 12499 Error CRASH uid: 10153
    2020.08.21 22:21:54.242 12393 12499 Error CRASH signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
    2020.08.21 22:21:54.242 12393 12499 Error CRASH Cause: null pointer dereference
    2020.08.21 22:21:54.242 12393 12499 Error CRASH r0 00000000 r1 89fd11c0 r2 00000100 r3 00000000
    2020.08.21 22:21:54.243 12393 12499 Error CRASH r4 00000180 r5 00000000 r6 89fd1180 r7 00000180
    2020.08.21 22:21:54.243 12393 12499 Error CRASH r8 6ae09f10 r9 cb97f790 r10 ce5d7080 r11 0000001f
    2020.08.21 22:21:54.243 12393 12499 Error CRASH ip f0c2a624 sp cb97f578 lr d5e49e70 pc f0bb8858
    2020.08.21 22:21:54.243 12393 12499 Error CRASH
    2020.08.21 22:21:54.243 12393 12499 Error CRASH backtrace:
    2020.08.21 22:21:54.243 12393 12499 Error CRASH #00 pc 00017858 /system/lib/libc.so (memcpy+108) (BuildId: fde26210202025ebbef572bc1778c23b)
    2020.08.21 22:21:54.243 12393 12499 Error CRASH #01 pc 008a8e6c /data/app/com.wetzold.travrsal-2/lib/arm/libunity.so (GfxDeviceGLES::DrawBuffersBatchMode(GfxBatchHeader const&)+180) (BuildId: d54fd529171d29e7111eaa7645905909ccd6153b)
    2020.08.21 22:21:54.243 12393 12499 Error CRASH #02 pc 00e2c82f /data/app/com.wetzold.travrsal-2/lib/arm/libunity.so (GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&)+21478) (BuildId: d54fd529171d29e7111eaa7645905909ccd6153b)
    2020.08.21 22:21:54.243 12393 12499 Error CRASH #03 pc 00e2cf13 /data/app/com.wetzold.travrsal-2/lib/arm/libunity.so (GfxDeviceWorker::RunExt(ThreadedStreamBuffer&)+26) (BuildId: d54fd529171d29e7111eaa7645905909ccd6153b)
    2020.08.21 22:21:54.243 12393 12499 Error CRASH #04 pc 00e2cedb /data/app/com.wetzold.travrsal-2/lib/arm/libunity.so (GfxDeviceWorker::Run()+98) (BuildId: d54fd529171d29e7111eaa7645905909ccd6153b)
    2020.08.21 22:21:54.243 12393 12499 Error CRASH #05 pc 00e27207 /data/app/com.wetzold.travrsal-2/lib/arm/libunity.so (GfxDeviceWorker::RunGfxDeviceWorker(void*)+2) (BuildId: d54fd529171d29e7111eaa7645905909ccd6153b)
    2020.08.21 22:21:54.243 12393 12499 Error CRASH #06 pc 0073b53b /data/app/com.wetzold.travrsal-2/lib/arm/libunity.so (Thread::RunThreadWrapper(void*)+342) (BuildId: d54fd529171d29e7111eaa7645905909ccd6153b)
    2020.08.21 22:21:54.243 12393 12499 Error CRASH #07 pc 00047d83 /system/lib/libc.so (__pthread_start(void*)+22) (BuildId: fde26210202025ebbef572bc1778c23b)
    2020.08.21 22:21:54.243 12393 12499 Error CRASH #08 pc 0001a035 /system/lib/libc.so (__start_thread+6) (BuildId: fde26210202025ebbef572bc1778c23b)
    2020.08.21 22:22:00.293 12393 12393 Error CRASH other thread is trapped; signum = 11
     
  6. florianpenzkofer

    florianpenzkofer

    Unity Technologies

    Joined:
    Sep 2, 2014
    Posts:
    479
    @ImpossibleRobert your call stack looks like it might be caused by SRP Batcher. DrawBuffersBatchMode is only used when SRP batcher is enabled. You can try to turn it off in the SRP settings asset to confirm this.

    It's probably not related to crash of the original poster.

    I can't easily debug APKs (and our QA won't be able to confirm the fix and we can't backport the fix), please create a bug report with repro project.
     
  7. florianpenzkofer

    florianpenzkofer

    Unity Technologies

    Joined:
    Sep 2, 2014
    Posts:
    479
    @Wielok @tessellation Regarding the crash in ClearBufferSubData. I had a look at the Unity code and this could happen if glMapBuffer returns NULL. The most likely issue would be that we are running out of address space, which would make sense if it only happens in 32bit builds. Is there anything in logcat that would indicate that we are close to out-of-memory?
     
  8. tessellation

    tessellation

    Joined:
    Aug 11, 2015
    Posts:
    383
    I switched to CPU-based skinning and the crashes went away. So perhaps the GPU is running out of memory?
     
  9. florianpenzkofer

    florianpenzkofer

    Unity Technologies

    Joined:
    Sep 2, 2014
    Posts:
    479
    Could also be some kind of leak in our GPU skinning implementation.
     
  10. tessellation

    tessellation

    Joined:
    Aug 11, 2015
    Posts:
    383
    Possibly. Let me give you some more information about how my app uses skinning. We currently don't have any 3D characters, but we do have 2D characters and we use the older Anima2D system, not the new Unity 2D bone system. I'm guessing under the covers they both use the engine's basic skinning system, which probably doesn't care if the resulting mesh is 2D or 3D. Regardless, the mesh isn't dynamic or anything and is relatively simple compared to typical 3D characters. We also usually only have 1 skinned character on the screen at any one time, so it's not anything taxing to the system as far as I can tell.
     
  11. PatrickKa

    PatrickKa

    Joined:
    Apr 30, 2014
    Posts:
    235
    I'm also seeing this crash happening seemingly randomly. The app ran for less than 10 minutes. It started to drop frames and then freezed.

    Unity 2018.4.23f1
    IL2CPP, 64 Bit
    Built-in render pipeline
    Dev build
    GPU Skinning enabled
    VR, Oculus Quest 1

    Log:
    What is this about?
    Kinda feels like a deadlock that freezes the application. Might be very related.
     
    Last edited: Oct 12, 2020
  12. PatrickKa

    PatrickKa

    Joined:
    Apr 30, 2014
    Posts:
    235
    You can see in the log that at the time of the crash almost 1 GB of memory was still available and the app was only running like 10 minutes. This doesn't look like a memory related crash at all.
     
  13. florianpenzkofer

    florianpenzkofer

    Unity Technologies

    Joined:
    Sep 2, 2014
    Posts:
    479
    @PatrickKa Can you please create a bug report for this?
     
  14. spatial_io

    spatial_io

    Joined:
    Jul 3, 2017
    Posts:
    21
    We are also seeing this issue; most recently on Unity 2020.1.1f1 on Oculus Quest (1 & 2) but have also seen on 2019.3 and 2019.4

    Code (CSharp):
    1. Native StackTrace:
    2.  
    3. Thread 0 (crashed)
    4. 0   libc.so                            0x0000007fabbd50a8 <system symbols missing>
    5. 1   libunity.so                        0x0000007f8c166b68 ApiGLES::ClearBufferSubData(unsigned int, gl::BufferTarget, long, long)
    6. 2   libunity.so                        0x0000007f8c146290 BufferManagerGLES::AcquireBuffer(unsigned long, DataBufferGLES::BufferUsage, bool)
    7. 3   libunity.so                        0x0000007f8c15435c GfxDeviceGLES::SetComputeBufferData(GfxBuffer*, void const*, unsigned long, unsigned long)
    8. 4   libunity.so                        0x0000007f8c2b6a00 GfxDevice::UpdateComputeSkinPoseBuffer(GfxBuffer*, MatrixArrayJobOutput*)
    9. 5   libunity.so                        0x0000007f8c6eb64c GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&)
    10. 6   libunity.so                        0x0000007f8c6ec8a4 GfxDeviceWorker::RunExt(ThreadedStreamBuffer&)
    11. 7   libunity.so                        0x0000007f8c6e4b64 GfxDeviceWorker::RunGfxDeviceWorker(void*)
    12. 8   libunity.so                        0x0000007f8c05fb7c Thread::RunThreadWrapper(void*)
    13. 9   libc.so                            0x0000007fabc30454 <system symbols missing>
    14. 10  libc.so                            0x0000007fabbd8204 <system symbols missing>
     
  15. spatial_io

    spatial_io

    Joined:
    Jul 3, 2017
    Posts:
    21
    sayangel likes this.