Unity-Technologies / arfoundation-samples

Example content for Unity projects based on AR Foundation
Other
3.07k stars 1.15k forks source link

App crash in libarcore on startup (Pixel 2) using SampleLWRPScene #125

Closed HalestormAI closed 4 years ago

HalestormAI commented 5 years ago

This is a bit of an odd one, only happening on a Pixel 2, and even then not on all Pixel 2's we have for development.

Using Unity 2019.1.2f, AR Foundation 2.1 (preview 2), ARSubsystems 2.1 (preview 1), ARCore XR 2.1 (preview 4), and the LWRP (5.6.1). I've made sure the latest version of ARCore is installed on the device and I've manually set all the permissions so the app has permission to use the camera. Even if I don't, the app correctly asks for the camera permission before crashing.

This test app is built as a dev build. It has one scene - SampleLWRPScene, and as soon as it loads, we get the following crash outlined in the stacktrace at the bottom of this post.

Unfortunately, by the time all the assemblies were loaded (even with "wait for managed debugger" enabled), the app crashed before I could breakpoint it.

However, we have a separate app using the same packages which also shows this problem nd has a longer load time! I've put a breakpoint in that at ARCoreSessionSubsytem.Update(...), and the crash occurs on the very first call to that method - method call arguments parameters below:

Screenshot 2019-05-21 at 09 35 05

To add to the weirdness, when I re-installed ARCore, the app worked, once. Then never again.

05-21 09:49:46.825 27072 27089 I Unity   : UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
05-21 09:49:46.825 27072 27089 I Unity   : UnityEngine.Logger:Log(LogType, Object)
05-21 09:49:46.825 27072 27089 I Unity   : UnityEngine.Debug:Log(Object)
05-21 09:49:46.825 27072 27089 I Unity   : UnityEngine.XR.ARCore.ARCoreImageTrackingProvider:RegisterDescriptor() (at /Users/myname/repo/arfoundation-samples/Library/PackageCache/com.unity.xr.arcore@2.1.0-preview.4/Runtime/ARCoreImageTrackingProvider.cs:140)
05-21 09:49:46.825 27072 27089 I Unity   :
05-21 09:49:46.825 27072 27089 I Unity   : (Filename: /Users/myname/repo/arfoundation-samples/Library/PackageCache/com.unity.xr.arcore@2.1.0-preview.4/Runtime/ARCoreImageTrackingProvider.cs Line: 140)
05-21 09:49:46.825 27072 27089 I Unity   :
05-21 09:49:46.947 27072 27089 I Unity   : Creating material for shader 'Unlit/ARCoreBackgroundLWRP'
05-21 09:49:46.947 27072 27089 I Unity   : UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
05-21 09:49:46.947 27072 27089 I Unity   : UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
05-21 09:49:46.947 27072 27089 I Unity   : UnityEngine.Logger:LogFormat(LogType, String, Object[])
05-21 09:49:46.947 27072 27089 I Unity   : UnityEngine.Debug:LogFormat(String, Object[])
05-21 09:49:46.947 27072 27089 I Unity   : UnityEngine.XR.ARFoundation.LWRPBackgroundRendererAsset:CreateCustomMaterial() (at /Users/myname/repo/arfoundation-samples/Assets/LWRPSupport/LWRPBackgroundRendererAsset.cs:51)
05-21 09:49:46.947 27072 27089 I Unity   : UnityEngine.XR.ARFoundation.ARCameraBackground:get_lwrpMaterial() (at /Users/myname/repo/arfoundation-samples/Library/PackageCache/com.unity.xr.arfoundation@2.1.0-preview.2/Runtime/AR/ARCameraBackground.cs:251)
05-21 09:49:46.947 27072 27089 I Unity   : UnityEngine.XR.ARFoundation.ARCameraBackground:UpdateMaterial() (at /Users/myname/repo/arfoundation-samples/Library/PackageCache/com.unity.xr.arfoundation@2.1.0-preview.2/Runtime/AR/ARCameraBackground.cs:213)
05-21 09:49:46.947 27072 27089 I Unity   : UnityEngine.XR.ARFoundation.ARCameraBackground:OnEnable() (at /Users/myname/repo/arfoundation-samples/Librar
05-21 09:49:46.985 27072 27089 D Unity   : Sensor :        Accelerometer ( 1) ; 0.002396 / 0.00s ; LSM6DSM Accelerometer / STMicroelectronics
05-21 09:49:46.990 27072 27089 D Unity   : Choreographer available: Enabling VSYNC timing
05-21 09:49:46.996 27072 27089 D Unity   : PlayerConnection accepted from [192.168.5.93] handle:0x51
05-21 09:49:47.373 27072 27089 I third_party/arcore/ar/core/android/sdk/session_create.cc: Entering ArSession_createWithFeatures
05-21 09:49:47.377 27072 27089 I third_party/arcore/ar/core/android/sdk/session_create.cc: ARCore Version: APK version code: 190422066
05-21 09:49:47.377 27072 27089 I third_party/arcore/ar/core/android/sdk/session_create.cc: ARCore Version: SDK build name: 1.7
05-21 09:49:47.397 27072 27089 I native  : version_check.cc:23 ARCore Version: APK version:1.9.190422066
05-21 09:49:47.397 27072 27089 I native  : version_check.cc:24 ARCore Version: emulated SDK version:1.7.190120000
05-21 09:49:47.397 27072 27089 I third_party/arcore/ar/core/android/sdk/session_create.cc: Dynamite load ok.
05-21 09:49:47.397 27072 27089 I third_party/arcore/java/com/google/vr/dynamite/client/native/dynamite_client.cc: Attempting to load native library arcore_c from package com.google.ar.core
05-21 09:49:47.414 27072 27089 I third_party/arcore/java/com/google/vr/dynamite/client/native/dynamite_client.cc: Dynamite::LoadNativeRemoteLibrary handle=801145908
05-21 09:49:47.415 27072 27089 I native  : session_create_implementation.cc:64 Entering createImplementationWithFeaturesAndSettings. ARCore SDK version: [1.7.190120000].
05-21 09:49:47.445 27072 27089 I native  : online_calibration_manager.cc:51 OnlineCalibrationManager: Could not open /data/user/0/com.unity.arfoundation.samples/cache/arcore-online-recalibration for reading.
05-21 09:49:47.469 27072 27089 F ndation.sample: java_vm_ext.cc:542]     from boolean com.unity3d.player.UnityPlayer.nativeRender()
05-21 09:49:47.469 27072 27089 F ndation.sample: java_vm_ext.cc:542] "UnityMain" prio=5 tid=14 Runnable
05-21 09:49:47.469 27072 27089 F ndation.sample: java_vm_ext.cc:542]   native: #09 pc 0009a901  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so (???)
05-21 09:49:47.469 27072 27089 F ndation.sample: java_vm_ext.cc:542]   native: #10 pc 00c9e467  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so (???)
05-21 09:49:47.469 27072 27089 F ndation.sample: java_vm_ext.cc:542]   native: #11 pc 00c9e23d  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so (???)
05-21 09:49:47.469 27072 27089 F ndation.sample: java_vm_ext.cc:542]   native: #12 pc 00c9c0f5  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so (???)
05-21 09:49:47.469 27072 27089 F ndation.sample: java_vm_ext.cc:542]   native: #13 pc 000d8387  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so (???)
05-21 09:49:47.469 27072 27089 F ndation.sample: java_vm_ext.cc:542]   native: #14 pc 00096adb  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so (???)
05-21 09:49:47.469 27072 27089 F ndation.sample: java_vm_ext.cc:542]   native: #15 pc 0009624b  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so (???)
05-21 09:49:47.469 27072 27089 F ndation.sample: java_vm_ext.cc:542]   native: #16 pc 00099441  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so (???)
05-21 09:49:47.469 27072 27089 F ndation.sample: java_vm_ext.cc:542]   native: #17 pc 00090cc5  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so (???)
05-21 09:49:47.469 27072 27089 F ndation.sample: java_vm_ext.cc:542]   native: #18 pc 00091341  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so (ArSession_createWithFeaturesImplementation+20)
05-21 09:49:47.469 27072 27089 F ndation.sample: java_vm_ext.cc:542]   native: #19 pc 00003149  /data/app/com.unity.arfoundation.samples-0BXIUtuH1D2nyZ32nn2cUA==/lib/arm/libarcore_sdk_c.so (ArSession_createWithFeatures+76)
05-21 09:49:47.469 27072 27089 F ndation.sample: java_vm_ext.cc:542]   native: #20 pc 000086c5  /data/app/com.unity.arfoundation.samples-0BXIUtuH1D2nyZ32nn2cUA==/lib/arm/libarpresto_api.so (???)
05-21 09:49:47.469 27072 27089 F ndation.sample: java_vm_ext.cc:542]   native: #21 pc 0000809b  /data/app/com.unity.arfoundation.samples-0BXIUtuH1D2nyZ32nn2cUA==/lib/arm/libarpresto_api.so (???)
05-21 09:49:47.469 27072 27089 F ndation.sample: java_vm_ext.cc:542]   native: #22 pc 0000800d  /data/app/com.unity.arfoundation.samples-0BXIUtuH1D2nyZ32nn2cUA==/lib/arm/libarpresto_api.so (???)
05-21 09:49:47.469 27072 27089 F ndation.sample: java_vm_ext.cc:542]   native: #23 pc 0000722d  /data/app/com.unity.arfoundation.samples-0BXIUtuH1D2nyZ32nn2cUA==/lib/arm/libarpresto_api.so (ArPresto_update+20)
05-21 09:49:47.469 27072 27089 F ndation.sample: java_vm_ext.cc:542]   native: #24 pc 00023478  /data/app/com.unity.arfoundation.samples-0BXIUtuH1D2nyZ32nn2cUA==/lib/arm/libUnityARCore.so (UnityARCore_session_update+352)
05-21 09:49:47.469 27072 27089 F ndation.sample: java_vm_ext.cc:542]   at com.unity3d.player.UnityPlayer.nativeRender(Native method)
05-21 09:49:47.469 27072 27089 F ndation.sample: java_vm_ext.cc:542]   at com.unity3d.player.UnityPlayer.c(unavailable:-1)
05-21 09:49:47.469 27072 27089 F ndation.sample: java_vm_ext.cc:542]   at com.unity3d.player.UnityPlayer$e$1.handleMessage(unavailable:-1)
05-21 09:49:47.469 27072 27089 F ndation.sample: java_vm_ext.cc:542]   at com.unity3d.player.UnityPlayer$e.run(unavailable:-1)
05-21 09:49:47.536 27072 27089 F ndation.sample: runtime.cc:558] "UnityMain" prio=5 tid=14 Runnable
05-21 09:49:47.536 27072 27089 F ndation.sample: runtime.cc:558]   native: #14 pc 0009a901  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so (???)
05-21 09:49:47.536 27072 27089 F ndation.sample: runtime.cc:558]   native: #15 pc 00c9e467  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so (???)
05-21 09:49:47.536 27072 27089 F ndation.sample: runtime.cc:558]   native: #16 pc 00c9e23d  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so (???)
05-21 09:49:47.536 27072 27089 F ndation.sample: runtime.cc:558]   native: #17 pc 00c9c0f5  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so (???)
05-21 09:49:47.536 27072 27089 F ndation.sample: runtime.cc:558]   native: #18 pc 000d8387  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so (???)
05-21 09:49:47.536 27072 27089 F ndation.sample: runtime.cc:558]   native: #19 pc 00096adb  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so (???)
05-21 09:49:47.537 27072 27089 F ndation.sample: runtime.cc:558]   native: #20 pc 0009624b  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so (???)
05-21 09:49:47.537 27072 27089 F ndation.sample: runtime.cc:558]   native: #21 pc 00099441  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so (???)
05-21 09:49:47.537 27072 27089 F ndation.sample: runtime.cc:558]   native: #22 pc 00090cc5  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so (???)
05-21 09:49:47.537 27072 27089 F ndation.sample: runtime.cc:558]   native: #23 pc 00091341  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so (ArSession_createWithFeaturesImplementation+20)
05-21 09:49:47.537 27072 27089 F ndation.sample: runtime.cc:558]   native: #24 pc 00003149  /data/app/com.unity.arfoundation.samples-0BXIUtuH1D2nyZ32nn2cUA==/lib/arm/libarcore_sdk_c.so (ArSession_createWithFeatures+76)
05-21 09:49:47.537 27072 27089 F ndation.sample: runtime.cc:558]   native: #25 pc 000086c5  /data/app/com.unity.arfoundation.samples-0BXIUtuH1D2nyZ32nn2cUA==/lib/arm/libarpresto_api.so (???)
05-21 09:49:47.537 27072 27089 F ndation.sample: runtime.cc:558]   native: #26 pc 0000809b  /data/app/com.unity.arfoundation.samples-0BXIUtuH1D2nyZ32nn2cUA==/lib/arm/libarpresto_api.so (???)
05-21 09:49:47.537 27072 27089 F ndation.sample: runtime.cc:558]   native: #27 pc 0000800d  /data/app/com.unity.arfoundation.samples-0BXIUtuH1D2nyZ32nn2cUA==/lib/arm/libarpresto_api.so (???)
05-21 09:49:47.537 27072 27089 F ndation.sample: runtime.cc:558]   native: #28 pc 0000722d  /data/app/com.unity.arfoundation.samples-0BXIUtuH1D2nyZ32nn2cUA==/lib/arm/libarpresto_api.so (ArPresto_update+20)
05-21 09:49:47.537 27072 27089 F ndation.sample: runtime.cc:558]   native: #29 pc 00023478  /data/app/com.unity.arfoundation.samples-0BXIUtuH1D2nyZ32nn2cUA==/lib/arm/libUnityARCore.so (UnityARCore_session_update+352)
05-21 09:49:47.537 27072 27089 F ndation.sample: runtime.cc:558]   at com.unity3d.player.UnityPlayer.nativeRender(Native method)
05-21 09:49:47.537 27072 27089 F ndation.sample: runtime.cc:558]   at com.unity3d.player.UnityPlayer.c(unavailable:-1)
05-21 09:49:47.537 27072 27089 F ndation.sample: runtime.cc:558]   at com.unity3d.player.UnityPlayer$e$1.handleMessage(unavailable:-1)
05-21 09:49:47.537 27072 27089 F ndation.sample: runtime.cc:558]   at com.unity3d.player.UnityPlayer$e.run(unavailable:-1)
05-21 09:49:47.539 27072 27089 F ndation.sample: runtime.cc:566]   native: #15 pc 0009624b  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so (???)
05-21 09:49:47.539 27072 27089 F ndation.sample: runtime.cc:566]   native: #16 pc 00099441  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so (???)
05-21 09:49:47.539 27072 27089 F ndation.sample: runtime.cc:566]   native: #17 pc 00090cc5  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so (???)
05-21 09:49:47.540 27072 27089 F ndation.sample: runtime.cc:566]   native: #22 pc 0000800d  /data/app/com.unity.arfoundation.samples-0BXIUtuH1D2nyZ32nn2cUA==/lib/arm/libarpresto_api.so (???)
05-21 09:49:47.540 27072 27089 F ndation.sample: runtime.cc:566]   native: #23 pc 0000722d  /data/app/com.unity.arfoundation.samples-0BXIUtuH1D2nyZ32nn2cUA==/lib/arm/libarpresto_api.so (ArPresto_update+20)
05-21 09:49:47.540 27072 27089 F ndation.sample: runtime.cc:566]   at com.unity3d.player.UnityPlayer.nativeRender(Native method)
05-21 09:49:47.540 27072 27089 E CRASH   : pid: 27072, tid: 27089, name: UnityMain  >>> com.unity.arfoundation.samples <<<
05-21 09:49:47.680 27072 27089 E CRASH   :  #09  pc 0009a901  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so
05-21 09:49:47.680 27072 27089 E CRASH   :  #10  pc 00c9e467  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so
05-21 09:49:47.680 27072 27089 E CRASH   :  #11  pc 00c9e23d  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so
05-21 09:49:47.680 27072 27089 E CRASH   :  #12  pc 00c9c0f5  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so
05-21 09:49:47.680 27072 27089 E CRASH   :  #13  pc 000d8387  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so
05-21 09:49:47.680 27072 27089 E CRASH   :  #14  pc 00096adb  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so
05-21 09:49:47.680 27072 27089 E CRASH   :  #15  pc 0009624b  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so
05-21 09:49:47.680 27072 27089 E CRASH   :  #16  pc 00099441  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so
05-21 09:49:47.680 27072 27089 E CRASH   :  #17  pc 00090cc5  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so
05-21 09:49:47.680 27072 27089 E CRASH   :  #18  pc 00091341  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so (ArSession_createWithFeaturesImplementation+20)
05-21 09:49:47.680 27072 27089 E CRASH   :  #19  pc 00003149  /data/app/com.unity.arfoundation.samples-0BXIUtuH1D2nyZ32nn2cUA==/lib/arm/libarcore_sdk_c.so (ArSession_createWithFeatures+76)
05-21 09:49:47.680 27072 27089 E CRASH   :  #20  pc 000086c5  /data/app/com.unity.arfoundation.samples-0BXIUtuH1D2nyZ32nn2cUA==/lib/arm/libarpresto_api.so
05-21 09:49:47.680 27072 27089 E CRASH   :  #21  pc 0000809b  /data/app/com.unity.arfoundation.samples-0BXIUtuH1D2nyZ32nn2cUA==/lib/arm/libarpresto_api.so
05-21 09:49:47.680 27072 27089 E CRASH   :  #22  pc 0000800d  /data/app/com.unity.arfoundation.samples-0BXIUtuH1D2nyZ32nn2cUA==/lib/arm/libarpresto_api.so
05-21 09:49:47.680 27072 27089 E CRASH   :  #23  pc 0000722d  /data/app/com.unity.arfoundation.samples-0BXIUtuH1D2nyZ32nn2cUA==/lib/arm/libarpresto_api.so (ArPresto_update+20)
05-21 09:49:47.680 27072 27089 E CRASH   :  #24  pc 00023478  /data/app/com.unity.arfoundation.samples-0BXIUtuH1D2nyZ32nn2cUA==/lib/arm/libUnityARCore.so (UnityARCore_session_update+352)
05-21 09:49:47.680 27072 27089 E CRASH   :  #25  pc 0000f890   ( (wrapper managed-to-native) UnityEngine.XR.ARCore.ARCoreSessionSubsystem/NativeApi:UnityARCore_session_update (UnityEngine.ScreenOrientation,UnityEngine.Vector2Int) {0xc8994ff8} + 0x98 (0xdff017f8 0xdff018e8) [0xdce7ef00 - Unity Root Domain]+63632)
05-21 09:49:47.680 27072 27089 E CRASH   :  #26  il 00000043  at (wrapper managed-to-native) UnityEngine.XR.ARCore.ARCoreSessionSubsystem/NativeApi.UnityARCore_session_update (UnityEngine.ScreenOrientation,UnityEngine.Vector2Int) <0x00043>
05-21 09:49:47.680 27072 27089 E CRASH   :  #27  il 000000bf  at UnityEngine.XR.ARCore.ARCoreSessionSubsystem/Provider.Update (UnityEngine.XR.ARSubsystems.XRSessionUpdateParams) [0x00001] in /Users/myname/repo/arfoundation-samples/Library/PackageCache/com.unity.xr.arcore@2.1.0-preview.4/Runtime/ARCoreSessionSubsystem.cs:48
05-21 09:49:47.680 27072 27089 E CRASH   :  #28  il 000000af  at UnityEngine.XR.ARSubsystems.XRSessionSubsystem.Update (UnityEngine.XR.ARSubsystems.XRSessionUpdateParams) [0x00001] in /Users/myname/repo/arfoundation-samples/Library/PackageCache/com.unity.xr.arsubsystems@2.1.0-preview.1/Runtime/SessionSubsystem/XRSessionSubsystem.cs:127
05-21 09:49:47.680 27072 27089 E CRASH   :  #29  il 000002d7  at UnityEngine.XR.ARFoundation.ARSession.Update () [0x0001c] in /Users/myname/repo/arfoundation-samples/Library/PackageCache/com.unity.xr.arfoundation@2.1.0-preview.2/Runtime/AR/ARSession.cs:265
05-21 09:49:47.681 27072 27089 F libc    : Fatal signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xdce7ef00 in tid 27089 (UnityMain), pid 27072 (ndation.samples)
05-21 09:49:44.089 27072 27089 I chatty  : uid=10252(com.unity.arfoundation.samples) UnityMain identical 15 lines
05-21 09:49:47.735 27142 27142 F DEBUG   : pid: 27072, tid: 27089, name: UnityMain  >>> com.unity.arfoundation.samples <<<
05-21 09:49:47.756 27142 27142 F DEBUG   :     #01 pc 0018b818  /data/app/com.unity.arfoundation.samples-0BXIUtuH1D2nyZ32nn2cUA==/lib/arm/libmonobdwgc-2.0.so (mono_walk_stack_full+1544)
05-21 09:49:47.756 27142 27142 F DEBUG   :     #02 pc 001894b8  /data/app/com.unity.arfoundation.samples-0BXIUtuH1D2nyZ32nn2cUA==/lib/arm/libmonobdwgc-2.0.so (mono_walk_stack_with_state+308)
05-21 09:49:47.756 27142 27142 F DEBUG   :     #03 pc 0018ba20  /data/app/com.unity.arfoundation.samples-0BXIUtuH1D2nyZ32nn2cUA==/lib/arm/libmonobdwgc-2.0.so (mono_walk_stack+64)
05-21 09:49:47.756 27142 27142 F DEBUG   :     #04 pc 00cf6588  /data/app/com.unity.arfoundation.samples-0BXIUtuH1D2nyZ32nn2cUA==/lib/arm/libunity.so (NativeRuntimeException::signal_handler(int, siginfo*, void*)+520)
05-21 09:49:47.756 27142 27142 F DEBUG   :     #05 pc 0025d7c8  /data/app/com.unity.arfoundation.samples-0BXIUtuH1D2nyZ32nn2cUA==/lib/arm/libmonobdwgc-2.0.so (mono_chain_signal+180)
05-21 09:49:47.756 27142 27142 F DEBUG   :     #06 pc 0025d924  /data/app/com.unity.arfoundation.samples-0BXIUtuH1D2nyZ32nn2cUA==/lib/arm/libmonobdwgc-2.0.so (__krait_sigabrt_signal_handler+148)
05-21 09:49:47.756 27142 27142 F DEBUG   :     #17 pc 0009a901  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so
05-21 09:49:47.756 27142 27142 F DEBUG   :     #18 pc 00c9e467  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so
05-21 09:49:47.756 27142 27142 F DEBUG   :     #19 pc 00c9e23d  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so
05-21 09:49:47.756 27142 27142 F DEBUG   :     #20 pc 00c9c0f5  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so
05-21 09:49:47.756 27142 27142 F DEBUG   :     #21 pc 000d8387  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so
05-21 09:49:47.756 27142 27142 F DEBUG   :     #22 pc 00096adb  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so
05-21 09:49:47.756 27142 27142 F DEBUG   :     #23 pc 0009624b  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so
05-21 09:49:47.756 27142 27142 F DEBUG   :     #24 pc 00099441  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so
05-21 09:49:47.756 27142 27142 F DEBUG   :     #25 pc 00090cc5  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so
05-21 09:49:47.756 27142 27142 F DEBUG   :     #26 pc 00091341  /data/app/com.google.ar.core-XGquDII0i700YnZZSerj9w==/lib/arm/libarcore_c.so (ArSession_createWithFeaturesImplementation+20)
05-21 09:49:47.756 27142 27142 F DEBUG   :     #27 pc 00003149  /data/app/com.unity.arfoundation.samples-0BXIUtuH1D2nyZ32nn2cUA==/lib/arm/libarcore_sdk_c.so (ArSession_createWithFeatures+76)
05-21 09:49:47.756 27142 27142 F DEBUG   :     #28 pc 000086c5  /data/app/com.unity.arfoundation.samples-0BXIUtuH1D2nyZ32nn2cUA==/lib/arm/libarpresto_api.so
05-21 09:49:47.756 27142 27142 F DEBUG   :     #29 pc 0000809b  /data/app/com.unity.arfoundation.samples-0BXIUtuH1D2nyZ32nn2cUA==/lib/arm/libarpresto_api.so
05-21 09:49:47.756 27142 27142 F DEBUG   :     #30 pc 0000800d  /data/app/com.unity.arfoundation.samples-0BXIUtuH1D2nyZ32nn2cUA==/lib/arm/libarpresto_api.so
05-21 09:49:47.756 27142 27142 F DEBUG   :     #31 pc 0000722d  /data/app/com.unity.arfoundation.samples-0BXIUtuH1D2nyZ32nn2cUA==/lib/arm/libarpresto_api.so (ArPresto_update+20)
05-21 09:49:47.756 27142 27142 F DEBUG   :     #32 pc 00023478  /data/app/com.unity.arfoundation.samples-0BXIUtuH1D2nyZ32nn2cUA==/lib/arm/libUnityARCore.so (UnityARCore_session_update+352)
05-21 09:49:48.017  1371 27145 W ActivityManager:   Force finishing activity com.unity.arfoundation.samples/com.unity3d.player.UnityPlayerActivity
05-21 09:49:48.092  1371  2526 W InputDispatcher: channel '9a51b27 com.unity.arfoundation.samples/com.unity3d.player.UnityPlayerActivity (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
05-21 09:49:48.092  1371  2526 E InputDispatcher: channel '9a51b27 com.unity.arfoundation.samples/com.unity3d.player.UnityPlayerActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
05-21 09:49:48.093  1371  7672 I WindowManager: WIN DEATH: Window{9a51b27 u0 com.unity.arfoundation.samples/com.unity3d.player.UnityPlayerActivity}
05-21 09:49:48.093  1371  7672 W InputDispatcher: Attempted to unregister already unregistered input channel '9a51b27 com.unity.arfoundation.samples/com.unity3d.player.UnityPlayerActivity (server)'
05-21 09:49:48.093  1371  3018 I ActivityManager: Process com.unity.arfoundation.samples (pid 27072) has died: vis  +99TOP
05-21 09:49:48.096   608   726 W SurfaceFlinger: Attempting to set client state on removed layer: com.unity.arfoundation.samples/com.unity3d.player.UnityPlayerActivity#0

Update: Tested on a Pixel 2 running Android 9 and saw the crash. Pixel 2 XL on 8.1, also observed the crash. Pixel 2 XL on 9, no crash.

tdmowrer commented 5 years ago

We'll have to look into it, but one thing that stands out to me is this message:

version_check.cc:23 ARCore Version: APK version:1.9.190422066
version_check.cc:24 ARCore Version: emulated SDK version:1.7.190120000

That might explain why it happens on some devices but not others. What version of ARCore is your "Pixel 2 XL on 9" running?

Berenice2018 commented 5 years ago

Hello,

I have a similar issue, on a Pixel 2, Android 8.1.0. Using Unity 2019.1.4 AR Foundation 2.1 (preview 2) ARSubsystems 2.1 (preview 1) ARCore XR 2.1 (preview 4) ARCore version : 1.9.190422066 of May 20th.

I migrated a project from ARFoundation 1 to AR Foundation 2.1. In my project as well as in the Unity samples, the ARscene will only start once. After closing the app, I have to re-install ARCore to get the AR scene running again.

I think I would rather re-migrate to ARFoundation 1.

Berenice2018 commented 5 years ago

PS: I tried 2 of my older (already published) ARFoundation 1.0 app projects. The ARcamera does not start on the Pixel2 either. We have to re-install ARCore, then the AR scene works for one time.

This issue seems to be related to ARCore's latest version ARCore version : 1.9.190422066 of May 20th. Now, after installing an older ARCore version: 1.8.190311106 project 1 and 2 work without any problems.

I had used: Pixel 2, Android 8.1.0. in project 1:

    "com.unity.xr.arcore": "1.0.0-preview.23",
    "com.unity.xr.arfoundation": "1.0.0-preview.20",
    "com.unity.xr.arkit": "1.0.0-preview.17",

and in the older project 2:

    "com.unity.xr.arcore": "1.0.0-preview.19",
    "com.unity.xr.arfoundation": "1.0.0-preview.18",
    "com.unity.xr.arkit": "1.0.0-preview.15",
tdmowrer commented 5 years ago

Hi folks,

I tested ARCore 1.9.190422066 on a Pixel 1 (Android 9) without issue.

In my project as well as in the Unity samples, the ARscene will only start once.

Which scene?

Berenice2018 commented 5 years ago

Hi @tdmowrer, I tried the scene "simple AR" and "ARWorldMap": I attach the logcats. Pixel2-crash-simpleAR.txt

Pixel2-crash-ARWorldMap.txt

Second issue in the scene "ARWorldMap": After un-and reinstalling ARCore 1.9, the scene would work once. However, if I click on the upper right button "Restart AR session", the camera freezes/ stops working. Logcat: Pixel2-ARWorldMap-ResetSession.txt

If you need logcats of all sample scenes, just let me know.

Berenice2018 commented 5 years ago

@tdmowrer I have just found the following thread: https://github.com/google-ar/arcore-android-sdk/issues/789#issue-446349867 and see the comment concerning a production release build https://github.com/google-ar/arcore-android-sdk/issues/789#issuecomment-496113655

TheMunro commented 5 years ago

@tdmowrer I've seen the same issue today on my own Pixel 2 XL. I work with @InhaleExhale, but the issue had not yet appeared on my device, only on our test devices. The issue has now been seen on all of the Pixel devices we have in the office. I was creating builds for this phone earlier today without issue. I changed one line of code in our project, rebuilt, and then the issue presented itself. This is within our own project, not in a test scene.

crashlog.txt

Unity 2019.1.2f1 AR Foundation 2.1 (preview 2) ARSubsystems 2.1 (preview 1) ARCore XR 2.1 (preview 4) ARCore version : 1.9.190422066 Android Build: PQ3A.190505.001 (5th May 2019)

TheMunro commented 5 years ago

@tdmowrer after a little more testing, it seems that once the issue presents itself a restart temporarily fixes the issue for a single build. However, as soon as a new build is pushed to the device, the issue returns and the device requires a reboot to avoid the crash.

Berenice2018 commented 5 years ago

Hi @TheMunro, As described in the links above, the issue occurs in native apps, too. Does it crash, if you build in release mode? It only seems to crash in debug mode, then we have to un- and re-install ARCore. With an older ARCore version, the crash does not happen so far. https://github.com/Unity-Technologies/arfoundation-samples/issues/125?_pjax=%23js-repo-pjax-container#issuecomment-496296012

EDIT: Google will release a fix in a few hours: https://github.com/google-ar/arcore-android-sdk/issues/789#issuecomment-496661549

tdmowrer commented 5 years ago

@TheMunro you mentioned

The issue has now been seen on all of the Pixel devices we have in the office.

The fix mentioned above is only for the Pixel 2 and Pixel 2 XL. Have you seen the crash on any other devices?

silverua commented 5 years ago

Currently getting the same error(UnityARCore_session_update, line 352) with these same exact symptoms on a Xiaomi Redmi Note 4x that runs Android 7. Tried the latest ARCore version, all the earlier ones that were mentioned in this thread, but it still persists. Have not discovered a solution for this so far.

tdmowrer commented 5 years ago

Currently getting the same error(UnityARCore_session_update, line 352) with these same exact symptoms on a Xiaomi Redmi Note 4x that runs Android 7. Tried the latest ARCore version, all the earlier ones that were mentioned in this thread, but it still persists. Have not discovered a solution for this so far.

Have you tried ARFoundation 3.0? ARFoundation 3.0 provides much improved support for LWRP/Universal RP. Step-by-step instructions can be found here.