Closed brianm-sra closed 2 years ago
I tried renaming the file from .cpp to .cc (to be consistent with other files in the project), and changing nullptr to NULL (the documentation says if NULL is passed in, then it will initialize the output to identity matrix), but there was no change. Still seeing the same crash and error in logcat,
I fixed that particular crash by changing code to
ArPose* cameraPose = nullptr; ArPose_create(session, nullptr, &cameraPose); ArCamera_getPose(session, camera, cameraPose);
but now I just get the crash slightly later at a different point Sigh Continuing to debug remaining code
SPECIFIC ISSUE ENCOUNTERED
A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x1d89a04f1aecd0 in tid 19279 (GLThread 54), pid 19212 (app namespace mentioned) E/native: E0224 11:30:38.129759 19404 jni_helper.cc:109] Attempt to get JNIEnv on thread not attached to JVM W/native: W0224 11:30:38.129943 19404 scoped_global_ref.cc:29] Unable to delete global reference, JNIEnv missing
VERSIONS USED
Android Studio: Arctic Fox 2020.3.1 Patch 4 , running on Windows PC
ARCore SDK for Android: 1.29.0
Device manufacturer, model, and O/S: Samsung Galaxy Note 10+ 5G , Android version 12
Google Play Services for AR (ARCore): Version 1.29.213210293 On Windows, use:
adb shell pm dump com.google.ar.core | findstr /i "packages: versionName"
Packages: versionName=1.29.213210293 Hidden system packages: versionName=0Output of
adb shell getprop ro.build.fingerprint
: samsung/d2xqvzw/d2xq:12/SP1A.210812.016/N976VVRE7HVAB:eng/test-keysSTEPS TO REPRODUCE THE ISSUE
I took code from hello_ar_c and modified it, porting some Java code from raw_depth_java to C/C++ In one of the files that I added, raw_depth_data.cpp, I have a RawDepthData::create(const ArSession session, const ArFrame frame) method that includes this code as a part of it:
It successfully gets past the steps up to and including ArPose_create
When the ArCamera_getPose method is called, my app crashes
logcat shows
and then repeats those last two lines about jni_helper.cc:109 and scoped_global_ref.cc:29 multiple times in the logcat