Search Unity

java.lang.Error: FATAL EXCEPTION [main]

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

  1. Munchy2007

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    1,735
    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:
    479
  3. Munchy2007

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    1,735
    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.)
     
    ritesh_khokhani likes this.
  4. florianpenzkofer

    florianpenzkofer

    Unity Technologies

    Joined:
    Sep 2, 2014
    Posts:
    479
    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
    SooNice and Munchy2007 like this.
  5. Munchy2007

    Munchy2007

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

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    1,735
    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,735
    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:
    479
    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,735
    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,735
    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.
  11. Rocket_Locnt

    Rocket_Locnt

    Joined:
    Jun 23, 2021
    Posts:
    6
    java.lang.Error: FATAL EXCEPTION [main]
    Unity version : 2018.4.8f1
    Device model : samsung SM-J111F
    Device fingerprint: samsung/j1aceveltejv/j1acevelte:5.1.1/LMY47V/J111FXXU0AQI2:user/release-keys
    Caused by
    at com.unity3d.player.UnityPlayer.nativeRestartActivityIndicator (Native Method)
    at com.unity3d.player.UnityPlayer.resume (Unknown Source)
    at com.unity3d.player.UnityPlayerActivity.onResume (Unknown Source)
    at android.app.Instrumentation.callActivityOnResume (Instrumentation.java:1285)
    at android.app.Activity.performResume (Activity.java:6730)
    at android.app.ActivityThread.performResumeActivity (ActivityThread.java:4024)
    at android.app.ActivityThread.handleResumeActivity (ActivityThread.java:4100)
    at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3271)
    at android.app.ActivityThread.access$1000 (ActivityThread.java:218)
    at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1734)
    at android.os.Handler.dispatchMessage (Handler.java:102)
    at android.os.Looper.loop (Looper.java:145)
    at android.app.ActivityThread.main (ActivityThread.java:6934)
    at java.lang.reflect.Method.invoke (Native Method)
    at java.lang.reflect.Method.invoke (Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1404)
    at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1199)
     
  12. flying_volcano_studio

    flying_volcano_studio

    Joined:
    Mar 15, 2022
    Posts:
    7
    FATAL EXCEPTION: UnityMain
    Process: com.XXXX.XXXX, PID: 8353
    java.lang.Error: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    Version '2020.3.33f1 (915a7af8b0d5)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
    Build fingerprint: 'samsung/starqlteue/starqlteue:8.0.0/R16NW/G960U1UEU1ARBG:user/release-keys'
    Revision: '14'
    ABI: 'arm64'
    Timestamp: 2022-04-19 05:40:05-0400
    pid: 8353, tid: 8381, name: UnityMain >>> com.XXX.XXX<<<
    uid: 13902
    signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x747df39ff8
    x0 0000007481418588 x1 000000749c28fc00 x2 000000748b2a15e8 x3 000000000000000e
    x4 0000000000000000 x5 000000747df3a088 x6 0000007491225340 x7 0000007491223400
    x8 000000749c290530 x9 000000748b2a15c0 x10 00000000ffffffff x11 0000000000000000
    x12 0000000000002373 x13 0000000000000537 x14 000000000000000d x15 aaaaaaaaaaaaaaab
    x16 000000749dccecb8 x17 000000749dc6cd00 x18 0000000000000000 x19 000000749c28fc00
    x20 000000747df3a088 x21 0000007481418588 x22 000000749c290eb0 x23 000000000000000e
    x24 000000748b2a15e8 x25 000000747b7bfdfa x26 000000747f22e45c x27 000000747b7bfdb0
    x28 000000747f925000 x29 000000747df3a050
    sp 000000747df39fd0 lr 000000749dca1634 pc 000000749dc80074
    backtrace:
    #00 pc 000000000007c074 /system/lib64/libc.so (je_arena_tcache_fill_small+52) (BuildId: 84e75fca7b1497d3873cb80e87a5c399)
    #01 pc 000000000009d630 /system/lib64/libc.so (je_tcache_alloc_small_hard+32) (BuildId: 84e75fca7b1497d3873cb80e87a5c399)
    #02 pc 000000000009138c /system/lib64/libc.so (je_calloc+808) (BuildId: 84e75fca7b1497d3873cb80e87a5c399)
    #03 pc 0000000000516828 /data/app/com.XXXX.XXXX-mLbT5SDqOUyqItng3pcMTg==/lib/arm64/libil2cpp.so (BuildId: 95f042fcd17ee217a64223a559ce49e73fae8e1a)
    #04 pc 0000000000516af4 /data/app/com.XXXX.XXX-mLbT5SDqOUyqItng3pcMTg==/lib/arm64/libil2cpp.so (BuildId: 95f042fcd17ee217a64223a559ce49e73fae8e1a)




    I AM NOT ABLE TO RUN MY APP AFTER UPGRADING TO 2020.3* from 2019.4. App crashes on splash screen on any android devices.

    Any suggestion will be highly acceptable. I am going crazy because of this
     
    SKGowrob and Joyixir like this.
  13. Ahsan_Alee

    Ahsan_Alee

    Joined:
    Oct 2, 2020
    Posts:
    2
    I got this error from google console in crashes report. i have no idea why this is happening.

    java.lang.Error: FATAL EXCEPTION [pool-4-thread-1]
    Unity version : 2019.4.28f1
    Device model : samsung SM-N986N
    Device fingerprint: samsung/c2qksw/c2q:12/SP1A.210812.016/N986NKSU1FVC5:user/release-keys
    Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
    at android.app.PendingIntent.checkFlags (PendingIntent.java:382)
    at android.app.PendingIntent.getBroadcastAsUser (PendingIntent.java:673)
    at android.app.PendingIntent.getBroadcast (PendingIntent.java:660)
    at androidx.work.impl.utils.ForceStopRunnable.getPendingIntent (ForceStopRunnable.java:174)
    at androidx.work.impl.utils.ForceStopRunnable.isForceStopped (ForceStopRunnable.java:108)
    at androidx.work.impl.utils.ForceStopRunnable.run (ForceStopRunnable.java:86)
    at androidx.work.impl.utils.SerialExecutor$Task.run (SerialExecutor.java:75)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
    at java.lang.Thread.run (Thread.java:920)
     
  14. fluxgamesco

    fluxgamesco

    Joined:
    Apr 7, 2022
    Posts:
    1
    Same Problem: My app is also crash after publish on google play console
     
  15. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,963
    This happens when flag is not specified when creating a pending intent. Find out which plugin creates it and contact the publisher for latest update.

    On forum we saw most of these errors are from notification packages. So try updating to latest if its unity's mobile notification package as there seems to be an update related to it recently.
     
    Rocket_Locnt likes this.
  16. ByteStormGmbH

    ByteStormGmbH

    Joined:
    Mar 21, 2021
    Posts:
    17
    We have similar problems only with "UnityMain". With Version 2021.3.6f1 and 2021.3.7f1 :-(

    None of our test mobile phones via APKs experienced such problems. The problems do not only refer to the one app but to all our apps when they are uploaded to Google and the test system checks them.

     
    Warmacha likes this.
  17. Warmacha

    Warmacha

    Joined:
    Dec 13, 2015
    Posts:
    30
    Yup, just upgraded to 2021.3.7f1 from 3.6 to see if we can escape this crash but still happening.

    We also got this huge chunk of fatal error logs when it crashed, maybe it will shed some more light on whatever is going on.

     
    Last edited: Aug 1, 2022
  18. ByteStormGmbH

    ByteStormGmbH

    Joined:
    Mar 21, 2021
    Posts:
    17
    Look here,

    https://forum.unity.com/threads/native-crash-of-fatal-androidruntime-exception-detected.1310480/

    I found this yesterday and it fits the problem. After activating all 4 target architectures, there were no problems in the store. This is not a real solution but a first approach.
     
  19. Warmacha

    Warmacha

    Joined:
    Dec 13, 2015
    Posts:
    30
    Just gave it a try and had the whole team test it, not a single crash in our play session. Unbelievable. none of us are even using a google device, just samsungs, nubia's and oneplus's

    Edit: Spoke too soon, but luckily this new crash report actually tells us a cause. 'Null pointer dereference'. Still a Unity caused crash, but progress I guess.
     
    Last edited: Aug 1, 2022
    ritesh_khokhani likes this.
  20. subhanrngames

    subhanrngames

    Joined:
    Aug 4, 2022
    Posts:
    2
    SAME ANYONE PLEASE GUIDE



    Exception java.lang.Error: FATAL EXCEPTION [main]
    Unity version : 2020.3.25f1
    Device model : Xiaomi M2006C3LI
    Device fingerprint: Redmi/dandelion_in/dandelion:11/RP1A.200720.011/V12.5.9.0.RCDINXM:user/release-keys
    Build Type : Release
    Scripting Backend : IL2CPP
    ABI : armeabi-v7a
    Strip Engine Code : true

    Caused by: java.lang.IllegalArgumentException: parameter must be a descendant of this view
    at android.view.ViewGroup.offsetRectBetweenParentAndChild (ViewGroup.java:6415)
    at android.view.ViewGroup.offsetDescendantRectToMyCoords (ViewGroup.java:6341)
    at android.view.ViewRootImpl.scrollToRectOrFocus (ViewRootImpl.java:4696)
    at android.view.ViewRootImpl.draw (ViewRootImpl.java:4227)
    at android.view.ViewRootImpl.performDraw (ViewRootImpl.java:4071)
    at android.view.ViewRootImpl.performTraversals (ViewRootImpl.java:3329)
    at android.view.ViewRootImpl.doTraversal (ViewRootImpl.java:2129)
    at android.view.ViewRootImpl$TraversalRunnable.run (ViewRootImpl.java:8625)
    at android.view.Choreographer$CallbackRecord.run (Choreographer.java:1034)
    at android.view.Choreographer.doCallbacks (Choreographer.java:858)
    at android.view.Choreographer.doFrame (Choreographer.java:789)
    at android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:1019)
    at android.os.Handler.handleCallback (Handler.java:938)
    at android.os.Handler.dispatchMessage (Handler.java:99)
    at android.os.Looper.loop (Looper.java:236)
    at android.app.ActivityThread.main (ActivityThread.java:7912)
    at java.lang.reflect.Method.invoke
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:620)
    at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1011)