crash log
12-31 04:07:10.321 503 503 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
12-31 04:07:10.321 503 503 F DEBUG : Build fingerprint: 'Xiaomi/nikel/nikel:6.0/MRA58K/9.3.21:user/release-keys'
12-31 04:07:10.321 503 503 F DEBUG : Revision: '0'
12-31 04:07:10.321 503 503 F DEBUG : ABI: 'arm64'
12-31 04:07:10.321 503 503 F DEBUG : pid: 13405, tid: 13405, name: com.mytest >>> com.mytest <<<
12-31 04:07:10.321 503 503 F DEBUG : signal 6 (SIGABRT), code 0 (SI_USER), fault addr --------
12-31 04:07:10.363 503 503 F DEBUG : Abort message: 'art/runtime/java_vm_ext.cc:440] JNI DETECTED ERROR IN APPLICATION: JNI CallVoidMethodV called with pending exception java.lang.NullPointerException: Attempt to invoke virtual method 'void android.hardware.Camera.stopFaceDetection()' on a null object reference'
12-31 04:07:10.363 503 503 F DEBUG : x0 0000000000000000 x1 000000000000345d x2 0000000000000006 x3 0000000000000000
12-31 04:07:10.363 503 503 F DEBUG : x4 0000000000000000 x5 0000000000000001 x6 0000000000000000 x7 0000000000000000
12-31 04:07:10.363 503 503 F DEBUG : x8 0000000000000083 x9 000000000000f540 x10 00000002f1290dc0 x11 00000002f1290f00
12-31 04:07:10.363 503 503 F DEBUG : x12 0000000000000000 x13 0000007f9d45e000 x14 0000000000000000 x15 0000000000000000
12-31 04:07:10.363 503 503 F DEBUG : x16 0000007f9d450570 x17 0000007f9d3e1b1c x18 0000007f9d461f50 x19 0000007f9d868380
12-31 04:07:10.363 503 503 F DEBUG : x20 0000007f9d8682c0 x21 000000000000000b x22 0000000000000006 x23 0000007f999fc400
12-31 04:07:10.363 503 503 F DEBUG : x24 0000007f49f0f540 x25 0000000000000000 x26 0000007f997a9000 x27 0000000000000000
12-31 04:07:10.363 503 503 F DEBUG : x28 0000007f999fc400 x29 0000007ff3b2fec0 x30 0000007f9d3df2b8
12-31 04:07:10.363 503 503 F DEBUG : sp 0000007ff3b2fec0 pc 0000007f9d3e1b24 pstate 0000000020000000
12-31 04:07:10.385 503 503 F DEBUG :
12-31 04:07:10.385 503 503 F DEBUG : backtrace:
12-31 04:07:10.385 503 503 F DEBUG : #00 pc 000000000006ab24 /system/lib64/libc.so (tgkill+8)
12-31 04:07:10.385 503 503 F DEBUG : #01 pc 00000000000682b4 /system/lib64/libc.so (pthread_kill+68)
12-31 04:07:10.385 503 503 F DEBUG : #02 pc 0000000000023ae4 /system/lib64/libc.so (raise+28)
12-31 04:07:10.385 503 503 F DEBUG : #03 pc 000000000001e284 /system/lib64/libc.so (abort+60)
12-31 04:07:10.385 503 503 F DEBUG : #04 pc 00000000004347c4 /system/lib64/libart.so (_ZN3art7Runtime5AbortEv+324)
12-31 04:07:10.385 503 503 F DEBUG : #05 pc 00000000001365b0 /system/lib64/libart.so (_ZN3art10LogMessageD2Ev+3136)
12-31 04:07:10.385 503 503 F DEBUG : #06 pc 0000000000311568 /system/lib64/libart.so (ZN3art9JavaVMExt8JniAbortEPKcS2+2288)
12-31 04:07:10.385 503 503 F DEBUG : #07 pc 0000000000311a18 /system/lib64/libart.so (_ZN3art9JavaVMExt9JniAbortVEPKcS2_St9__va_list+116)
12-31 04:07:10.385 503 503 F DEBUG : #08 pc 0000000000142414 /system/lib64/libart.so (_ZN3art11ScopedCheck6AbortFEPKcz+144)
12-31 04:07:10.385 503 503 F DEBUG : #09 pc 00000000001492c4 /system/lib64/libart.so (_ZN3art11ScopedCheck5CheckERNS_18ScopedObjectAccessEbPKcPNS_12JniValueTypeE.constprop.116+6088)
12-31 04:07:10.385 503 503 F DEBUG : #10 pc 000000000015bec8 /system/lib64/libart.so (_ZN3art8CheckJNI11CallMethodVEPKcP7_JNIEnvP8_jobjectP7_jclassP10_jmethodIDSt9__va_listNS_9Primitive4TypeENS_10InvokeTypeE+684)
12-31 04:07:10.386 503 503 F DEBUG : #11 pc 000000000015e190 /system/lib64/libart.so (_ZN3art8CheckJNI15CallVoidMethodVEP7_JNIEnvP8_jobjectP10_jmethodIDSt9__va_list+68)
分析
- signal 6 (SIGABRT), code 0 (SI_USER)、Abort message
这几个信息说明是用户层程序调用abort()造成的。 - JNI CallVoidMethodV called with pending exception java.lang.NullPointerException
出错的地方是JNI调用CallVoidMethodV,但是后面有个重要的信息“pending exception”,说明在这之前有一个没有解决的exception。所以这个时候native通过JNI调用java,虚拟机直接会abort()。
所以,这个问题的根源是找到java程序的NullPointerException,和native的程序无关。 - backtrace
后面的堆栈信息有abort()、_ZN3art7Runtime5AbortEv,验证了我们的分析,即虚拟机(libart.so)主动调用abort()退出。
网友评论