Android原生崩溃报告

时间:2017-11-29 15:44:49

标签: android xamarin.forms xamarin.android crash-reports

我花了一个多星期的时间,在我的代码和调试中添加日志,但无法重现任何崩溃以确定原因。所以我来到这里,希望有人曾经遇到过此次崩溃的经历,或者知道崩溃报告的含义。

我有多个崩溃报告,所有这些都是“/system/lib/libcutils.so中的本机崩溃”,但回溯有些相同。

我注意到大多数报告都有以下内容

(dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+398)

还有一些

(dvmCallMethodA(Thread*, Method const*, Object*, bool, JValue*, jvalue const*)+354)

提前感谢!

第一份报告

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'Honeywell/helsinki/CT50L0N-CS13S:4.4.4/KTU84P/59.02.02.0025:user/release-keys'
Revision: '0'
pid: 26459, tid: 26459, name: ps.myapp  >>> com.myapp <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 3f800004
    r0 3f800004  r1 3f800001  r2 00000000  r3 3f800004
    r4 6531b4a0  r5 6531b450  r6 00000000  r7 574dfbcc
    r8 bec60038  r9 574dfbc4  sl 414b0938  fp bec6004c
    ip 4058db90  sp bec60028  lr 4046f75f  pc 4008e5d8  cpsr 00070010
    d0  0000000000000000  d1  0000000000000000
    d2  0000000000000000  d3  0000000000000000
    d4  0000000000000000  d5  4014000000000000
    d6  0000000a41200000  d7  3f8000003f800000
    d8  000002ac3f800000  d9  000001913f000000
    d10 0000000042e00000  d11 0000000000000000
    d12 0000000000000000  d13 0000000000000000
    d14 0000000000000000  d15 0000000000000000
    d16 64696f72646e614c  d17 70532f747865742f
    d18 006f00630065006e  d19 0062006f006d002e
    d20 00610065006c0069  d21 002e007300700070
    d22 006e006500760065  d23 0074006500720074
    d24 b94377ce858a5d48  d25 0009000a000a0009
    d26 0000000000000000  d27 0000000000000000
    d28 3ff0000000000000  d29 0000000000000000
    d30 000a000a000a000a  d31 0000000000000000
    scr 68000013

backtrace:
    #00  pc 000035d8  /system/lib/libcutils.so (android_atomic_inc+8)
    #01  pc 000c475b  /system/lib/libskia.so (SkPaint::operator=(SkPaint const&)+42)
    #02  pc 0002034c  /system/lib/libdvm.so (dvmPlatformInvoke+112)
    #03  pc 00050fcf  /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+398)
    #04  pc 00000214  /dev/ashmem/dalvik-jit-code-cache (deleted)

第二次报告

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'Honeywell/helsinki/CT50L0N-CS13S:4.4.4/KTU84P/59.02.02.0025:user/release-keys'
Revision: '0'
pid: 30873, tid: 30873, name: ps.myapp  >>> com.myapp <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 3f800004
    r0 3f800004  r1 00000000  r2 ffffffff  r3 3f800004
    r4 3f800000  r5 66adc3e8  r6 00000000  r7 574dfbcc
    r8 bec60028  r9 574dfbc4  sl 414b0938  fp bec6003c
    ip 4058db8c  sp bec60010  lr 404494c3  pc 4008e5fc  cpsr 00070010
    d0  0000000000000000  d1  0000000000000000
    d2  0000000000000000  d3  0000000000000000
    d4  0000000000000000  d5  4014000000000000
    d6  0000000a41200000  d7  3f8000003f800000
    d8  3f8000003f800000  d9  4434000044130000
    d10 0000000044440000  d11 0000000000000000
    d12 0000000000000000  d13 0000000000000000
    d14 0000000000000000  d15 0000000000000000
    d16 64696f72646e614c  d17 70532f747865742f
    d18 006f00630065006e  d19 0062006f006d002e
    d20 00610065006c0069  d21 002e007300700070
    d22 006e006500760065  d23 0074006500720074
    d24 3f8fcf331262ca11  d25 0016001500140013
    d26 0000000000000000  d27 0000000000000000
    d28 011e011d011c011b  d29 0120011f011d011e
    d30 0016001600160016  d31 0000000000000000
    scr 68000013

backtrace:
    #00  pc 000035fc  /system/lib/libcutils.so (android_atomic_dec+12)
    #01  pc 0009e4bf  /system/lib/libskia.so (SkPixelRef::globalUnref()+6)
    #02  pc 000c47a9  /system/lib/libskia.so (SkPaint::operator=(SkPaint const&)+120)
    #03  pc 0002034c  /system/lib/libdvm.so (dvmPlatformInvoke+112)
    #04  pc 00050fcf  /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+398)
    #05  pc 000297e0  /system/lib/libdvm.so
    #06  pc 00030c6c  /system/lib/libdvm.so (dvmMterpStd(Thread*)+76)
    #07  pc 0002e304  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
    #08  pc 000632c7  /system/lib/libdvm.so (dvmCallMethodA(Thread*, Method const*, Object*, bool, JValue*, jvalue const*)+354)
    #09  pc 0004eafb  /system/lib/libdvm.so
    #10  pc 00008ed5  /data/app-lib/com.myapp-2/libmonodroid.so (java_interop_jnienv_call_nonvirtual_void_method_a+34)
    #11  pc 00015410  <unknown>

3报告

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'Honeywell/helsinki/CT50L0N-CS13S:4.4.4/KTU84P/59.02.02.0025:user/release-keys'
Revision: '0'
pid: 30873, tid: 30873, name: ps.myapp  >>> com.myapp <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 3f800004
    r0 3f800004  r1 00000000  r2 ffffffff  r3 3f800004
    r4 3f800000  r5 66adc3e8  r6 00000000  r7 574dfbcc
    r8 bec60028  r9 574dfbc4  sl 414b0938  fp bec6003c
    ip 4058db8c  sp bec60010  lr 404494c3  pc 4008e5fc  cpsr 00070010
    d0  0000000000000000  d1  0000000000000000
    d2  0000000000000000  d3  0000000000000000
    d4  0000000000000000  d5  4014000000000000
    d6  0000000a41200000  d7  3f8000003f800000
    d8  3f8000003f800000  d9  4434000044130000
    d10 0000000044440000  d11 0000000000000000
    d12 0000000000000000  d13 0000000000000000
    d14 0000000000000000  d15 0000000000000000
    d16 64696f72646e614c  d17 70532f747865742f
    d18 006f00630065006e  d19 0062006f006d002e
    d20 00610065006c0069  d21 002e007300700070
    d22 006e006500760065  d23 0074006500720074
    d24 3f8fcf331262ca11  d25 0016001500140013
    d26 0000000000000000  d27 0000000000000000
    d28 011e011d011c011b  d29 0120011f011d011e
    d30 0016001600160016  d31 0000000000000000
    scr 68000013

backtrace:
    #00  pc 000035fc  /system/lib/libcutils.so (android_atomic_dec+12)
    #01  pc 0009e4bf  /system/lib/libskia.so (SkPixelRef::globalUnref()+6)
    #02  pc 000c47a9  /system/lib/libskia.so (SkPaint::operator=(SkPaint const&)+120)
    #03  pc 0002034c  /system/lib/libdvm.so (dvmPlatformInvoke+112)
    #04  pc 00050fcf  /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+398)
    #05  pc 000297e0  /system/lib/libdvm.so
    #06  pc 00030c6c  /system/lib/libdvm.so (dvmMterpStd(Thread*)+76)
    #07  pc 0002e304  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
    #08  pc 000632c7  /system/lib/libdvm.so (dvmCallMethodA(Thread*, Method const*, Object*, bool, JValue*, jvalue const*)+354)
    #09  pc 0004eafb  /system/lib/libdvm.so
    #10  pc 00008ed5  /data/app-lib/com.myapp-2/libmonodroid.so (java_interop_jnienv_call_nonvirtual_void_method_a+34)
    #11  pc 00015410  <unknown>

1 个答案:

答案 0 :(得分:0)

Android使用Zygote启动应用程序,当Zygote抛出一个&#34;信号11&#34;这意味着一些进程访问禁止的内存区域。

我在您的报告中看到SkPixelRef,您在项目中使用OpenGL吗?如果你这样做,请记住OpenGL在独立于线程上工作,因此,初始化OpenGL在构造函数上使用的所有变量以避免这种问题。

我建议使用android_print / Log.Debug检查程序访问和失败的区域。

您可以使用 addr2line 转换地址,以便找到更多有用的信息,它是随Android-NDK提供的。关于您可以参考的addr2line用法:

How to use addr2line in Android