Search Unity

All AR apps crash on allow camera access

Discussion in 'AR/VR (XR) Discussion' started by NachoPepe, Aug 12, 2020.

  1. NachoPepe

    NachoPepe

    Joined:
    Oct 13, 2019
    Posts:
    5
    At first I thought the error was with the project I was building in Unity, the option Google > Build and Run in Unity would successfully build the application but as soon as I allowed camera access the application would crash, then crash again on startup every single time.

    After hours and tens of question pages I tried to download a different AR Core application from the google play store, turns out a lot of them are made with Unity and they are ALL crashing on startup, after I allow camera access.

    Why is this especially weird? I got my new phone on purpose so I could start developing in AR, my old phone was Android 7 and so this is a brand new phone, new install, factory settings, I've installed and reinstalled Google services for AR, I have rebooted countless times, all AR apps keep crashing as soon as I give access to the camera

    What is also weird it's the same error for all the other AR apps, except the one I built gives an entirely different one, I will attatch the files with all the errors reported on crash.

    Any ideas are appreciated, but it would help if someone familiar with the API and these kind of errors would take a look at them to explain what the hell is going on. Thanks in advance.

    Here are the errors (from a game called MoleCatch ar, another game called Beer Pong AR and finally my own project) :

    Error 1:
    java.lang.Error: FATAL EXCEPTION [UnityMain]
    Unity version : 2017.3.0p4
    Device model : Xiaomi M2002J9G
    Device fingerprint: Xiaomi/monet_eea/monet:10/QKQ1.191222.002/V11.0.1.0.QJIEUOR:user/release-keys

    Caused by: java.lang.Error: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000028
    Build fingerprint: 'Xiaomi/monet_eea/monet:10/QKQ1.191222.002/V11.0.1.0.QJIEUOR:user/release-keys'
    Revision: '0'
    pid: 23238, tid: 23263, name: UnityMain >>> com.BGame.MoleCatchAR <<<
    r0 00000000 r1 00000000 r2 00000000 r3 00000001
    r4 00000000 r5 00000000 r6 00000000 r7 00000001
    r8 00000000 r9 ccd53400 sl 14ec09d8 fp 14ecb178
    ip b999af9c sp bae81c68 lr b9a4022b pc b9a4022a cpsr e367fd10

    at libarcore_sdk.ArConfig_setUpdateMode(ArConfig_setUpdateMode:11)
    at libarpresto_api.ArPresto::SessionManager::SetConfiguration(ArPrestoConfig)(SessionManager:16)
    at libarpresto_api.ArPresto::Context::CreateSessionIfNeeded()(Context:66)
    at libarpresto_api.ArPresto::Context::Update()(Context:12)
    at libarpresto_api.ArPresto_update(ArPresto_update:36)
    at libarcore_unity_api.ArCoreUnity_onUnityEarlyUpdate(ArCoreUnity_onUnityEarlyUpdate:2)
    at libunity.0076170c(Native Method)
    at libunity.002da174(Native Method)
    at libunity.004e43d0(Native Method)
    at libunity.004e773c(Native Method)
    at base.0000277b(Native Method)



    Error 2:

    java.lang.Error: FATAL EXCEPTION [UnityMain]
    Unity version : 2017.3.0f2
    Device model : Xiaomi M2002J9G
    Device fingerprint: Xiaomi/monet_eea/monet:10/QKQ1.191222.002/V11.0.1.0.QJIEUOR:user/release-keys

    Caused by: java.lang.Error: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000028
    Build fingerprint: 'Xiaomi/monet_eea/monet:10/QKQ1.191222.002/V11.0.1.0.QJIEUOR:user/release-keys'
    Revision: '0'
    pid: 22825, tid: 22848, name: UnityMain >>> com.ezone.beerar <<<
    r0 00000000 r1 00000000 r2 00000000 r3 00000001
    r4 00000000 r5 00000000 r6 00000000 r7 1498a4a0
    r8 00000000 r9 ccd53400 sl bb37f3e8 fp bb37f36c
    ip b7d39f9c sp bb37f208 lr b7d6e22b pc b7d6e22a cpsr e3638d10

    at libarcore_sdk.ArConfig_setUpdateMode(ArConfig_setUpdateMode:11)
    at libarpresto_api.ArPresto::SessionManager::SetConfiguration(ArPrestoConfig)(SessionManager:16)
    at libarpresto_api.ArPresto::Context::CreateSessionIfNeeded()(Context:66)
    at libarpresto_api.ArPresto::Context::Update()(Context:12)
    at libarpresto_api.ArPresto_update(ArPresto_update:36)
    at libarcore_unity_api.ArCoreUnity_onUnityEarlyUpdate(ArCoreUnity_onUnityEarlyUpdate:2)
    at libunity.00761b7c(Native Method)
    at libunity.002da024(Native Method)
    at libunity.004e4460(Native Method)
    at libunity.004e77cc(Native Method)
    at base.00001e23(Native Method)



    Error 3:

    java.lang.Error: FATAL EXCEPTION [UnityMain]
    Unity version : 2019.4.5f1
    Device model : Xiaomi M2002J9G
    Device fingerprint: Xiaomi/monet_eea/monet:10/QKQ1.191222.002/V11.0.1.0.QJIEUOR:user/release-keys

    Caused by: java.lang.Error: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    Version '2019.4.5f1 (81610f64359c)', Build type 'Release', Scripting Backend 'mono', CPU 'armeabi-v7a'
    Build fingerprint: 'Xiaomi/monet_eea/monet:10/QKQ1.191222.002/V11.0.1.0.QJIEUOR:user/release-keys'
    Revision: '0'
    ABI: 'arm'
    Timestamp: 2020-08-12 04:46:37+0200
    pid: 4991, tid: 5020, name: UnityMain >>> uk.ac.salford.team <<<
    uid: 10254
    signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
    Cause: null pointer dereference
    r0 00650070 r1 00730069 r2 00000000 r3 00000000
    r4 b7d09a10 r5 bfe350a0 r6 b7d09a10 r7 00000000
    r8 bb4c5230 r9 80808080 r10 00000000 r11 00000000
    ip bb4ce890 sp c3f8a998 lr bb48fca7 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/Provider:Update (UnityEngine.XR.ARSubsystems.XRSessionUpdateParams) <0x43>
    #02 UnityEngine.XR.ARSubsystems.XRSessionSubsystem:Update (UnityEngine.XR.ARSubsystems.XRSessionUpdateParams) <0x3f>
    #03 UnityEngine.XR.ARFoundation.ARSession:Update () <0xf3>
    #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.Provider.Update (UnityEngine.XR.ARSubsystems.XRSessionUpdateParams)(0x43:67)
    at UnityEngine.XR.ARSubsystems.XRSessionSubsystem.Update (UnityEngine.XR.ARSubsystems.XRSessionUpdateParams)(0x3f:63)
    at UnityEngine.XR.ARFoundation.ARSession.Update ()(0xf3:243)
    at System.Object.runtime_invoke_void__this__ (object,intptr,intptr,intptr)(Native Method)
     

    Attached Files:

    Manhiem likes this.
  2. Manhiem

    Manhiem

    Joined:
    Jul 31, 2019
    Posts:
    4

    Its happening with mee tttoooooo bruh
     
  3. Manhiem

    Manhiem

    Joined:
    Jul 31, 2019
    Posts:
    4
    any solution???
     
  4. it_master

    it_master

    Joined:
    Jul 25, 2015
    Posts:
    13
    Same here man, anyone got a solution? (Though I must attest, I'm using EasyAR)
     
  5. minxcentrion

    minxcentrion

    Joined:
    Jul 23, 2013
    Posts:
    1
    hey, any update on this? its happened to me too
     
  6. NachoPepe

    NachoPepe

    Joined:
    Oct 13, 2019
    Posts:
    5
    @minxcentrion @it_master @Manhiem
    Yes, this is solved now.

    The error specifically was being caused by Google Play Services for AR reading my device blueprint (meaning my phone model - company and type) in my case a Xiaomi Mi Note 10 Lite.

    When developing an AR app in Unity you can make a check to see if the device is AR supported and all it does is check your device against this list.
    https://developers.google.com/ar/discover/supported-devices

    Was my Xiaomi phone AR ready? Yes
    Was it on the supported devices list? No

    If you attempt to start the "AR Session" without this check and the device is not on that list the app crashes, which is what was happening here.

    To be clear having or not having that check is not the problem, the problem was my device was not on that list.

    The Xiaomi Mi Note 10 and 10 lite are relatively new phones so I sent an email to Google, they replied saying updates would be coming soon adding more devices to the list after they were approved by their team and tested with. That is indeed what happened around September when Google Play Services for AR was updated and all of a sudden the same exact build worked as intended and didn't crash on startup along with all other AR apps.

    If you are having this problem, check the list, if your phone is relatively new be patient and wait for it to get on the list.

    If you know your phone is AR ready, but it has been a while since release and Google seems to have no plan to add it, there are workarounds to this "blueprint check" GSFAR is doing but they can void the guarantee of your phone and require god knowledge of phone OS software. Here's an article that might help you with that if you want to attempt it.
    https://arpost.co/2020/08/18/how-to-enable-arcore-on-any-android-device/

    Pretty lame of Google to not develop some sort of notification or easier way to debug this without a 20 page error message confusion.