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. Join us on Thursday, June 8, for a Q&A with Unity's Content Pipeline group here on the forum, and on the Unity Discord, and discuss topics around Content Build, Import Workflows, Asset Database, and Addressables!
    Dismiss Notice

Resolved ARFoundation Immediately Crashing

Discussion in 'AR' started by freaksed, Jul 12, 2018.

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

    freaksed

    Joined:
    Sep 15, 2010
    Posts:
    22
    I am trying to use the new ARFoundation stuff, but even with a fresh project and just a cube in the scene with the 2 provided prefab objects, the app crashes immediately. In the logcat it says something about tango for crash errors, but not much else...
     
  2. freaksed

    freaksed

    Joined:
    Sep 15, 2010
    Posts:
    22
    Copied a log for more info
    07-11 16:44:00.753: E/CRASH(4230): signal 6 (SIGABRT), code -6 (?), fault addr --------
    07-11 16:44:00.753: E/CRASH(4230): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    07-11 16:44:00.753: E/CRASH(4230): Build fingerprint: 'google/marlin/marlin:8.1.0/OPM4.171019.021.P1/4820305:user/release-keys'
    07-11 16:44:00.753: E/CRASH(4230): Revision: '0'
    07-11 16:44:00.754: E/CRASH(4230): pid: 4230, tid: 4254, name: UnityMain >>> com.ryot.artest <<<
    07-11 16:44:00.754: E/CRASH(4230): r0 00000000 r1 0000109e r2 00000006 r3 00000008
    07-11 16:44:00.754: E/CRASH(4230): r4 00001086 r5 0000109e r6 d06fd75c r7 0000010c
    07-11 16:44:00.754: E/CRASH(4230): r8 00000000 r9 d06fdbb4 sl 0000018d fp 00000000
    07-11 16:44:00.754: E/CRASH(4230): ip 00000000 sp d06fd748 lr ebb7fbdf pc ebb795ec cpsr d06fd3d8
    07-11 16:44:00.754: E/CRASH(4230): backtrace:
    07-11 16:44:01.120: E/CRASH(4230): #00 pc 0001a5ec /system/lib/libc.so (abort+63)
    07-11 16:44:01.120: E/CRASH(4230): #01 pc 000065b1 /system/lib/liblog.so (__android_log_assert+156)
    07-11 16:44:01.121: E/CRASH(4230): #02 pc 00009d1d /data/app/com.ryot.artest-V1C68HCljGM033wiBMvpPg==/lib/arm/libtango_client_api2.so
    07-11 16:44:01.121: E/CRASH(4230): #03 il 0000004f at (wrapper managed-to-native) UnityEngine.XR.Tango.TangoInputTracking.Internal_TryGetPoseAtTime (double,UnityEngine.ScreenOrientation,UnityEngine.XR.Tango.CoordinateFrame,UnityEngine.XR.Tango.CoordinateFrame,UnityEngine.XR.Tango.PoseData&) <0x0004f>
    07-11 16:44:01.121: E/CRASH(4230): #04 il 0000005f at UnityEngine.XR.Tango.TangoInputTracking.TryGetPoseAtTime (UnityEngine.XR.Tango.PoseData&,UnityEngine.XR.Tango.CoordinateFrame,UnityEngine.XR.Tango.CoordinateFrame,double) [0x00007] in <114d2ced01184997aa75b71e60cf7eb5>:0
    07-11 16:44:01.121: E/CRASH(4230): #05 il 0000004f at UnityEngine.SpatialTracking.PoseDataSource.TryGetTangoPose (UnityEngine.XR.Tango.CoordinateFrame,UnityEngine.Pose&) [0x00008] in <6ec990296dc04c7fb243c13b9d7feaeb>:0
    07-11 16:44:01.121: E/CRASH(4230): #06 il 000000f3 at UnityEngine.SpatialTracking.PoseDataSource.TryGetDataFromSource (UnityEngine.SpatialTracking.TrackedPoseDriver/TrackedPose,UnityEngine.Pose&) [0x0009b] in <6ec990296dc04c7fb243c13b9d7feaeb>:0
    07-11 16:44:01.121: E/CRASH(4230): #07 il 00000063 at UnityEngine.SpatialTracking.TrackedPoseDriver.TryGetPoseData (UnityEngine.SpatialTracking.TrackedPoseDriver/DeviceType,UnityEngine.SpatialTracking.TrackedPoseDriver/TrackedPose,UnityEngine.Pose&) [0x00025] in <6ec990296dc04c7fb243c13b9d7feaeb>:0
    07-11 16:44:01.121: E/CRASH(4230): #08 il 000000e3 at UnityEngine.SpatialTracking.TrackedPoseDriver.PerformUpdate () [0x0001f] in <6ec990296dc04c7fb243c13b9d7feaeb>:0
    07-11 16:44:01.121: E/CRASH(4230): #09 il 00000033 at UnityEngine.SpatialTracking.TrackedPoseDriver.FixedUpdate () [0x00019] in <6ec990296dc04c7fb243c13b9d7feaeb>:0
    07-11 16:44:01.121: E/CRASH(4230): #10 il 00000073 at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <0x00073>
     
  3. rxmarccall

    rxmarccall

    Joined:
    Oct 13, 2011
    Posts:
    353
    Mine was crashing and it was because I needed to add a row to the Info.plist file inside of xcode for "Privacy - Camera Usage Description"

    Hope it helps.
     
  4. freaksed

    freaksed

    Joined:
    Sep 15, 2010
    Posts:
    22
    I am running on Android :/
     
  5. freaksed

    freaksed

    Joined:
    Sep 15, 2010
    Posts:
    22
    More update, I noticed this line just above the crash messages
    A/tango(7293): jni_helper.cc:19 'vm' Must be non NULL
     
  6. tdmowrer

    tdmowrer

    Unity Technologies

    Joined:
    Apr 21, 2017
    Posts:
    605
  7. AkamaruDesign

    AkamaruDesign

    Joined:
    Dec 17, 2016
    Posts:
    13
    I'm gettin this too, please help!
    also, i do not have the checkbox for xr settings apllyed since there is a message warning me to not do it.

    EDIT

    This is the error mi redmi note 8 pro gives me

    java.lang.Error: FATAL EXCEPTION [UnityMain]
    Unity version : 2019.4.0f1
    Device model : Xiaomi Redmi Note 8 Pro
    Device fingerprint: Redmi/begonia_eea/begonia:10/QP1A.190711.020/V11.0.3.0.QGGEUXM:user/release-keys

    Caused by: java.lang.Error: * * * * * * * * * * * * * * * *
    Version '2019.4.0f1 (0af376155913)', Build type 'Release', Scripting Backend 'mono', CPU 'armeabi-v7a'
    Build fingerprint: 'Redmi/begonia_eea/begonia:10/QP1A.190711.020/V11.0.3.0.QGGEUXM:user/release-keys'
    Revision: '0'
    ABI: 'arm'
    Timestamp: 2020-08-13 14:16:29-0500
    pid: 10832, tid: 10853, name: UnityMain >>> com.Akamarudesign.Flormorado <<<
    uid: 10255
    signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
    Cause: null pointer dereference
    r0 00000000 r1 00000000 r2 00000000 r3 00000000
    r4 adecb180 r5 c1a3a85c r6 80808080 r7 00000000
    r8 b71e5c70 r9 00000000 r10 00000000 r11 b465c0d0
    ip b4693ca0 sp c1a3a858 lr b4664b99 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 () <0x163>
    #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 ()(0x163:355)
    at System.Object.runtime_invoke_void_this_ (object,intptr,intptr,intptr)(Native Method)
     
    Last edited: Aug 13, 2020
  8. rod_martin

    rod_martin

    Joined:
    Nov 9, 2016
    Posts:
    4
    I am using Unity 2019.4.5f1
    Samsung Galaxy Tab SM-T720
    All AR Apps crash on a few different AR Foundation setups
    This is from the Samples arfoundation-samples-2.1
    Any help appreciated.

    2020/08/17 13:58:11.197 29743 29796 Error AndroidRuntime FATAL EXCEPTION: UnityMain
    2020/08/17 13:58:11.197 29743 29796 Error AndroidRuntime Process: com.unity.arfoundation.samples, PID: 29743
    2020/08/17 13:58:11.197 29743 29796 Error AndroidRuntime java.lang.Error: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    2020/08/17 13:58:11.197 29743 29796 Error AndroidRuntime Version '2019.4.5f1 (81610f64359c)', Build type 'Release', Scripting Backend 'mono', CPU 'armeabi-v7a'
    2020/08/17 13:58:11.197 29743 29796 Error AndroidRuntime Build fingerprint: 'samsung/gts4lvwifieea/gts4lvwifi:10/QP1A.190711.020/T720XXU1BTG3:user/release-keys'
    2020/08/17 13:58:11.197 29743 29796 Error AndroidRuntime Revision: '9'
    2020/08/17 13:58:11.197 29743 29796 Error AndroidRuntime ABI: 'arm'
    2020/08/17 13:58:11.197 29743 29796 Error AndroidRuntime Timestamp: 2020-08-17 13:58:10+0100
    2020/08/17 13:58:11.197 29743 29796 Error AndroidRuntime pid: 29743, tid: 29796, name: UnityMain >>> com.unity.arfoundation.samples <<<
    2020/08/17 13:58:11.197 29743 29796 Error AndroidRuntime uid: 10249
    2020/08/17 13:58:11.197 29743 29796 Error AndroidRuntime signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
    2020/08/17 13:58:11.197 29743 29796 Error AndroidRuntime Cause: null pointer dereference
    2020/08/17 13:58:11.197 29743 29796 Error AndroidRuntime r0 00650070 r1 00730069 r2 00000000 r3 00000000
    2020/08/17 13:58:11.197 29743 29796 Error AndroidRuntime r4 b1926818 r5 b78b3990 r6 b1926818 r7 00000000
    2020/08/17 13:58:11.197 29743 29796 Error AndroidRuntime r8 b480c230 r9 80808080 r10 00000000 r11 00000000
    2020/08/17 13:58:11.197 29743 29796 Error AndroidRuntime ip b4815890 sp be9faa08 lr b47d6ca7 pc 00000000
    2020/08/17 13:58:11.197 29743 29796 Error AndroidRuntime
    2020/08/17 13:58:11.197 29743 29796 Error AndroidRuntime managed backtrace:
    2020/08/17 13:58:11.197 29743 29796 Error AndroidRuntime #00 (wrapper managed-to-native) UnityEngine.XR.ARCore.ArPrestoApi:ArPresto_update ()
    2020/08/17 13:58:11.197 29743 29796 Error AndroidRuntime #01 UnityEngine.XR.ARCore.ARCorePromise`1<UnityEngine.XR.ARSubsystems.SessionAvailability>:OnKeepWaiting () <0x33>
    2020/08/17 13:58:11.197 29743 29796 Error AndroidRuntime #02 UnityEngine.XR.ARSubsystems.Promise`1<UnityEngine.XR.ARSubsystems.SessionAvailability>:get_keepWaiting () <0x1b>
    2020/08/17 13:58:11.197 29743 29796 Error AndroidRuntime #03 UnityEngine.CustomYieldInstruction:MoveNext () <0x1f>
    2020/08/17 13:58:11.197 29743 29796 Error AndroidRuntime #04 UnityEngine.SetupCoroutine:InvokeMoveNext (System.Collections.IEnumerator,intptr) <0x53>
    2020/08/17 13:58:11.197 29743 29796 Error AndroidRuntime #05 (wrapper runtime-invoke) <Module>:runtime_invoke_void_object_intptr (object,intptr,intptr,intptr)
    2020/08/17 13:58:11.197 29743 29796 Error AndroidRuntime
    2020/08/17 13:58:11.197 29743 29796 Error AndroidRuntime at UnityEngine.XR.ARCore.ArPrestoApi.ArPresto_update ()(Native Method)
    2020/08/17 13:58:11.197 29743 29796 Error AndroidRuntime at UnityEngine.XR.ARCore.ARCorePromise<UnityEngine.XR.ARSubsystems.SessionAvailability>.OnKeepWaiting ()(0x33:51)
    2020/08/17 13:58:11.197 29743 29796 Error AndroidRuntime at UnityEngine.XR.ARSubsystems.Promise<UnityEngine.XR.ARSubsystems.SessionAvailability>.get_keepWaiting ()(0x1b:27)
    2020/08/17 13:58:11.197 29743 29796 Error AndroidRuntime at UnityEngine.CustomYieldInstruction.MoveNext ()(0x1f:31)
    2020/08/17 13:58:11.197 29743 29796 Error AndroidRuntime at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator,intptr)(0x53:83)
    2020/08/17 13:58:11.197 29743 29796 Error AndroidRuntime at <Module>.runtime_invoke_void_object_intptr (object,intptr,intptr,intptr)(Native Method)
    2020/08/17 13:58:11.284 29743 29796 Info Process Sending signal. PID: 29743 SIG: 9
     
  9. rod_martin

    rod_martin

    Joined:
    Nov 9, 2016
    Posts:
    4
    rsmeenk likes this.
  10. delineagustine

    delineagustine

    Joined:
    Feb 13, 2020
    Posts:
    1
    Hi, I also having the same issue. I'm trying AR Foundation sample project and it crashed on my phone. My device is Oppo Reno 3.
     
  11. Nyanpas

    Nyanpas

    Joined:
    Dec 29, 2016
    Posts:
    406
    All crashes instantly on my testphones as well. Build and run shows the Unity screen then crashes. I have tried a trillion different options after scouring the internets for help, but nothing has worked so far. This is so frustrating compared to the other platforms I work with (WebGL/WebAR/UWP). You'd think Android being the biggest software platform would at least make things simple for developers.

    [edit] Also seeing a lot of posts from August this year with the same issue all over the internets. What did google do wrong that they seemingly refuse to acknowledge as far as I can find online?
     
  12. tdmowrer

    tdmowrer

    Unity Technologies

    Joined:
    Apr 21, 2017
    Posts:
    605
    This thread was originally about a very early version of ARFoundation, which used a completely different integration (notice the references to "Tango"). Any crash in the latest ARFoundation (4.0 or 4.1) would have a different underlying cause. Please log a bug or provide more details (e.g., a callstack, etc).
     
  13. tdmowrer

    tdmowrer

    Unity Technologies

    Joined:
    Apr 21, 2017
    Posts:
    605
    The timing sounds like a breaking change in ARCore v1.19 which no longer supports 32 bit on 64 bit devices. See https://github.com/google-ar/arcore-unity-sdk/releases/tag/v1.19.0. If this is the case, there should be logcat output saying it couldn't load an arcore library. Mostly likely you just need to enable 64 bit builds in Unity.
     
    JasonDaze likes this.
  14. Nyanpas

    Nyanpas

    Joined:
    Dec 29, 2016
    Posts:
    406
    I tried that but it still isn't working. It also crashes/hangs before it starts building if I try a development build (it seems the only logging happening so far is the Unity Editor telling the build has failed)... I am on 2020.1.13f or so it seems.
     
    Last edited: Nov 15, 2020
  15. tdmowrer

    tdmowrer

    Unity Technologies

    Joined:
    Apr 21, 2017
    Posts:
    605
    By "it" do you mean the Editor crashes? If so, have you used the crash reporter to report the crash?

    2020.1.14f has not been released. Could you confirm which Unity version you are using?
     
  16. Nyanpas

    Nyanpas

    Joined:
    Dec 29, 2016
    Posts:
    406
    I mistyped, it was meant to be 13f. The editor does not crash but the build process does (it stops responding). I am in a bit of a hurry to get this to work so reporting a crash and waiting for it to be addressed is not a luxury I have. Should I try an older version of Unity/ARCore instead?
     
  17. tdmowrer

    tdmowrer

    Unity Technologies

    Joined:
    Apr 21, 2017
    Posts:
    605
    You mean the Editor freezes/hangs during build? Or does the build fail with some exception message?

    If it is a hang, that doesn't sound like a problem with ARFoundation itself -- I'm not aware of any issue in ARFoundation past or present that has caused that. We'd really need to take a look at your project to diagnose any further. Logging a bug and posting the case ID here is your best bet if you would like us to look into it for you.
     
  18. Nyanpas

    Nyanpas

    Joined:
    Dec 29, 2016
    Posts:
    406
    Here is the project:
    https://developers.google.com/ar/develop/unity/tutorials/hello-ar-sample

    If I don't build in developer mode it will crash the moment after it deploys on the phone or after it starts up after install. If I build with developer options it will hang before completion and I have to restart Unity. I have not had time to go further with this due to lack of time as I have other parts of the project to focus on for now.
     
  19. tdmowrer

    tdmowrer

    Unity Technologies

    Joined:
    Apr 21, 2017
    Posts:
    605
    It looks like you are trying to use Google's ARCore SDK for Unity (not ARFoundation). Google maintains this plugin independently. You might try searching or posting on their GitHub issues page.
     
  20. zicas2000

    zicas2000

    Joined:
    Feb 11, 2018
    Posts:
    2
    I have tried to enable 64 bit builds in Unity ,but app keeps showing black screen after launching and accepting camera permissions ,I have followed the instructions in this page https://developers.google.com/ar/develop/unity/android-11-build
    but i still have the issue -which it might be caused by Google AR service update- can't confirm that and for clarification :
    1- unity version : 2019.4.15
    2- latest ARFoundation,ArCore packages
    NEED HELP URGENT
     
    Nyanpas likes this.
  21. tdmowrer

    tdmowrer

    Unity Technologies

    Joined:
    Apr 21, 2017
    Posts:
    605
    There is not enough information here for me to diagnose the problem. Please report a bug.
     
Thread Status:
Not open for further replies.