Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hello_ar_c app crashes frequently #1341

Closed
brianm-sra opened this issue Jan 24, 2022 · 2 comments
Closed

hello_ar_c app crashes frequently #1341

brianm-sra opened this issue Jan 24, 2022 · 2 comments
Labels

Comments

@brianm-sra
Copy link

SPECIFIC ISSUE ENCOUNTERED

VERSIONS USED

  • Android Studio: Arctic Fox 2020.3.1 Patch 4
  • ARCore SDK for Android: 1.29.0
  • Device manufacturer, model, and O/S: Samsung Galaxy S20 5G, SM-G981U, Android version 11
  • Google Play Services for AR (ARCore): versionName=1.29.213210293
  • Output of adb shell getprop ro.build.fingerprint: samsung/x1qsqx/x1q:11/RP1A.200709.001/G981USQE1CTH8:eng/test-keys

STEPS TO REPRODUCE THE ISSUE

  1. Download 1.29.0 release
  2. Open hello_ar_c project in Android Studio
  3. Connect USB cable to device, Build and Run, allow camera permission requested on device
  4. Start using the app, after a few seconds notice that it crashes. If it continues to work for long enough, select the settings icon and choose Use Depth

logcat includes :

HqmInfo::AppCrashAnalyzer: condition : 1, processName : com.google.ar.core.examples.c.helloar, short msg : Native crash, ver : 1.0, stack : uid: 10289 signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x2 Cause: null pointer dereference #00 pc 000000000004a594 /apex/com.android.runtime/lib64/bionic/libc.so (__memcpy+196) (BuildId: 91b589f69a14ee59e858da7a896caf2b) #1 pc 000000000009b698 /apex/com.android.runtime/lib64/bionic/libc.so (__sfvwrite+148) (BuildId: 91b589f69a14ee59e858da7a896caf2b) #2 pc 00000000000918ec /apex/com.android.runtime/lib64/bionic/libc.so (__vfprintf+8984) (BuildId: 91b589f69a14ee59e858da7a896caf2b) #3 pc 00000000000b0250 /apex/com.android.runtime/lib64/bionic/libc.so (vsnprintf+188) (BuildId: 91b589f69a14ee59e858da7a896caf2b) #4 pc 000000000007945c /apex/com.android.runtime/lib64/bionic/libc.so (__vsprintf_chk+64) (BuildId: 91b589f69a14ee59e858da7a896caf2b) #5 pc 000000000005c0c8 /data/app/~~qvrB4SVH8NXYMm4p8e1eZA==/com.google.ar.core.examples.c.helloar-SYEOcp8gfwvkJ6pjnEzSQA==/base.apk!l

and

DEBUG : backtrace:
DEBUG : #00 pc 000000000004a594 /apex/com.android.runtime/lib64/bionic/libc.so (__memcpy+196) (BuildId: 91b589f69a14ee59e858da7a896caf2b)
DEBUG : #1 pc 000000000009b698 /apex/com.android.runtime/lib64/bionic/libc.so (__sfvwrite+148) (BuildId: 91b589f69a14ee59e858da7a896caf2b)
DEBUG : #2 pc 00000000000918ec /apex/com.android.runtime/lib64/bionic/libc.so (__vfprintf+8984) (BuildId: 91b589f69a14ee59e858da7a896caf2b)
DEBUG : #3 pc 00000000000b0250 /apex/com.android.runtime/lib64/bionic/libc.so (vsnprintf+188) (BuildId: 91b589f69a14ee59e858da7a896caf2b)
DEBUG : #4 pc 000000000007945c /apex/com.android.runtime/lib64/bionic/libc.so (vsprintf_chk+64) (BuildId: 91b589f69a14ee59e858da7a896caf2b)
DEBUG : #5 pc 000000000005c0c8 /data/app/~~qvrB4SVH8NXYMm4p8e1eZA==/com.google.ar.core.examples.c.helloar-SYEOcp8gfwvkJ6pjnEzSQA==/base.apk!libhello_ar_native.so (offset 0x42e000) (BuildId: 458981ca67691d57c402353ca7c83c58ce3e9154)
DEBUG : #6 pc 000000000005beec /data/app/~~qvrB4SVH8NXYMm4p8e1eZA==/com.google.ar.core.examples.c.helloar-SYEOcp8gfwvkJ6pjnEzSQA==/base.apk!libhello_ar_native.so (offset 0x42e000) (hello_ar::Texture::UpdateWithDepthImageOnGlThread(ArSession
const&, ArFrame
const&)+252) (BuildId: 458981ca67691d57c402353ca7c83c58ce3e9154)
DEBUG : #7 pc 000000000004ead8 /data/app/~~qvrB4SVH8NXYMm4p8e1eZA==/com.google.ar.core.examples.c.helloar-SYEOcp8gfwvkJ6pjnEzSQA==/base.apk!libhello_ar_native.so (offset 0x42e000) (hello_ar::HelloArApplication::OnDrawFrame(bool, bool)+744) (BuildId: 458981ca67691d57c402353ca7c83c58ce3e9154)
DEBUG : #8 pc 00000000000547d4 /data/app/~~qvrB4SVH8NXYMm4p8e1eZA==/com.google.ar.core.examples.c.helloar-SYEOcp8gfwvkJ6pjnEzSQA==/base.apk!libhello_ar_native.so (offset 0x42e000) (Java_com_google_ar_core_examples_c_helloar_JniInterface_onGlSurfaceDrawFrame+84) (BuildId: 458981ca67691d57c402353ca7c83c58ce3e9154)
DEBUG : #9 pc 000000000001fb28 /data/app/~~qvrB4SVH8NXYMm4p8e1eZA==/com.google.ar.core.examples.c.helloar-SYEOcp8gfwvkJ6pjnEzSQA==/oat/arm64/base.odex (art_jni_trampoline+168)

@brianm-sra brianm-sra added the bug label Jan 24, 2022
@brianm-sra
Copy link
Author

This might have been caused by some code that I had temporarily added to texture.cc (after line 75)

char *message;
sprintf(message, "in Texture::UpdateWithDepthImageOnGlThread, depth_data != nullptr, plane_size_bytes==%d", plane_size_bytes);
 LOGI("%s", message);

When I commented out these lines, I and rebuilt / reinstalled, I was able to run the app for longer

If no one else can reproduce with (un-modified) hello_ar_c , then this issue can probably just be closed

@brianm-sra
Copy link
Author

I fixed my debug code by changing the definition of
char *message;
to
char message[256];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant