Search Unity

  1. All Pro and Enterprise subscribers: find helpful & inspiring creative, tech, and business know-how in the new Unity Success Hub. Sign in to stay up to date.
    Dismiss Notice
  2. Dismiss Notice

java.lang.Error: FATAL EXCEPTION [main]

Discussion in 'Android' started by Munchy2007, May 12, 2021.

  1. Munchy2007

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    1,530
    Since upgrading to Unity 2020.3.6f1 from unity 2019.4.13f1 I've seen a lot of this crash report, on average between 5-10 per day, whereas previously my total crashes of any kind was usually only around 2-3 per week, so this is like a 10 fold increase in crashes.

    I can't reproduce it on any devices that I am able to test it on myself.

    Any suggestions for how I might fix this? Thanks.

    java.lang.Error: FATAL EXCEPTION [main]
    Unity version : 2020.3.6f1
    Device model : HUAWEI T1-A21w
    Device fingerprint: Huawei/t1_10/hwt1a21l:4.4.4/HuaweiMediaPad/T1A21wV1R1C232B009:user/release-keys
    Build Type : Release
    Scripting Backend : IL2CPP
    ABI : armeabi-v7a
    Strip Engine Code : true
    Caused by
    at com.unity3d.player.UnityPlayer.<init> (Unknown Source)
    at com.unity3d.player.UnityPlayerActivity.onCreate (UnityPlayerActivity.java:41)
    at android.app.Activity.performCreate (Activity.java:5354)
    at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1090)
    at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2234)
    at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2319)
    at android.app.ActivityThread.access$1100 (ActivityThread.java:141)
    at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1241)
    at android.os.Handler.dispatchMessage (Handler.java:102)
    at android.os.Looper.loop (Looper.java:136)
    at android.app.ActivityThread.main (ActivityThread.java:5342)
    at java.lang.reflect.Method.invokeNative (Native Method)
    at java.lang.reflect.Method.invoke (Method.java:515)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:871)
    at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:687)
    at dalvik.system.NativeStart.main (Native Method)
     
  2. florianpenzkofer

    florianpenzkofer

    Unity Technologies

    Joined:
    Sep 2, 2014
    Posts:
    352
  3. Munchy2007

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    1,530
    Thanks @florianpenzkofer , any idea when a fix for this might be forthcoming, and do you have any suggestions for what I might do in the meantime, is there any viable alternative to reverting back to the version that worked with Unity 2019? (I've done a lot of work to it since upgrading.)
     
  4. florianpenzkofer

    florianpenzkofer

    Unity Technologies

    Joined:
    Sep 2, 2014
    Posts:
    352
    I expect that we will have a fix soon but it will still typically take a few weeks until it is tested, back-ported and released.
    There is currently no workaround but only Android 4.4 and older are affected.

    The issue is a regression caused by another bugfix and it was first shipped in 2020.3.4 (for Unity 2020.3).
    So you could try to downgrade to 2020.3.3.

    (Updated)
     
    Last edited: May 13, 2021
    YoBorg and Munchy2007 like this.
  5. Munchy2007

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    1,530
    That's sounds like a plan, thanks very much :)
     
  6. Munchy2007

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    1,530
    I managed to locate an old Samsung Galaxy S3 with Android 4.4.4 so I can test it myself now, and sad to report the crash still happens with Unity 2020.3.4 :(

    To save me doing it by trial and error, can you suggest any other versions which may not contain the bug and that I can downgrade to without breaking the project? Thanks.
     
  7. Munchy2007

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    1,530
    For the time being I've decided to upload a version with api 21 as the minimum. Android 4.4 is only a small percentage of my active installs, so it shouldn't annoy too many people but should prevent my crash rate from becoming unacceptably high.

    I'll re-enable api level 19 once the bug is fixed.
     
  8. florianpenzkofer

    florianpenzkofer

    Unity Technologies

    Joined:
    Sep 2, 2014
    Posts:
    352
    I had another look and I gave you the wrong version. The regression was introduced in 2020.3.4.
    I’m sorry for wasting your time on this.

    Your solution to drop API 19 and wait for a fix is probably the best solution for now.

    FYI, Unity 2021.1 will be the last version that still supports API 19. Unity 2021.2 will require Android 5.1.
     
  9. Munchy2007

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    1,530
    No apology needed, I appreciate the help.

    As API 19 support will soon be dropped, I think I'll probably just stick with the higher minimum version going forward.

    Once again, thanks for your help with this.
     
  10. Munchy2007

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    1,530
    For anyone else encountering the same issue I can confirm that Unity 2020.3.3f1 works with Android 4.4 (API 19)
     
    florianpenzkofer likes this.
unityunity