Skip to content
This repository has been archived by the owner on Sep 14, 2021. It is now read-only.

Crash in libcamera2ndk on Galaxy S7 (Android 7) #259

Closed
NicolasWipon opened this issue Jun 12, 2018 · 5 comments
Closed

Crash in libcamera2ndk on Galaxy S7 (Android 7) #259

NicolasWipon opened this issue Jun 12, 2018 · 5 comments

Comments

@NicolasWipon
Copy link

Hi,

I have frequently a crash when I use my app build with Unity 2018.1.0f2 using ARCore 1.2.1 on Android 7.0 with a Samsung Galaxy S7.

It happens randomly but very often. I have updated ARCore from 1.2.0 to 1.2.1 this morning and I didn't have this crash before the update. It seems to happen when the app is in background and I open it from the background.
Sometimes, when the app is in background and I go back to it, the camera background is locked (it doesn't refresh anymore) and after some seconds, the crash happens.

Here is the crash log :

06-12 15:48:00.755 19541 19674 D ACameraDevice: Device error received, code 3, frame number 21, request ID 0, subseq ID 0
06-12 15:48:00.755 19541 20205 E native  : android_camera.cc:1058 Camera capture failed! frame: 21 reason: 1
06-12 15:48:00.843 19541 19555 E native  : session_c_api.cc:727 ArPointCloud_getTimestamp: point_cloud was passed NULL.
06-12 15:48:00.953 19541 19555 E native  : session_c_api.cc:727 ArPointCloud_getTimestamp: point_cloud was passed NULL.
06-12 15:48:01.062 19541 19555 E native  : session_c_api.cc:727 ArPointCloud_getTimestamp: point_cloud was passed NULL.
06-12 15:48:01.174 19541 19555 E native  : session_c_api.cc:727 ArPointCloud_getTimestamp: point_cloud was passed NULL.
06-12 15:48:01.280 19541 19555 E native  : session_c_api.cc:727 ArPointCloud_getTimestamp: point_cloud was passed NULL.
06-12 15:48:01.390 19541 19555 E native  : session_c_api.cc:727 ArPointCloud_getTimestamp: point_cloud was passed NULL.
06-12 15:48:01.498 19541 19555 E native  : session_c_api.cc:727 ArPointCloud_getTimestamp: point_cloud was passed NULL.
06-12 15:48:01.606 19541 19555 E native  : session_c_api.cc:727 ArPointCloud_getTimestamp: point_cloud was passed NULL.
06-12 15:48:01.682  3728  3962 I EDMNativeHelperService: isCameraEnabled
06-12 15:48:01.716 19541 19555 E native  : session_c_api.cc:727 ArPointCloud_getTimestamp: point_cloud was passed NULL.
06-12 15:48:01.824 19541 19555 E native  : session_c_api.cc:727 ArPointCloud_getTimestamp: point_cloud was passed NULL.
06-12 15:48:01.882  3728  3950 D WifiStateMachine: Current network is: "Agence-DAD-5G" , ID is: 0
06-12 15:48:01.934 19541 19555 E native  : session_c_api.cc:727 ArPointCloud_getTimestamp: point_cloud was passed NULL.
06-12 15:48:02.042 19541 19555 E native  : session_c_api.cc:727 ArPointCloud_getTimestamp: point_cloud was passed NULL.
06-12 15:48:02.151 19541 19555 E native  : session_c_api.cc:727 ArPointCloud_getTimestamp: point_cloud was passed NULL.
06-12 15:48:02.260 19541 19555 E native  : session_c_api.cc:727 ArPointCloud_getTimestamp: point_cloud was passed NULL.
06-12 15:48:02.371 19541 19555 E native  : session_c_api.cc:727 ArPointCloud_getTimestamp: point_cloud was passed NULL.
06-12 15:48:02.473 19541 19555 E native  : session_c_api.cc:727 ArPointCloud_getTimestamp: point_cloud was passed NULL.
06-12 15:48:02.574 19541 19555 E native  : session_c_api.cc:727 ArPointCloud_getTimestamp: point_cloud was passed NULL.
06-12 15:48:02.677 19541 19555 E native  : session_c_api.cc:727 ArPointCloud_getTimestamp: point_cloud was passed NULL.
06-12 15:48:02.685  3728  3962 I EDMNativeHelperService: isCameraEnabled
06-12 15:48:02.776 19541 19555 E native  : session_c_api.cc:727 ArPointCloud_getTimestamp: point_cloud was passed NULL.
06-12 15:48:02.884 19541 19555 E native  : session_c_api.cc:727 ArPointCloud_getTimestamp: point_cloud was passed NULL.
06-12 15:48:02.989 19541 19555 E native  : session_c_api.cc:727 ArPointCloud_getTimestamp: point_cloud was passed NULL.
06-12 15:48:03.035  4704  4704 D io_stats: !@   8,0 r 143470 11130744 w 26397 628460 d 4943 266008 f 8213 8206 iot 93950 88073 th 269952 0 0 pt 0 inp 0 0 3650.888
06-12 15:48:03.088 19541 19555 E native  : session_c_api.cc:727 ArPointCloud_getTimestamp: point_cloud was passed NULL.
06-12 15:48:03.186 19541 19555 E native  : session_c_api.cc:727 ArPointCloud_getTimestamp: point_cloud was passed NULL.
06-12 15:48:03.289 19541 19555 E native  : session_c_api.cc:727 ArPointCloud_getTimestamp: point_cloud was passed NULL.
06-12 15:48:03.389 19541 19555 E native  : session_c_api.cc:727 ArPointCloud_getTimestamp: point_cloud was passed NULL.
06-12 15:48:03.495 19541 19555 E native  : session_c_api.cc:727 ArPointCloud_getTimestamp: point_cloud was passed NULL.
06-12 15:48:03.604 19541 19555 E native  : session_c_api.cc:727 ArPointCloud_getTimestamp: point_cloud was passed NULL.
06-12 15:48:03.688  3728  3752 I EDMNativeHelperService: isCameraEnabled
06-12 15:48:03.716 19541 19555 E native  : session_c_api.cc:727 ArPointCloud_getTimestamp: point_cloud was passed NULL.
06-12 15:48:03.755  3282 20217 E Camera3-Stream: getBuffer: wait for output buffer return timed out after 3000ms (max_buffers 9)
06-12 15:48:03.755  3282 20217 E Camera3-Device: RequestThread: Can't get output buffer, skipping request: Connection timed out (-110)
06-12 15:48:03.756 19541 19553 D ACameraDevice: Device error received, code 3, frame number 22, request ID 0, subseq ID 0
--------- beginning of crash
06-12 15:48:03.757 19541 19553 F libc    : Fatal signal 11 (SIGSEGV), code 2, fault addr 0xd6481830 in tid 19553 (Binder:19541_2)
06-12 15:48:03.766  3095  3095 W         : debuggerd: handling request: pid=19541 uid=10448 gid=10448 tid=19553
06-12 15:48:03.782  3728  5987 D SSRM:f  : SIOP:: AP = 440, PST = 472 (W:14), CP = 345, CUR = -140, LCD = 230
06-12 15:48:03.931 20344 20344 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
06-12 15:48:03.931 20344 20344 F DEBUG   : Build fingerprint: 'samsung/heroltexx/herolte:7.0/NRD90M/G930FXXU2DRD1:user/release-keys'
06-12 15:48:03.932 20344 20344 F DEBUG   : Revision: '8'
06-12 15:48:03.932 20344 20344 F DEBUG   : ABI: 'arm'
06-12 15:48:03.932 20344 20344 F DEBUG   : pid: 19541, tid: 19553, name: Binder:19541_2  >>> com.deconnect.mobile.gloo <<<
06-12 15:48:03.932 20344 20344 F DEBUG   : signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xd6481830
06-12 15:48:03.933 20344 20344 F DEBUG   :     r0 b648182c  r1 eefb59b4  r2 80000000  r3 07ffffff
06-12 15:48:03.933 20344 20344 F DEBUG   :     r4 ffffffff  r5 ffffffff  r6 eefb34f9  r7 00000000
06-12 15:48:03.933 20344 20344 F DEBUG   :     r8 00000000  r9 00000002  sl ecc80b3c  fp fffffff8
06-12 15:48:03.933 20344 20344 F DEBUG   :     ip 0000001f  sp ebb12534  lr d6481828  pc eef78112  cpsr 200f0030
06-12 15:48:03.968 20344 20344 F DEBUG   :
06-12 15:48:03.968 20344 20344 F DEBUG   : backtrace:
06-12 15:48:03.968 20344 20344 F DEBUG   :     #00 pc 00054112  /system/lib/libc.so (arena_run_reg_alloc+101)
06-12 15:48:03.968 20344 20344 F DEBUG   :     #01 pc 00053fb1  /system/lib/libc.so (je_arena_tcache_fill_small+176)
06-12 15:48:03.968 20344 20344 F DEBUG   :     #02 pc 0006ebbd  /system/lib/libc.so (je_tcache_alloc_small_hard+16)
06-12 15:48:03.968 20344 20344 F DEBUG   :     #03 pc 000632d9  /system/lib/libc.so (je_malloc+852)
06-12 15:48:03.968 20344 20344 F DEBUG   :     #04 pc 00048c49  /system/lib/libc++.so (_Znwj+16)
06-12 15:48:03.968 20344 20344 F DEBUG   :     #05 pc 0000df1b  /system/lib/libcamera2ndk.so
06-12 15:48:03.969 20344 20344 F DEBUG   :     #06 pc 0000eca7  /system/lib/libcamera2ndk.so
06-12 15:48:03.969 20344 20344 F DEBUG   :     #07 pc 00033c03  /system/lib/libcamera_client.so (_ZN7android8hardware7camera223BnCameraDeviceCallbacks10onTransactEjRKNS_6ParcelEPS3_j+482)
06-12 15:48:03.969 20344 20344 F DEBUG   :     #08 pc 00035a1f  /system/lib/libbinder.so (_ZN7android7BBinder8transactEjRKNS_6ParcelEPS1_j+70)
06-12 15:48:03.969 20344 20344 F DEBUG   :     #09 pc 0003d213  /system/lib/libbinder.so (_ZN7android14IPCThreadState14executeCommandEi+722)
06-12 15:48:03.969 20344 20344 F DEBUG   :     #10 pc 0003ce4f  /system/lib/libbinder.so (_ZN7android14IPCThreadState20getAndExecuteCommandEv+114)
06-12 15:48:03.969 20344 20344 F DEBUG   :     #11 pc 0003d37b  /system/lib/libbinder.so (_ZN7android14IPCThreadState14joinThreadPoolEb+46)
06-12 15:48:03.969 20344 20344 F DEBUG   :     #12 pc 0004fa25  /system/lib/libbinder.so
06-12 15:48:03.969 20344 20344 F DEBUG   :     #13 pc 0000e369  /system/lib/libutils.so (_ZN7android6Thread11_threadLoopEPv+144)
06-12 15:48:03.969 20344 20344 F DEBUG   :     #14 pc 0006b29d  /system/lib/libandroid_runtime.so (_ZN7android14AndroidRuntime15javaThreadShellEPv+80)
06-12 15:48:03.970 20344 20344 F DEBUG   :     #15 pc 00047423  /system/lib/libc.so (_ZL15__pthread_startPv+22)
06-12 15:48:03.970 20344 20344 F DEBUG   :     #16 pc 00019efd  /system/lib/libc.so (__start_thread+6)
06-12 15:48:04.389  3281  3466 I AudioFlinger: BUFFER TIMEOUT: remove(4096) from active list on thread 0xf549bd40
@NicolasWipon NicolasWipon changed the title Crash with ARCore 1.2.1 on Galaxy S7 Crash with ARCore 1.2.1 on Galaxy S7 when app comes back from background Jun 12, 2018
@NicolasWipon NicolasWipon changed the title Crash with ARCore 1.2.1 on Galaxy S7 when app comes back from background Crash with ARCore 1.2.1 on Galaxy S7 when app comes back from background (pause) Jun 12, 2018
@pablisho
Copy link
Contributor

Hi, thanks for the report. @inio any thoughts?

@NicolasWipon
Copy link
Author

Hi,
I can't reproduce the crash anymore today, even after 30 tries (putting app in background and go back to it). Maybe it was caused by heat.

@inio
Copy link

inio commented Jun 14, 2018

a SIGSEGV with libcamera2ndk.so on the stack on android ≤ 8.0 will almost always be google-ar/arcore-android-sdk#291

@NicolasWipon
Copy link
Author

Thanks for the info !

@pablisho pablisho changed the title Crash with ARCore 1.2.1 on Galaxy S7 when app comes back from background (pause) Crash in libcamera2ndk on Galaxy S7 (Android 7) Jun 28, 2018
@chaosemer
Copy link
Contributor

Closing as duplicate.

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

No branches or pull requests

4 participants