Search Unity

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

Discussion in 'AR' started by pradyumnp508, Aug 13, 2020.

Thread Status:
Not open for further replies.
  1. pradyumnp508

    pradyumnp508

    Joined:
    Aug 9, 2020
    Posts:
    15
    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:

    Code (CSharp):
    1. java.lang.Error: FATAL EXCEPTION [UnityMain]
    2. Unity version     : 2019.3.7f1
    3. Device model      : Xiaomi POCO F1
    4. Device fingerprint: Xiaomi/beryllium/beryllium:10/QKQ1.190828.002/V11.0.9.0.QEJMIXM:user/release-keys
    5.  
    6. Caused by: java.lang.Error: * * * * * * * * * * * * * * * *
    7. Version '2019.3.7f1 (6437fd74d35d)', Build type 'Release', Scripting Backend 'mono', CPU 'armeabi-v7a'
    8. Build fingerprint: 'Xiaomi/beryllium/beryllium:10/QKQ1.190828.002/V11.0.9.0.QEJMIXM:user/release-keys'
    9. Revision: '0'
    10. ABI: 'arm'
    11. Timestamp: 2020-08-13 14:39:24+0530
    12. pid: 14068, tid: 14121, name: UnityMain  >>> com.Moving_Objects.Moving_Stuffs <<<
    13. uid: 10325
    14. signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
    15. Cause: null pointer dereference
    16.     r0  00000000  r1  00000000  r2  00000000  r3  00000001
    17.     r4  b341b2d0  r5  be53a87c  r6  80808080  r7  00000000
    18.     r8  b9d610b0  r9  00000000  r10 00000000  r11 b6370f60
    19.     ip  b63a7c90  sp  be53a878  lr  b6379859  pc  00000000
    20.  
    21. managed backtrace:
    22.       #00 (wrapper managed-to-native) UnityEngine.XR.ARCore.ARCoreSessionSubsystem/NativeApi:UnityARCore_session_update (UnityEngine.ScreenOrientation,UnityEngine.Vector2Int,intptr,UnityEngine.XR.ARSubsystems.Feature)
    23.       #01 UnityEngine.XR.ARCore.ARCoreSessionSubsystem/ARCoreProvider:Update (UnityEngine.XR.ARSubsystems.XRSessionUpdateParams,UnityEngine.XR.ARSubsystems.Configuration) <0xef>
    24.       #02 UnityEngine.XR.ARSubsystems.XRSessionSubsystem:Update (UnityEngine.XR.ARSubsystems.XRSessionUpdateParams) <0x1d3>
    25.       #03 UnityEngine.XR.ARFoundation.ARSession:Update () <0x157>
    26.       #04 (wrapper runtime-invoke) object:runtime_invoke_void_this_ (object,intptr,intptr,intptr)
    27.  
    28.     at UnityEngine.XR.ARCore.ARCoreSessionSubsystem.NativeApi.UnityARCore_session_update (UnityEngine.ScreenOrientation,UnityEngine.Vector2Int,intptr,UnityEngine.XR.ARSubsystems.Feature)(Native Method)
    29.     at UnityEngine.XR.ARCore.ARCoreSessionSubsystem.ARCoreProvider.Update (UnityEngine.XR.ARSubsystems.XRSessionUpdateParams,UnityEngine.XR.ARSubsystems.Configuration)(0xef:239)
    30.     at UnityEngine.XR.ARSubsystems.XRSessionSubsystem.Update (UnityEngine.XR.ARSubsystems.XRSessionUpdateParams)(0x1d3:467)
    31.     at UnityEngine.XR.ARFoundation.ARSession.Update ()(0x157:343)
    32.     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)
     

    Attached Files:

  2. thesleeper

    thesleeper

    Joined:
    Sep 3, 2014
    Posts:
    14
    hi, im experiencing the same issue too. my logcat gives a similar readout :


    Code (CSharp):
    1. FATAL EXCEPTION: UnityMain
    2. Process: com.R.SDCTestBed2, PID: 14781
    3. java.lang.Error: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    4. Version '2019.3.15f1 (59ff3e03856d)', Build type 'Development', Scripting Backend 'mono', CPU 'armeabi-v7a'
    5. Build fingerprint: 'samsung/star2ltexx/star2lte:10/QP1A.190711.020/G965FXXU9ETF5:user/release-keys'
    6. Revision: '26'
    7. ABI: 'arm'
    8. Timestamp: 2020-08-13 22:08:43+0800
    9. pid: 14781, tid: 14804, name: UnityMain  >>> com.R.SDCTestBed2 <<<
    10. uid: 10637
    11. signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
    12. Cause: null pointer dereference
    13. r0  00650070  r1  00730069  r2  00000000  r3  00000000
    14. r4  9cd8d3f0  r5  9dab75c4  r6  9cd8d3f0  r7  00000000
    15. r8  964c93b0  r9  80808080  r10 00000000  r11 00000000
    16. ip  964d28a8  sp  b67cad50  lr  96491fad  pc  00000000
    17.  
    18. managed backtrace:
    19. #00 (wrapper managed-to-native) UnityEngine.XR.ARCore.ARCoreSessionSubsystem/NativeApi:UnityARCore_session_update (UnityEngine.ScreenOrientation,UnityEngine.Vector2Int)
    20. #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>
    21. #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>
    22. #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>
    23. #04 (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
    24.  
    25. at UnityEngine.XR.ARCore.ARCoreSessionSubsystem.NativeApi.UnityARCore_session_update (UnityEngine.ScreenOrientation,UnityEngine.Vector2Int)(Native Method)
    26. 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)
    27. 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)
    28. 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)
    29. at System.Object.runtime_invoke_void__this__ (object,intptr,intptr,intptr)(Native Method)
    30.  
    please help!
     
  3. thesleeper

    thesleeper

    Joined:
    Sep 3, 2014
    Posts:
    14
  4. pradyumnp508

    pradyumnp508

    Joined:
    Aug 9, 2020
    Posts:
    15
    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.

    3. Rebuild and Deploy the project, it should work now!
     
    Last edited: Aug 16, 2020
  5. amiiya

    amiiya

    Joined:
    Jul 25, 2018
    Posts:
    1
    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.:confused:
     
    Last edited: Aug 15, 2020
  6. pradyumnp508

    pradyumnp508

    Joined:
    Aug 9, 2020
    Posts:
    15
    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.
     
    KohWeiZhen likes this.
  7. freeschool

    freeschool

    Joined:
    Dec 17, 2014
    Posts:
    9
    ARCore doesn't work 32bit anymore. Use IL2CPP with 64bit.
     
    plasmanunchucks likes this.
  8. manouuw

    manouuw

    Joined:
    Feb 22, 2021
    Posts:
    1
    Thank you so muuuuch
     
Thread Status:
Not open for further replies.