AR App crashing on my Phone when ARsession is loaded. (Unity 2019.)

I have made a Unity Project with 2 scenes:

  1. The main menu screen:

  2. The Ar session Scene

I have Also enabled ARCore in Player → XR Pluggin Management. → ARCore
When I hit play the App crashes. I have tried the following:

  1. Changed the ARFoundation and ARCore Version from Package Manager.
  2. Tried a basic and plain new Unity Project in both Unity 2020 and 2019.4.
  3. Restarting My Phone Numerous times.
  4. Trying APK on other Android devices of my Family and Friends (It works on their device just fine)

One thing I have noticed is that any project without AR-Session in the hierarchy runs just fine (Which explains why the App doest Crash in the Main Menu Screen)

But as soon as it tries to load an ARSession, it crashes.

I managed to get the crash report which is attached below:

java.lang.Error: FATAL EXCEPTION [UnityMain]
Unity version     : 2019.3.7f1
Device model      : Xiaomi POCO F1
Device fingerprint: Xiaomi/beryllium/beryllium:10/QKQ1.190828.002/V11.0.9.0.QEJMIXM:user/release-keys

Caused by: java.lang.Error: * * * * * * * * * * * * * * * *
Version '2019.3.7f1 (6437fd74d35d)', Build type 'Release', Scripting Backend 'mono', CPU 'armeabi-v7a'
Build fingerprint: 'Xiaomi/beryllium/beryllium:10/QKQ1.190828.002/V11.0.9.0.QEJMIXM:user/release-keys'
Revision: '0'
ABI: 'arm'
Timestamp: 2020-08-13 14:39:24+0530
pid: 14068, tid: 14121, name: UnityMain  >>> com.Moving_Objects.Moving_Stuffs <<<
uid: 10325
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
Cause: null pointer dereference
    r0  00000000  r1  00000000  r2  00000000  r3  00000001
    r4  b341b2d0  r5  be53a87c  r6  80808080  r7  00000000
    r8  b9d610b0  r9  00000000  r10 00000000  r11 b6370f60
    ip  b63a7c90  sp  be53a878  lr  b6379859  pc  00000000

managed backtrace:
      #00 (wrapper managed-to-native) UnityEngine.XR.ARCore.ARCoreSessionSubsystem/NativeApi:UnityARCore_session_update (UnityEngine.ScreenOrientation,UnityEngine.Vector2Int,intptr,UnityEngine.XR.ARSubsystems.Feature)
      #01 UnityEngine.XR.ARCore.ARCoreSessionSubsystem/ARCoreProvider:Update (UnityEngine.XR.ARSubsystems.XRSessionUpdateParams,UnityEngine.XR.ARSubsystems.Configuration) <0xef>
      #02 UnityEngine.XR.ARSubsystems.XRSessionSubsystem:Update (UnityEngine.XR.ARSubsystems.XRSessionUpdateParams) <0x1d3>
      #03 UnityEngine.XR.ARFoundation.ARSession:Update () <0x157>
      #04 (wrapper runtime-invoke) object:runtime_invoke_void_this_ (object,intptr,intptr,intptr)

    at UnityEngine.XR.ARCore.ARCoreSessionSubsystem.NativeApi.UnityARCore_session_update (UnityEngine.ScreenOrientation,UnityEngine.Vector2Int,intptr,UnityEngine.XR.ARSubsystems.Feature)(Native Method)
    at UnityEngine.XR.ARCore.ARCoreSessionSubsystem.ARCoreProvider.Update (UnityEngine.XR.ARSubsystems.XRSessionUpdateParams,UnityEngine.XR.ARSubsystems.Configuration)(0xef:239)
    at UnityEngine.XR.ARSubsystems.XRSessionSubsystem.Update (UnityEngine.XR.ARSubsystems.XRSessionUpdateParams)(0x1d3:467)
    at UnityEngine.XR.ARFoundation.ARSession.Update ()(0x157:343)
    at System.Object.runtime_invoke_void_this_ (object,intptr,intptr,intptr)(Native Method)

Based on the troubleshooting done, I dont see the following as responsible for the crash:

  1. Unity (Any version).
  2. ARCore / ARFoundation.
  3. Project itself.

Can someone suggest any device settings for android to fix this? Because I have also found that usual solution is to Factory reset the device. Which I am avoiding, as its my personal phone and not a test phone.

Also if anyone have additional troubleshooting that I can do please let me know.

Thanks in Advance!

Phone: POCO f1, Andoird 10
Unity: 2019.4, 2020
ARFoundation: 4.1.0 (or any other version results in the same outcome)
ARCore: 4.1.0 (or any other version results in the same outcome)


hi, im experiencing the same issue too. my logcat gives a similar readout :

FATAL EXCEPTION: UnityMain
Process: com.R.SDCTestBed2, PID: 14781
java.lang.Error: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Version '2019.3.15f1 (59ff3e03856d)', Build type 'Development', Scripting Backend 'mono', CPU 'armeabi-v7a'
Build fingerprint: 'samsung/star2ltexx/star2lte:10/QP1A.190711.020/G965FXXU9ETF5:user/release-keys'
Revision: '26'
ABI: 'arm'
Timestamp: 2020-08-13 22:08:43+0800
pid: 14781, tid: 14804, name: UnityMain  >>> com.R.SDCTestBed2 <<<
uid: 10637
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
Cause: null pointer dereference
r0  00650070  r1  00730069  r2  00000000  r3  00000000
r4  9cd8d3f0  r5  9dab75c4  r6  9cd8d3f0  r7  00000000
r8  964c93b0  r9  80808080  r10 00000000  r11 00000000
ip  964d28a8  sp  b67cad50  lr  96491fad  pc  00000000

managed backtrace:
#00 (wrapper managed-to-native) UnityEngine.XR.ARCore.ARCoreSessionSubsystem/NativeApi:UnityARCore_session_update (UnityEngine.ScreenOrientation,UnityEngine.Vector2Int)
#01 UnityEngine.XR.ARCore.ARCoreSessionSubsystem/ARCoreProvider:Update (UnityEngine.XR.ARSubsystems.XRSessionUpdateParams) <C:\Users\Ryan Chan\Desktop\Unity\arvr_discoveryapp\Library\PackageCache\com.unity.xr.arcore@3.1.3\Runtime\ARCoreSessionSubsystem.cs:46>
#02 UnityEngine.XR.ARSubsystems.XRSessionSubsystem:Update (UnityEngine.XR.ARSubsystems.XRSessionUpdateParams) <C:\Users\Ryan Chan\Desktop\Unity\arvr_discoveryapp\Library\PackageCache\com.unity.xr.arsubsystems@3.1.3\Runtime\SessionSubsystem\XRSessionSubsystem.cs:81>
#03 UnityEngine.XR.ARFoundation.ARSession:Update () <C:\Users\Ryan Chan\Desktop\Unity\arvr_discoveryapp\Library\PackageCache\com.unity.xr.arfoundation@3.1.3\Runtime\AR\ARSession.cs:368>
#04 (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)

at UnityEngine.XR.ARCore.ARCoreSessionSubsystem.NativeApi.UnityARCore_session_update (UnityEngine.ScreenOrientation,UnityEngine.Vector2Int)(Native Method)
at UnityEngine.XR.ARCore.ARCoreSessionSubsystem.ARCoreProvider.Update (UnityEngine.XR.ARSubsystems.XRSessionUpdateParams)(C:\Users\Ryan Chan\Desktop\Unity\arvr_discoveryapp\Library\PackageCache\com.unity.xr.arcore@3.1.3\Runtime\ARCoreSessionSubsystem.cs:46)
at UnityEngine.XR.ARSubsystems.XRSessionSubsystem.Update (UnityEngine.XR.ARSubsystems.XRSessionUpdateParams)(C:\Users\Ryan Chan\Desktop\Unity\arvr_discoveryapp\Library\PackageCache\com.unity.xr.arsubsystems@3.1.3\Runtime\SessionSubsystem\XRSessionSubsystem.cs:81)
at UnityEngine.XR.ARFoundation.ARSession.Update ()(C:\Users\Ryan Chan\Desktop\Unity\arvr_discoveryapp\Library\PackageCache\com.unity.xr.arfoundation@3.1.3\Runtime\AR\ARSession.cs:368)
at System.Object.runtime_invoke_void__this__ (object,intptr,intptr,intptr)(Native Method)

please help!

hey pradyumnp508! i managed to get it to work!

according to : Releases · google-ar/arcore-unity-sdk · GitHub , google just released some update that breaks games built in 32-bit, so try the following :

Build Settings > Player Settings
Scripting set to IL2CPP
Target Architecture check ARM64

that might help you :slight_smile:

12 Likes

Okay, thank you I’ll try it tomorrow and let you know if it works!! Thanks for your help

EDIT: It worked. Thank you! For anyone else having this problem here are the detailed steps of what to do:

1.Go to Build Settings → Player Settings → Other Settings:
Under Configurations Change the Scripting Backend to IL2CPP
2. Under the same, tick ARM64.

  1. Rebuild and Deploy the project, it should work now!
8 Likes

Had the same issue!!! You guys are a life saver!!!
Worked perfectly for me too.
The weird thing is that I worked fine on my phone (Samsung Galaxy S9+) the night before.
After waking up the next day to work on it, it suddenly stopped working…
I was so close to a rage quit.:face_with_spiral_eyes:

I had the same situation, at night it was working but the next morning it started crashing. Glad @thesleeper came to help.
Glad it worked for u and everyone else who might be having this issue in the future.

1 Like

ARCore doesn’t work 32bit anymore. Use IL2CPP with 64bit.

1 Like

Thank you so muuuuch