google-ar / arcore-android-sdk

ARCore SDK for Android Studio
https://developers.google.com/ar
Other
4.97k stars 1.22k forks source link

Session(this) causing FatalException on Galaxy S10+ #1167

Open henrikyn opened 3 years ago

henrikyn commented 3 years ago

SPECIFIC ISSUE ENCOUNTERED

User has issues with initializing ARCore session using Samsung Galaxy S10+. Information is from Firebase Crashlytics. Crash stack-trace: Caused by com.google.ar.core.exceptions.FatalException at java.lang.reflect.Constructor.newInstance0(Constructor.java) at java.lang.reflect.Constructor.newInstance(Constructor.java:343) at com.google.ar.core.Session.throwExceptionFromArStatus(Session.java:16) at com.google.ar.core.Session.nativeCreateSessionAndWrapperWithFeatures(Session.java) at com.google.ar.core.Session.(Session.java:11) at com.google.ar.core.Session.(Session.java:4)

VERSIONS USED

STEPS TO REPRODUCE THE ISSUE

WORKAROUNDS (IF ANY)

ADDITIONAL COMMENTS

devbridie commented 3 years ago

Do you have a bit more of the stack trace? I think the actual reason should be below the snippet you listed.

henrikyn commented 3 years ago

Caused by com.google.ar.core.exceptions.FatalException at java.lang.reflect.Constructor.newInstance0(Constructor.java) at java.lang.reflect.Constructor.newInstance(Constructor.java:343) at com.google.ar.core.Session.throwExceptionFromArStatus(Session.java:16) at com.google.ar.core.Session.nativeCreateSessionAndWrapperWithFeatures(Session.java) at com.google.ar.core.Session.(Session.java:11) at com.google.ar.core.Session.(Session.java:4) at com.example.name.MyFragment.createSession(MyFragment.kt:595) at com.example.name.MyFragment.resume(MyFragment.kt:404) at com.example.name.MyActivity.onResume(MyActivity.kt:151) at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1412) at android.app.Activity.performResume(Activity.java:7558) at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3999) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4039) at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:51) at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1947) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7032) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:964)

henrikyn commented 3 years ago

Also got this another crash with FatalException reported to Firebase on Pixel 3 yesterday:

Caused by com.google.ar.core.exceptions.FatalException at java.lang.reflect.Constructor.newInstance0(Constructor.java) at java.lang.reflect.Constructor.newInstance(Constructor.java:343) at com.google.ar.core.Session.throwExceptionFromArStatus(Session.java:16) at com.google.ar.core.Session.nativeResume(Session.java) at com.google.ar.core.Session.resume(Session.java:1) at com.example.name.MyFragment.resume(MyFragment.kt:409) at com.example.name.MyActivity.onResume(MyActivity.kt:151) at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1456) at android.app.Activity.performResume(Activity.java:8135) at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4434) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4476) at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52) at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:223) at android.app.ActivityThread.main(ActivityThread.java:7656) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

This didn't crash at the createSession() (like the previous one) where the session is initialized but crashed at session.resume() which is called after it.

softlion commented 3 years ago

I have the same issue on Galaxy S20 Android 11 and also Pixel 3.
Happens in RELEASE MODE only. Debug mode works fine.

at com.google.ar.core.Session.nativeCreateSessionAndWrapperWithFeatures(Native method)
    runtime.cc:677]   at com.google.ar.core.Session.<init>(unavailable:-1)
    runtime.cc:677]   at com.google.ar.core.Session.<init>(unavailable:-1)
    runtime.cc:677]   at crc64a0e0a82d0db9a07d.ActivityLifecycleContextListener.n_onActivityResumed(Native method)
    runtime.cc:677]   at crc64a0e0a82d0db9a07d.ActivityLifecycleContextListener.onActivityResumed(unavailable:-1)
    runtime.cc:677]   at android.app.Application.dispatchActivityResumed(Application.java:455)
    runtime.cc:677]   at android.app.Activity.dispatchActivityResumed(Activity.java:1413)
    runtime.cc:677]   at android.app.Activity.onResume(Activity.java:1945)
    runtime.cc:677]   at androidx.fragment.app.FragmentActivity.onResume(unavailable:-1)
    runtime.cc:677]   at crc643f46942d9dd1fff9.FormsAppCompatActivity.n_onResume(Native method)
    runtime.cc:677]   at crc643f46942d9dd1fff9.FormsAppCompatActivity.onResume(unavailable:-1)
    runtime.cc:677]   at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1456)
    runtime.cc:677]   at android.app.Activity.performResume(Activity.java:8344)
    runtime.cc:677]   at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4854)
    runtime.cc:677]   at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4901)
    runtime.cc:677]   at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52)
    runtime.cc:677]   at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
    runtime.cc:677]   at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
    runtime.cc:677]   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2307)
    runtime.cc:677]   at android.os.Handler.dispatchMessage(Handler.java:106)
    runtime.cc:677]   at android.os.Looper.loop(Looper.java:246)
    runtime.cc:677]   at android.app.ActivityThread.main(ActivityThread.java:8512)
    runtime.cc:677]   at java.lang.reflect.Method.invoke(Native method)
    runtime.cc:677]   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
    runtime.cc:677]   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
    runtime.cc:677] 
2021-05-25 14:19:01.132 4481-4481/? A/vesol.woozoo: runtime.cc:685] JNI DETECTED ERROR IN APPLICATION: mid == null
    runtime.cc:685]     in call to CallStaticVoidMethodV
    runtime.cc:685]     from long com.google.ar.core.Session.nativeCreateSessionAndWrapperWithFeatures(android.content.Context, int[])
2021-05-25 14:19:01.313 1107-1653/? E/WindowManager: win=Window{ff7680 u0 com.google.android.permissioncontroller/com.android.permissioncontroller.permission.ui.GrantPermissionsActivity EXITING} destroySurfaces: appStopped=false win.mWindowRemovalAllowed=true win.mRemoveOnExit=true win.mViewVisibility=0 caller=com.android.server.wm.ActivityRecord.destroySurfaces:5246 com.android.server.wm.ActivityRecord.destroySurfaces:5227 com.android.server.wm.WindowState.onExitAnimationDone:5616 com.android.server.wm.WindowStateAnimator.onAnimationFinished:332 com.android.server.wm.WindowState.onAnimationFinished:6081 com.android.server.wm.-$$Lambda$dwJG8BAnLlvKNGuDY9U3-haNY4M.onAnimationFinished:2 com.android.server.wm.SurfaceAnimator.lambda$getFinishedCallback$0$SurfaceAnimator:112 
2021-05-25 14:19:01.381 4481-4481/? A/libc: Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 4481 (vesol.woodzoo), pid 4481 (vesol.woozoo)
2021-05-25 14:19:01.500 10741-10741/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2021-05-25 14:19:01.500 10741-10741/? A/DEBUG: Build fingerprint: 'samsung/r8qxeea/r8q:11/RP1A.200720.012/G781BXXU2CUD1:user/release-keys'
2021-05-25 14:19:01.500 10741-10741/? A/DEBUG: Revision: '6'
2021-05-25 14:19:01.500 10741-10741/? A/DEBUG: ABI: 'arm64'
2021-05-25 14:19:01.502 10741-10741/? A/DEBUG: Timestamp: 2021-05-25 14:19:01+0200
2021-05-25 14:19:01.502 10741-10741/? A/DEBUG: pid: 4481, tid: 4481, name: vesol.woozoo  >>> com.perceptivesol.woozoo <<<
2021-05-25 14:19:01.502 10741-10741/? A/DEBUG: uid: 10336
2021-05-25 14:19:01.502 10741-10741/? A/DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
2021-05-25 14:19:01.502 10741-10741/? A/DEBUG: Abort message: 'JNI DETECTED ERROR IN APPLICATION: mid == null
        in call to CallStaticVoidMethodV
        from long com.google.ar.core.Session.nativeCreateSessionAndWrapperWithFeatures(android.content.Context, int[])'
2021-05-25 14:19:01.502 10741-10741/? A/DEBUG:     x0  0000000000000000  x1  0000000000001181  x2  0000000000000006  x3  0000007fe4055c20
2021-05-25 14:19:01.502 10741-10741/? A/DEBUG:     x4  000000704a42a000  x5  000000704a42a000  x6  000000704a42a000  x7  000000000e5cc6c8
2021-05-25 14:19:01.502 10741-10741/? A/DEBUG:     x8  00000000000000f0  x9  2c245f019ccc6b3b  x10 0000000000000000  x11 ffffffc0fffffbdf
2021-05-25 14:19:01.502 10741-10741/? A/DEBUG:     x12 0000000000000001  x13 0000000060aceb35  x14 0000000000000000  x15 00002ff08ad506ca
2021-05-25 14:19:01.502 10741-10741/? A/DEBUG:     x16 0000007045057c80  x17 0000007045037600  x18 0000006d2f362358  x19 0000000000001181
2021-05-25 14:19:01.502 10741-10741/? A/DEBUG:     x20 0000000000001181  x21 00000000ffffffff  x22 0000000000000002  x23 0000000000000002
2021-05-25 14:19:01.502 10741-10741/? A/DEBUG:     x24 0000006db24106e5  x25 0000000000000001  x26 0000006db24278e1  x27 0000006db29e8000
2021-05-25 14:19:01.502 10741-10741/? A/DEBUG:     x28 b400006dd2a3b2c0  x29 0000007fe4055ca0
2021-05-25 14:19:01.502 10741-10741/? A/DEBUG:     lr  0000007044fe7038  sp  0000007fe4055c00  pc  0000007044fe7064  pst 0000000000001000
2021-05-25 14:19:01.505 10741-10741/? A/DEBUG: backtrace:
2021-05-25 14:19:01.505 10741-10741/? A/DEBUG:     NOTE: Function names and BuildId information is missing for some frames due
2021-05-25 14:19:01.505 10741-10741/? A/DEBUG:     NOTE: to unreadable libraries. For unwinds of apps, only shared libraries
2021-05-25 14:19:01.505 10741-10741/? A/DEBUG:     NOTE: found under the lib/ directory are readable.
2021-05-25 14:19:01.505 10741-10741/? A/DEBUG:       #00 pc 000000000004f064  /apex/com.android.runtime/lib64/bionic/libc.so (abort+164) (BuildId: 9559eebd9efefe5dce43c177dbff3a32)
2021-05-25 14:19:01.505 10741-10741/? A/DEBUG:       #01 pc 000000000053b008  /apex/com.android.art/lib64/libart.so (art::Runtime::Abort(char const*)+2340) (BuildId: a0f5b153d1a1e689b70b239a0f77e863)
2021-05-25 14:19:01.505 10741-10741/? A/DEBUG:       #02 pc 000000000001394c  /system/lib64/libbase.so (android::base::SetAborter(std::__1::function<void (char const*)>&&)::$_3::__invoke(char const*)+76) (BuildId: d2281947776fd1e772e1b286cf3cd086)
2021-05-25 14:19:01.505 10741-10741/? A/DEBUG:       #03 pc 00000000000130cc  /system/lib64/libbase.so (android::base::LogMessage::~LogMessage()+312) (BuildId: d2281947776fd1e772e1b286cf3cd086)
2021-05-25 14:19:01.505 10741-10741/? A/DEBUG:       #04 pc 00000000003728f4  /apex/com.android.art/lib64/libart.so (art::JavaVMExt::JniAbort(char const*, char const*)+2596) (BuildId: a0f5b153d1a1e689b70b239a0f77e863)
2021-05-25 14:19:01.505 10741-10741/? A/DEBUG:       #05 pc 00000000003bdb20  /apex/com.android.art/lib64/libart.so (art::JNI<false>::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+1564) (BuildId: a0f5b153d1a1e689b70b239a0f77e863)
2021-05-25 14:19:01.505 10741-10741/? A/DEBUG:       #06 pc 000000000000f854  /data/app/~~TdytE93xhZk8jbwvaazL7w==/com.perceptivesol.woozoo-NyFi0HgS0Lqg66dR57O2mA==/split_config.arm64_v8a.apk!libarcore_sdk_jni.so (offset 0x6b3000) (BuildId: f41c241727d1eace777007db7ca51280)
2021-05-25 14:19:01.505 10741-10741/? A/DEBUG:       #07 pc 000000000000f7e0  /data/app/~~TdytE93xhZk8jbwvaazL7w==/com.perceptivesol.woozoo-NyFi0HgS0Lqg66dR57O2mA==/split_config.arm64_v8a.apk!libarcore_sdk_jni.so (offset 0x6b3000) (BuildId: f41c241727d1eace777007db7ca51280)
2021-05-25 14:19:01.505 10741-10741/? A/DEBUG:       #08 pc 000000000000dc38  /data/app/~~TdytE93xhZk8jbwvaazL7w==/com.perceptivesol.woozoo-NyFi0HgS0Lqg66dR57O2mA==/split_config.arm64_v8a.apk!libarcore_sdk_jni.so (offset 0x6b3000) (Java_com_google_ar_core_Session_nativeCreateSessionAndWrapperWithFeatures+160) (BuildId: f41c241727d1eace777007db7ca51280)
2021-05-25 14:19:01.505 10741-10741/? A/DEBUG:       #09 pc 0000000000015228  /data/app/~~TdytE93xhZk8jbwvaazL7w==/com.toto.woozoo-NyFi0HgS0Lqg66dR57O2mA==/oat/arm64/base.odex (deleted)
2021-05-25 14:19:01.878 801-801/? E/tombstoned: Tombstone written to: /data/tombstones/tombstone_21