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’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. Dismiss Notice

Bug There is a bug and the crash in libGLESv2_mtk.so on some devices

Discussion in 'General Graphics' started by vladrybak, Apr 2, 2022.

  1. eggbbq

    eggbbq

    Joined:
    Jun 7, 2022
    Posts:
    15
    It still doesn't work. I spent a week to test almost all various combinations.(unity2021~2022, opengl es 2~3, Linear, Gamma, Vulkan...etc)
     
  2. JimmyAndLYF

    JimmyAndLYF

    Joined:
    Mar 10, 2021
    Posts:
    4
    Did you fix this crash?
     
  3. eggbbq

    eggbbq

    Joined:
    Jun 7, 2022
    Posts:
    15
    I tested it, and it's not related to multithreaded rendering. I'm not sure how to fix it. I submitted a bug report to Unity, but they rejected it. All I can do now is provide feedback here and continue testing it with new versions of Unity. I hope Unity will fix the issue soon.
    As a temporary solution, my project falls back to "gamma + OpenGL ES 2". Although this option has worse visual effects, it crashes less frequently.
     
  4. JimmyAndLYF

    JimmyAndLYF

    Joined:
    Mar 10, 2021
    Posts:
    4
    Fk unity
    Thank you very much for your reply
     
  5. JimmyAndLYF

    JimmyAndLYF

    Joined:
    Mar 10, 2021
    Posts:
    4
    Could you share your unity version, urp version with me? BTW, are u using any custom shaders? I am wondering whether custom shader for urp triggered this creepy bug
     
  6. eggbbq

    eggbbq

    Joined:
    Jun 7, 2022
    Posts:
    15
    Thank you for your advice.
    Project environment: Unity 2021.3.13f with URP 12.1.7.
    We have used many custom shaders. I tested this issue again in my project and found that it logs the same error message per frame, but it doesn't crash for hours this time. We have optimized this project a lot in the last few months, which is confusing.
    I will push this build to production and let users test it again.
     
  7. JimmyAndLYF

    JimmyAndLYF

    Joined:
    Mar 10, 2021
    Posts:
    4
    Thanks alot for your sharing. BTW have you tried auto graphic api checked?
     
  8. chisolo

    chisolo

    Joined:
    May 4, 2023
    Posts:
    2
    This result seems a litter weird to me.
    Why it still crash at libglesv2_mtk, when you use vulkan?
     
  9. liuxuan

    liuxuan

    Joined:
    Oct 13, 2014
    Posts:
    7
    I released my game to google play with "Unity 2021.3.5f1 URP + gamma + OpenGL ES 2 + disable Optimized Frame Pacing" 5 days ago, In the google play console statistics, the crash rate has dropped by more than 90% compared with the previous version (auto grahics API + Optimezed Fraem Pacing), but there are still a small number of crash statistics like this:
    backtrace:
    #00 pc 0x000000000019c9c8 /vendor/lib64/egl/libGLESv2_powervr.so
    #01 pc 0x000000000015fa48 /vendor/lib64/egl/libGLESv2_powervr.so
    #02 pc 0x00000000000aefe0 /vendor/lib64/egl/libGLESv2_powervr.so
    #03 pc 0x00000000000af70c /vendor/lib64/egl/libGLESv2_powervr.so (glClear+620)
    #04 pc 0x0000000000802b5c /data/app/~~3HRwJblHAj5FVT_tWjou2A==/com.xxx.zzz-ZCzq1-w-zVpakYzoB1vy1A==/split_config.arm64_v8a.apk
    #05 pc 0x00000000007f8cdc /data/app/~~3HRwJblHAj5FVT_tWjou2A==/com.xxx.zzz-ZCzq1-w-zVpakYzoB1vy1A==/split_config.arm64_v8a.apk
    #06 pc 0x0000000000922504 /data/app/~~3HRwJblHAj5FVT_tWjou2A==/com.xxx.zzz-ZCzq1-w-zVpakYzoB1vy1A==/split_config.arm64_v8a.apk
    #07 pc 0x000000000092a934 /data/app/~~3HRwJblHAj5FVT_tWjou2A==/com.xxx.zzz-ZCzq1-w-zVpakYzoB1vy1A==/split_config.arm64_v8a.apk
    #08 pc 0x00000000009221c4 /data/app/~~3HRwJblHAj5FVT_tWjou2A==/com.xxx.zzz-ZCzq1-w-zVpakYzoB1vy1A==/split_config.arm64_v8a.apk
    #09 pc 0x000000000034bf54 /data/app/~~3HRwJblHAj5FVT_tWjou2A==/com.xxx.zzz-ZCzq1-w-zVpakYzoB1vy1A==/split_config.arm64_v8a.apk
    #10 pc 0x00000000000af97c /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64)
    #11 pc 0x00000000000500d0 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
     
  10. eggbbq

    eggbbq

    Joined:
    Jun 7, 2022
    Posts:
    15
    Sorry!Vulkan caused more crashes, so I skipped that option. Therefore, I did not include any further error logs in the problem description.
     
  11. unity_E5rFZl_dL2dNLg

    unity_E5rFZl_dL2dNLg

    Joined:
    Feb 27, 2020
    Posts:
    1
    Hello, I got this issue too. Crash on Android 11. My Unity version is 2021.3.9f1. How can I fix it ?
     
  12. ZenithGames

    ZenithGames

    Joined:
    Mar 26, 2017
    Posts:
    11
    Any news Unity?
     
  13. ZenithGames

    ZenithGames

    Joined:
    Mar 26, 2017
    Posts:
    11
    Guys, I can provide a repro project but tell me where to put it. We can't fix it, you have to do it on your side. We've tested on multiple versions and it crashes on all of them:
    • 2021.3.23f1
    • 2023.1.0f1
    • 2022.3.2f1
    It happens only with URP.
    It's pretty ridiculous because the only, only workaround is to not to use URP at all and we had to migrate all the projects back. This PowerVR thing apparently affects 10% of the user base (and basically everybody else's user bases)
    We tested on Xiaomi Redmi 9 but I can provide a full list of devices it crashes on.
     
    joshuaFS and eggbbq like this.
  14. eggbbq

    eggbbq

    Joined:
    Jun 7, 2022
    Posts:
    15
    upload_2023-6-21_11-49-16.png
    User-perceived crash rate < 1.09%. It's too hard.
    Is anyone at Unity working on fixing this bug?
     
  15. jperry_oddgames

    jperry_oddgames

    Joined:
    Sep 18, 2017
    Posts:
    62
    Hey @ZenithGames , if you haven't already please submit a bug report through unity with the reproduction project attached and comment the report case number in this thread, tagging the unity staff. Seems you might be the only one with a reproducible so far so it would be great if you could help Unity fix this one.


    Side note: We're also experiencing this crash issue on many devices from builds on unity 2022.3.0f1 & 2022.3.4f1, and I believe also on earlier 2021.3.x versions. I'll post a crash stacktrace below in case it offers any insights but it seems like this thread already has as much info as I'm able to provide

    backtrace:
    #00 pc 0x000000000010f54c /vendor/lib/egl/libGLESv2_mtk.so
    #01 pc 0x000000000004efdd /vendor/lib/egl/libGLESv2_mtk.so
    #02 pc 0x00000000000c104f /vendor/lib/egl/libGLESv2_mtk.so
    #03 pc 0x0000000000085fa9 /vendor/lib/egl/libGLESv2_mtk.so
    #04 pc 0x000000000008653f /vendor/lib/egl/libGLESv2_mtk.so (glClear+474)
    #05 pc 0x0000000000787940 /data/app/~~5ugvJOcF_kHscgwRX9TW3A==/com.projectname/lib/arm/libunity.so (ApiGLES::Clear(unsigned int, ColorRGBAf const&, bool, float, int))
    #06 pc 0x000000000077bf38 /data/app/~~5ugvJOcF_kHscgwRX9TW3A==/com.projectname/lib/arm/libunity.so (gles::ClearCurrentFramebuffer(ApiGLES*, bool, bool, bool, ColorRGBAf const&, float, int, int))
    #07 pc 0x0000000000799804 /data/app/~~5ugvJOcF_kHscgwRX9TW3A==/com.projectname/lib/arm/libunity.so (GfxFramebufferGLES::Clear(GfxClearFlags, ColorRGBAf const&, float, int, bool))
    #08 pc 0x0000000000776150 /data/app/~~5ugvJOcF_kHscgwRX9TW3A==/com.projectname/lib/arm/libunity.so (GfxDeviceGLES::Clear(GfxClearFlags, ColorRGBAf const&, float, unsigned int))
    #09 pc 0x00000000009236db /data/app/~~5ugvJOcF_kHscgwRX9TW3A==/com.projectname/lib/arm/libunity.so (GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&))
    #10 pc 0x00000000009233d1 /data/app/~~5ugvJOcF_kHscgwRX9TW3A==/com.projectname/lib/arm/libunity.so (GfxDeviceWorker::RunExt(ThreadedStreamBuffer&))
    #11 pc 0x000000000092314b /data/app/~~5ugvJOcF_kHscgwRX9TW3A==/com.projectname/lib/arm/libunity.so (GfxDeviceWorker::RunGfxDeviceWorker(void*))
    #12 pc 0x000000000036f28b /data/app/~~5ugvJOcF_kHscgwRX9TW3A==/com.projectname/lib/arm/libunity.so (Thread::RunThreadWrapper(void*))
    #13 pc 0x0000000000080923 /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+40)
    #14 pc 0x0000000000039d63 /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+30)
     
  16. joshuaFS

    joshuaFS

    Joined:
    Jul 23, 2018
    Posts:
    19
    Well, we are running into this now too. I'm guessing a ton of developers are and maybe just don't even know it.

    Has anyone tried the early on suggestion to create a native rendering plugin and call glFinish relatively frequently to try and void the graphics driver bug? My guess is Unity is less than included to fix this much more because they see it as a bug in the graphics driver and so "not my problem". I'm tempted to do the native rendering plugin just to see, but was hoping someone had already tried it??
     
  17. joshuaFS

    joshuaFS

    Joined:
    Jul 23, 2018
    Posts:
    19
    We tried this in a beta testing group with some impacted users (at various intervals), and it did NOT solve the issue. It did initially look like it might help some, but if it is helping, it doesn't help much at all.

    I also did some digging through the PowerVR developer support forums, and it would seem similar things aren't uncommon. I even acquired a device with this potential issue (the Nokia C110), but as it turns out, that device is NOT impacted by this and our game runs just fine on it. I'm guessing that PowerVR (Imagination Technologies) has actually fixed this issue with their driver, and newer devices then don't have the problem. However, it is also apparent that older devices are not likely to get this update any time soon, if at all, as manufacturers just don't care. Furthermore, it is clear that not every game that is played on these devices has this problem, and so it seems equally clear that Unity could work around the problem if properly motivated to do so.

    Any chance anyone at Unity actually wants to care about this? Would sure be nice to not write off a non-trivial amount of users just because Unity can't work around something every other game engine seems to not have a problem with. Why do I regularly feel like I made the wrong call with using Unity...
     
    eggbbq and jperry_oddgames like this.
  18. joshuaFS

    joshuaFS

    Joined:
    Jul 23, 2018
    Posts:
    19
    Did you ever provide this to Unity so they can get this fixed?