Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug Crash on Unity Android after updating to Unity 2021.3.26 with Unity Advertising

Discussion in 'Editor & General Support' started by NickZan, Jun 1, 2023.

  1. NickZan

    NickZan

    Joined:
    Feb 11, 2019
    Posts:
    5
    Hello everyone,

    I'm experiencing a crash in my Unity project on the Android platform and I'm seeking some help to resolve it. Here's the Native StackTrace associated with the crash:


    Native StackTrace:
    Thread 0 (crashed)
    0 [URL='http://libunity.so/']libunity.so[/URL] 0x00000000c320548c DataBufferGLES::FlushMappedRange(unsigned int, unsigned int)
    1 [URL='http://libunity.so/']libunity.so[/URL] 0x00000000c32164d8 BufferGLES::EndWrite(unsigned int)
    2 [URL='http://libunity.so/']libunity.so[/URL] 0x00000000c3216430 GfxDeviceGLES::EndBufferWrite(GfxBuffer*, unsigned int)
    3 [URL='http://libunity.so/']libunity.so[/URL] 0x00000000c31d7000 GeometryJobTasks:: PutGeometryJobTask(GfxDevice&, GeometryJobTasks::GeometryJobTask*)
    4 [URL='http://libunity.so/']libunity.so[/URL] 0x00000000c31d6ed0 GeometryJobTasks::EndFrame(GfxDevice&)
    5 [URL='http://libunity.so/']libunity.so[/URL] 0x00000000c335795d GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&)
    6 [URL='http://libunity.so/']libunity.so[/URL] 0x00000000c3358f7d GfxDeviceWorker::RunExt(ThreadedStreamBuffer&)
    7 [URL='http://libunity.so/']libunity.so[/URL] 0x00000000c33524cb GfxDeviceWorker::RunGfxDeviceWorker(void*)
    8 [URL='http://libunity.so/']libunity.so[/URL] 0x00000000c2eea2b3 Thread::RunThreadWrapper(void*)
    9 [URL='http://libc.so/']libc.so[/URL] 0x00000000f0103293 <symbols missing for uuid: af31ec96b35fedca378e07659b30896c>
    10 [URL='http://libc.so/']libc.so[/URL] 0x00000000f00bd803 <symbols missing for uuid: af31ec96b35fedca378e07659b30896c>


    If anyone has encountered a similar crash or has any insights on how to resolve it, I would greatly appreciate your assistance. I recently updated to Unity 2021.3.26 and also added Unity Advertising to my project. It's worth noting that I have been unable to reproduce the crash on any Android device.

    I'm unsure about the specific cause of the crash and would be grateful for any guidance or suggestions.

    Thank you in advance for your help!
     
  2. troylightfox

    troylightfox

    Joined:
    Feb 1, 2023
    Posts:
    29
    We're also experiencing this issue on 2022.3.0 across OpenGL, Metal and Vulkan. We've also tried 2022.2.14, 2022.2.21, and 2022.3.1 and they all exhibit this issue. It happens most often on Vulkan.

    Always EndBufferWrite, and during different points in the game:

    OpenGL:

    0 libunity.so 0x0000007bf1551684 BufferGLES::EndWrite(unsigned long)
    1 libunity.so 0x0000007bf15515cc GfxDeviceGLES::EndBufferWrite(GfxBuffer*, unsigned long)
    2 libunity.so 0x0000007bf1508094 GeometryJobTasks::putGeometryJobTask(GfxDevice&, GeometryJobTasks::GeometryJobTask*)
    3 libunity.so 0x0000007bf1507f80 GeometryJobTasks::EndFrame(GfxDevice&)
    4 libunity.so 0x0000007bf1716b7c GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&)
    5 libunity.so 0x0000007bf170feb4 GfxDeviceWorker::RunExt(ThreadedStreamBuffer&)
    6 libunity.so 0x0000007bf170fbfc GfxDeviceWorker::RunGfxDeviceWorker(void*)
    7 libunity.so 0x0000007bf100bdf4 Thread::RunThreadWrapper(void*)
    8 libc.so 0x0000007cf5337b24 <symbols missing for uuid: 3f350ca06c3b80560f65755286daf320>
    9 libc.so 0x0000007cf52d9330 <symbols missing for uuid: 3f350ca06c3b80560f65755286daf320>

    Vulkan

    0 libunity.so 0x000000763da4e970 GfxVersionList::Impl::GetVersion(unsigned long) const
    1 libunity.so 0x000000763db3f348 vk::DataBuffer::EndWrite(bool)
    2 libunity.so 0x000000763db51158 GfxDeviceVKBase::EndBufferWrite(GfxBuffer*, unsigned long)
    3 libunity.so 0x000000763da631a8 GeometryJobTasks::putGeometryJobTask(GfxDevice&, GeometryJobTasks::GeometryJobTask*)
    4 libunity.so 0x000000763da6308c GeometryJobTasks::EndFrame(GfxDevice&)
    5 libunity.so 0x000000763dcbdba4 GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&)
    6 libunity.so 0x000000763dcb6c48 GfxDeviceWorker::RunExt(ThreadedStreamBuffer&)
    7 libunity.so 0x000000763dcb6be8 GfxDeviceWorker::Run()
    8 libunity.so 0x000000763dcb696c GfxDeviceWorker::RunGfxDeviceWorker(void*)
    9 libunity.so 0x000000763d3c42ec Thread::RunThreadWrapper(void*)
    10 libc.so 0x000000778a73d678 <symbols missing for uuid: d8a8bbfdbc6a933b1d9eb2c4df04bb26>
    11 libc.so 0x000000778a6da30c <symbols missing for uuid: d8a8bbfdbc6a933b1d9eb2c4df04bb26>

    Metal

    IsSafe (/Users/bokken/build/output/unity/unity/Runtime/GfxDevice/GfxVersionList.h:73)
    IsActiveForVersion (/Users/bokken/build/output/unity/unity/Runtime/GfxDevice/GfxVersionList.h:80)
    GetVersion (/Users/bokken/build/output/unity/unity/Runtime/GfxDevice/GfxVersionList.cpp:120)
    EndWrite (/Users/bokken/build/output/unity/unity/Runtime/GfxDevice/metal/BuffersMetal.h:75)
    EndBufferWrite (/Users/bokken/build/output/unity/unity/Runtime/GfxDevice/metal/GfxDeviceMetal.mm:3434)
    PutGeometryJobTaskInternal (/Users/bokken/build/output/unity/unity/Runtime/GfxDevice/GeometryJob.cpp:176)
    PutGeometryJobTask (/Users/bokken/build/output/unity/unity/Runtime/GfxDevice/GeometryJob.cpp:159)
    push_back (/Users/bokken/build/output/unity/unity/External/baselib/builds/Include/Cpp/mpsc_node_stack.h:65)
    EndFrame (/Users/bokken/build/output/unity/unity/Runtime/GfxDevice/GeometryJob.cpp:105)
    RunCommand (/Users/bokken/build/output/unity/unity/Runtime/GfxDevice/threaded/GfxDeviceWorker.cpp:0)
    GfxDeviceWorkerAutoreleasePoolProxy (/Users/bokken/build/output/unity/unity/Runtime/GfxDevice/metal/GfxDeviceMetal.mm:5645)
    RunExt (/Users/bokken/build/output/unity/unity/Runtime/GfxDevice/threaded/GfxDeviceWorker.cpp:375)
    RunGfxDeviceWorker (/Users/bokken/build/output/unity/unity/Runtime/GfxDevice/threaded/GfxDeviceWorker.cpp:333)
    RunThreadWrapper (/Users/bokken/build/output/unity/unity/Runtime/Threads/Thread.cpp:107)
     
    ilmario likes this.
  3. troylightfox

    troylightfox

    Joined:
    Feb 1, 2023
    Posts:
    29
    One workaround we've discovered, though an unpleasant one with serious performance implications, is to turn off Multithreaded Rendering in the Player settings.
     
  4. troylightfox

    troylightfox

    Joined:
    Feb 1, 2023
    Posts:
    29
    Unity support just mentioned this is due to be fixed in 2022.3.4f1, released on 6/28. Probably back ported to other LTS versions. Waiting to hear back on root cause.