使用ndk-statck分析Native代码Crash日志

1. Native代码的crasharm64.txt崩溃信息

2020-12-09 09:00:07.370 30885-30885/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2020-12-09 09:00:07.370 30885-30885/? A/DEBUG: Build fingerprint: 'vivo/PD1911/PD1911:10/QP1A.190711.020/compiler10131608:user/release-keys'
2020-12-09 09:00:07.370 30885-30885/? A/DEBUG: Revision: '0'
2020-12-09 09:00:07.370 30885-30885/? A/DEBUG: ABI: 'arm64'
2020-12-09 09:00:07.370 30885-30885/? A/DEBUG: Timestamp: 2020-12-09 09:00:07+0800
2020-12-09 09:00:07.370 30885-30885/? A/DEBUG: pid: 30666, tid: 30666, name: .jniapplication  >>> com.example.jniapplication <<<
2020-12-09 09:00:07.370 30885-30885/? A/DEBUG: uid: 10520
2020-12-09 09:00:07.370 30885-30885/? A/DEBUG: signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
2020-12-09 09:00:07.371 30885-30885/? A/DEBUG: Abort message: 'terminating with uncaught exception of type char const*'
2020-12-09 09:00:07.371 30885-30885/? A/DEBUG:     x0  0000000000000000  x1  00000000000077ca  x2  0000000000000006  x3  0000007fdabe8780
2020-12-09 09:00:07.371 30885-30885/? A/DEBUG:     x4  ff2973726d6e621f  x5  ff2973726d6e621f  x6  ff2973726d6e621f  x7  7f7f7f7f7f7f7f7f
2020-12-09 09:00:07.371 30885-30885/? A/DEBUG:     x8  00000000000000f0  x9  b3bcb979ab14b6e9  x10 0000000000000001  x11 0000000000000000
2020-12-09 09:00:07.371 30885-30885/? A/DEBUG:     x12 fffffff0fffffbdf  x13 000000005fd02197  x14 000a7d9311568739  x15 00004aa3aa7f85b6
2020-12-09 09:00:07.371 30885-30885/? A/DEBUG:     x16 00000075e54a9738  x17 00000075e5487f20  x18 00000075ea706000  x19 00000000000077ca
2020-12-09 09:00:07.371 30885-30885/? A/DEBUG:     x20 00000000000077ca  x21 00000000ffffffff  x22 ffffff80ffffffc8  x23 0000007fdabe89d0
2020-12-09 09:00:07.371 30885-30885/? A/DEBUG:     x24 0000007fdabe88b0  x25 0000007fdabe88f0  x26 0000007563c108b0  x27 0000000000000001
2020-12-09 09:00:07.371 30885-30885/? A/DEBUG:     x28 0000007fdabe8f40  x29 0000007fdabe8820
2020-12-09 09:00:07.371 30885-30885/? A/DEBUG:     sp  0000007fdabe8760  lr  00000075e543986c  pc  00000075e5439898
2020-12-09 09:00:08.031 30885-30885/? A/DEBUG: backtrace:
2020-12-09 09:00:08.031 30885-30885/? A/DEBUG:       #00 pc 0000000000073898  /apex/com.android.runtime/lib64/bionic/libc.so (abort+160) (BuildId: 6aaa192fa70426ea767b3bcf55b19a30)
2020-12-09 09:00:08.031 30885-30885/? A/DEBUG:       #01 pc 0000000000013b8c  /data/app/com.example.jniapplication-Hr6P3j5h_rAaQyd9ZyzDMg==/lib/arm64/libnative-lib.so (BuildId: 210af00d497e3ec34c1bce91f295c8ef10643709)
2020-12-09 09:00:08.031 30885-30885/? A/DEBUG:       #02 pc 0000000000013cfc  /data/app/com.example.jniapplication-Hr6P3j5h_rAaQyd9ZyzDMg==/lib/arm64/libnative-lib.so (BuildId: 210af00d497e3ec34c1bce91f295c8ef10643709)
2020-12-09 09:00:08.031 30885-30885/? A/DEBUG:       #03 pc 0000000000010bfc  /data/app/com.example.jniapplication-Hr6P3j5h_rAaQyd9ZyzDMg==/lib/arm64/libnative-lib.so (BuildId: 210af00d497e3ec34c1bce91f295c8ef10643709)
2020-12-09 09:00:08.032 30885-30885/? A/DEBUG:       #04 pc 00000000000104cc  /data/app/com.example.jniapplication-Hr6P3j5h_rAaQyd9ZyzDMg==/lib/arm64/libnative-lib.so (BuildId: 210af00d497e3ec34c1bce91f295c8ef10643709)
2020-12-09 09:00:08.032 30885-30885/? A/DEBUG:       #05 pc 0000000000010428  /data/app/com.example.jniapplication-Hr6P3j5h_rAaQyd9ZyzDMg==/lib/arm64/libnative-lib.so (__cxa_throw+112) (BuildId: 210af00d497e3ec34c1bce91f295c8ef10643709)
2020-12-09 09:00:08.032 30885-30885/? A/DEBUG:       #06 pc 000000000000fd6c  /data/app/com.example.jniapplication-Hr6P3j5h_rAaQyd9ZyzDMg==/lib/arm64/libnative-lib.so (addException()+84) (BuildId: 210af00d497e3ec34c1bce91f295c8ef10643709)
2020-12-09 09:00:08.032 30885-30885/? A/DEBUG:       #07 pc 000000000000f04c  /data/app/com.example.jniapplication-Hr6P3j5h_rAaQyd9ZyzDMg==/lib/arm64/libnative-lib.so (Java_com_example_jniapplication_MainActivity_stringFromJNI+48) (BuildId: 210af00d497e3ec34c1bce91f295c8ef10643709)

2. 使用ndk-statck分析

ndk-stack -sym E:\demo\JNIApplication\app\build\intermediates\cmake\debug\obj\arm64-v8a -dump crasharm64.txt

红色的部分Crash发生的源代码的函数和函数

********** Crash dump: **********
Build fingerprint: 'vivo/PD1911/PD1911:10/QP1A.190711.020/compiler10131608:user/release-keys'
Abort message: 'terminating with uncaught exception of type char const*'
#00 0x0000000000073898 /apex/com.android.runtime/lib64/bionic/libc.so (abort+160) (BuildId: 6aaa192fa70426ea767b3bcf55b19a30)
#01 0x0000000000013b8c /data/app/com.example.jniapplication-Hr6P3j5h_rAaQyd9ZyzDMg==/lib/arm64/libnative-lib.so (BuildId: 210af00d497e3ec34c1bce91f295c8ef10643709)
                                                                                                                 abort_message
                                                                                                                 /buildbot/src/android/ndk-release-r21\external/libcxx/../../external/libcxxabi/src/abort_message.cpp:76:5
#02 0x0000000000013cfc /data/app/com.example.jniapplication-Hr6P3j5h_rAaQyd9ZyzDMg==/lib/arm64/libnative-lib.so (BuildId: 210af00d497e3ec34c1bce91f295c8ef10643709)
                                                                                                                 demangling_terminate_handler()
                                                                                                                 /buildbot/src/android/ndk-release-r21\external/libcxx/../../external/libcxxabi/src/cxa_default_handlers.cpp:67:21
#03 0x0000000000010bfc /data/app/com.example.jniapplication-Hr6P3j5h_rAaQyd9ZyzDMg==/lib/arm64/libnative-lib.so (BuildId: 210af00d497e3ec34c1bce91f295c8ef10643709)
                                                                                                                 std::__terminate(void (*)())
                                                                                                                 /buildbot/src/android/ndk-release-r21\external/libcxx/../../external/libcxxabi/src/cxa_handlers.cpp:59:9
#04 0x00000000000104cc /data/app/com.example.jniapplication-Hr6P3j5h_rAaQyd9ZyzDMg==/lib/arm64/libnative-lib.so (BuildId: 210af00d497e3ec34c1bce91f295c8ef10643709)
                                                                                                                 __cxxabiv1::failed_throw(__cxxabiv1::__cxa_exception*)
                                                                                                                 /buildbot/src/android/ndk-release-r21\external/libcxx/../../external/libcxxabi/src/cxa_exception.cpp:152:5
#05 0x0000000000010428 /data/app/com.example.jniapplication-Hr6P3j5h_rAaQyd9ZyzDMg==/lib/arm64/libnative-lib.so (__cxa_throw+112) (BuildId: 210af00d497e3ec34c1bce91f295c8ef10643709)
                                                                                                                 __cxa_throw
                                                                                                                 /buildbot/src/android/ndk-release-r21\external/libcxx/../../external/libcxxabi/src/cxa_exception.cpp:284:5
#06 0x000000000000fd6c /data/app/com.example.jniapplication-Hr6P3j5h_rAaQyd9ZyzDMg==/lib/arm64/libnative-lib.so (addException()+84) (BuildId: 210af00d497e3ec34c1bce91f295c8ef10643709)
                                                                                                                 addException()
                                                                                                                 E:/demo/JNIApplication/app/src/main/cpp\version.cpp:11:5
#07 0x000000000000f04c /data/app/com.example.jniapplication-Hr6P3j5h_rAaQyd9ZyzDMg==/lib/arm64/libnative-lib.so (Java_com_example_jniapplication_MainActivity_stringFromJNI+48) (BuildId: 210af00d497e3ec34c1bce91f295c8ef10643709)
                                                                                                                 Java_com_example_jniapplication_MainActivity_stringFromJNI
                                                                                                                 E:/demo/JNIApplication/app/src/main/cpp\native-lib.cpp:9:5

#08 0x0000000000140350 /apex/com.android.runtime/lib64/libart.so (art_quick_generic_jni_trampoline+144) (BuildId: 1498a878d000c160bbba1fa8e0a4e8fe)
#09 0x0000000000137334 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: 1498a878d000c160bbba1fa8e0a4e8fe)

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值