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

Android crash with Enlighten after upgrade to Unity 2021 LTS

Discussion in 'Android' started by brockemon, Apr 14, 2022.

  1. brockemon

    brockemon

    Joined:
    Dec 21, 2012
    Posts:
    45
    Tried out new Unity 2021 LTS yesterday with a build to our Alpha users. Looks like about 20 of them are getting this crash. Made sure Enlighten, GI was turned off for every scene and crash still happens. Anyone else getting this crash?

    Thread 0 (crashed)
    0 libunity.so 0x0000007a0f2369ac RenderTexture::GetSRGBReadWrite() const
    1 libunity.so 0x0000007a0f3688f0 GenerateEnvironmentData(int, float*, bool)
    2 libunity.so 0x0000007a0f45b810 EnlightenRuntimeManager::UpdateEnvironmentLighting()
    3 libunity.so 0x0000007a0f45bfb8 EnlightenRuntimeManager::Update()
    4 libunity.so 0x0000007a0f2aeeac ExecutePlayerLoop(NativePlayerLoopSystem*)
    5 libunity.so 0x0000007a0f2aeeec ExecutePlayerLoop(NativePlayerLoopSystem*)
    6 libunity.so 0x0000007a0f2af124 PlayerLoop()
    7 libunity.so 0x0000007a0f402a08 UnityPlayerLoop()
    8 libunity.so 0x0000007a0f41916c nativeRender(_JNIEnv*, _jobject*)
    9 base.odex 0x0000007a628c1b2c <symbols missing for uuid:
     
    dan_ginovker likes this.
  2. Devil_Inside

    Devil_Inside

    Joined:
    Nov 19, 2012
    Posts:
    1,117
    Getting this too. No idea what's causing. Send help
     
  3. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,663
    Anything in logcat ?
     
  4. Devil_Inside

    Devil_Inside

    Joined:
    Nov 19, 2012
    Posts:
    1,117
    I'm not getting this myself, these are reports from Cloud Diagnostics, so unfortunately I can't get logcat logs.
    Aside from RenderTexture::GetSRGBReadWrite() crash, there are also a lot of:
    Thread 0 (crashed)
    0 libunity.so 0x00000000815f9344 RenderTexture::SetSRGBReadWrite(bool)
    1 libunity.so 0x00000000816bd8d5 GenerateEnvironmentData(int, float*, bool)
    2 libunity.so 0x0000000081767897 EnlightenRuntimeManager::UpdateEnvironmentLighting()
    3 libunity.so 0x0000000081767f9d EnlightenRuntimeManager::Update()
    4 libunity.so 0x0000000081640561 ExecutePlayerLoop(NativePlayerLoopSystem*)
    5 libunity.so 0x0000000081640583 ExecutePlayerLoop(NativePlayerLoopSystem*)
    6 libunity.so 0x0000000081640713 PlayerLoop()
    7 libunity.so 0x0000000081725e67 UnityPlayerLoop()
    8 libunity.so 0x00000000817358f9 nativeRender(_JNIEnv*, _jobject*)
    9 base.odex 0x000000008535c043 <symbols missing for uuid: 0000000000000000000000000000000000000000>
     
    dan_ginovker likes this.
  5. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,663
  6. ckirk_unity

    ckirk_unity

    Joined:
    Feb 1, 2018
    Posts:
    4
    I've ran into this issue locally when updating an old project from Unity 2018.4.33f1 to Unity 2021.3.3f1 and here's some more information from logcat:

    at libunity.RenderTexture::GetSRGBReadWrite() const(GetSRGBReadWrite:0)
    at libunity.GenerateEnvironmentData(int, float*, bool)(GenerateEnvironmentData:472)
    at libunity.EnlightenRuntimeManager::UpdateEnvironmentLighting()(UpdateEnvironmentLighting:238)
    at libunity.EnlightenRuntimeManager::Update()(Update:716)
    at libunity.EnlightenRuntimeManager::InitializeClass(void*):: PostLateUpdateEnlightenRuntimeUpdateRegistrator::Forward()(InitializeClass:32)
    at libunity.ExecutePlayerLoop(NativePlayerLoopSystem*)(ExecutePlayerLoop:66)
    at libunity.ExecutePlayerLoop(NativePlayerLoopSystem*)(ExecutePlayerLoop:130)
    at libunity.PlayerLoop()(PlayerLoop:224)
    at libunity.UnityPlayerLoop()(UnityPlayerLoop:520)
    at libunity.nativeRender(_JNIEnv*, _jobject*)(nativeRende
    I've tried changing a lot of settings around lighting and environment lighting including switching all my scenes to enlighten and then switching all scenes to Progressive GPU (Preview). Haven't found a fix. Progressive CPU is unavailable.

    This crash happens immediately on launch after the splash screen.

    The issue does disappear when I use OpenGLES3 (previously using OpenGLES2) but the device I'm testing with (Galaxy Grand Prime Plus FW 6.0.1) doesn't have full support for OpenGLES3 as far as I'm aware so I can't use that. Other issues also come up when I begin using OpenGLES3 which I believe is caused from this device not supporting it entirely.

    My guess at the moment is that this issue is tied to OpenGLES2 (which is marked as depreciated in Unity 2021.3).
     
    Last edited: Jul 15, 2022
    dan_ginovker and kidzooly like this.
  7. kidzooly

    kidzooly

    Joined:
    Jan 23, 2016
    Posts:
    26
    Same for us, after migrating from 2020 LTS to 2021 LTS, we are seeing this crashes.
    Metadata of the crash

    upload_2022-7-14_13-1-41.png
    upload_2022-7-14_13-2-49.png
    Thanks
     
    dan_ginovker and ckirk_unity like this.
  8. oriontvv

    oriontvv

    Joined:
    Jun 19, 2016
    Posts:
    5
    Any updates? I've got the same problem after update to 2021.3
     
  9. ckirk_unity

    ckirk_unity

    Joined:
    Feb 1, 2018
    Posts:
    4
    @oriontvv I'm fairly sure it's caused from running Open GL ES 2.0 with the newer versions of Unity. Check to see if you're currently running that graphics API in your Player Settings. If you are, switch it to Open GL ES 3.0 (or newer) and you should be good.
     
    Idle_Splash likes this.
  10. oriontvv

    oriontvv

    Joined:
    Jun 19, 2016
    Posts:
    5
    Thanks, will try.
     
  11. gubbi

    gubbi

    Joined:
    Dec 20, 2014
    Posts:
    12
    So, to make things clearer, the bug comes from creating a project using a previous Unity version where OpenGL ES 2 was working properlyy. After upgrading to 2021.3, OpenGL ES 2 is deprecated and stops working on Android.

    The fix is to remove support for OpenGL ES 2 in Edit->Project Settings->Player->Android tab (see https://docs.unity3d.com/Manual/GraphicsAPIs.html).
    Check "Auto graphics API" unless you to want to actively remove support for some API. This will also remove support for OpenGL ES 2 when using a Unity version where it is deprecated.

    This will create a android build with a manifest that requires a minimum OpenGL ES version of 3, and devices without support for OpenGL ES 3 will not be able to install the application.
     
    Last edited: Sep 20, 2022
    codekiddddd likes this.
  12. der_sveni

    der_sveni

    Joined:
    Jan 6, 2017
    Posts:
    1
    Just got the same issue in 2022.1.
    In my case, some of my scenes were working on OpenGLES2 devices, others were not.
    I was able to fix this by simply creating a new scene and copying the whole contents of the old scene to the new scene. Afterwards, the previously crashing scene is working, i.e., its copy is working.
     
    Last edited: Oct 11, 2022
    ivan_pixio and codekiddddd like this.
  13. JoJoJoX

    JoJoJoX

    Joined:
    Jun 23, 2022
    Posts:
    51
    You are GOD!
     
  14. JoJoJoX

    JoJoJoX

    Joined:
    Jun 23, 2022
    Posts:
    51
    Any progress on this issue? We find this crash on Unity 2021.3.11f1! Targeting Android API level 31
    Crash on Devices:
    Samsung Galaxy 12A/Android 12
    LG K31/Android 10
     
    codekiddddd likes this.
  15. JoJoJoX

    JoJoJoX

    Joined:
    Jun 23, 2022
    Posts:
    51
    Updates:
    We delete "OpenGLES2" from my project. And That's OK now.
    BTW, we had used `FlareLayer` on our Main Camera, if we delete it and Add "OpenGLES2" back, it is OK too.
    Delete "OpenGLES2" should be the right option!
    Nice Day!
     
    Last edited: Nov 10, 2022
    JokeMaker likes this.
  16. Idle_Splash

    Idle_Splash

    Joined:
    Jun 4, 2022
    Posts:
    4
    this worked. thanks
     
  17. doubletapsoft

    doubletapsoft

    Joined:
    Sep 23, 2013
    Posts:
    32
    How did you know what scenes were the issue?
     
  18. Seanm07

    Seanm07

    Joined:
    Mar 18, 2014
    Posts:
    12
    We just updated an app from Unity 2018 to 2022.2.20f1, it had only OpenGLES2 added to the graphics APIs which I thought would be fine but we had the same RenderTexture::GetSRGBReadWrite() crash happening on 20% of android 10 and higher users.

    (We've built in 2022.2.20f1 with OpenGLES2 in the graphics APIs list but usually also have OpenGLES3 which the android 10 devices being affected from this crash would have defaulted to)