我们正在开发一个Android项目,我们的平台是基于arm的。 我们发现dalvik中发生应用程序崩溃的可能性很小。 Belows是崩溃日志消息。 我认为分段错误是由内存损坏引起的,这是导致此问题的根本原因,但我不知道如何调试此问题。
任何提示都非常感谢。
此致
06-20 04:42:47.986 I/DEBUG ( 803): * ** * ** * ** * ** * ** *
06-20 04:42:47.986 I/DEBUG ( 803): Build fingerprint: 'TI/omap3evm/omap3evm:2.3/GRH55/eng.root.20130321.220023:userdebug/test-keys'
06-20 04:42:47.986 I/DEBUG ( 803): pid: 1229, tid: 1232 >>> com.samsung.xoa.ui.local.android.app.initialsetup <<<
06-20 04:42:47.986 I/DEBUG ( 803): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0063008f
06-20 04:42:47.986 I/DEBUG ( 803): r0 00000000 r1 0063006f r2 40009328 r3 400091e8
06-20 04:42:47.986 I/DEBUG ( 803): r4 47095000 r5 40009228 r6 401a06d0 r7 81da5608
06-20 04:42:47.986 I/DEBUG ( 803): r8 fffffe7c r9 81da5608 10 00002000 fp 44dafd78
06-20 04:42:47.986 I/DEBUG ( 803): ip 81daad38 sp 44dafd40 lr 81d36348 pc 81d35bd4 cpsr 80000010
06-20 04:42:47.986 I/DEBUG ( 803): d0 403b0ad0403e6019 d1 40408e704040961a
06-20 04:42:47.986 I/DEBUG ( 803): d2 4042e4384042eb1b d3 4042d4d04042dcff
06-20 04:42:47.986 I/DEBUG ( 803): d4 40258b1840260d48 d5 402393f840252c30
06-20 04:42:47.986 I/DEBUG ( 803): d6 401f2d8840223d98 d7 40131a50401a8398
06-20 04:42:47.986 I/DEBUG ( 803): d8 00000011e7adbd96 d9 0000000000000000
06-20 04:42:47.986 I/DEBUG ( 803): d10 0000000000000000 d11 0000000000000000
06-20 04:42:47.986 I/DEBUG ( 803): d12 0000000000000000 d13 0000000000000000
06-20 04:42:47.986 I/DEBUG ( 803): d14 0000000000000000 d15 0000000000000000
06-20 04:42:47.986 I/DEBUG ( 803): d16 0000000000000000 d17 3ff0000000000000
06-20 04:42:47.986 I/DEBUG ( 803): d18 0000000000000000 d19 0000000000000000
06-20 04:42:47.986 I/DEBUG ( 803): d20 0000000000000000 d21 0000000000000000
06-20 04:42:47.986 I/DEBUG ( 803): d22 0000000000000000 d23 0000000000000000
06-20 04:42:47.986 I/DEBUG ( 803): d24 0000000000000000 d25 0000000000000000
06-20 04:42:47.986 I/DEBUG ( 803): d26 0000000000000000 d27 0000000000000000
06-20 04:42:47.986 I/DEBUG ( 803): d28 0000000000000000 d29 0000000000000000
06-20 04:42:47.986 I/DEBUG ( 803): d30 0000000000000000 d31 0000000000000000
06-20 04:42:47.986 I/DEBUG ( 803): scr 80000012
06-20 04:42:47.986 I/DEBUG ( 803):
06-20 04:42:48.010 I/DEBUG ( 803): #00 pc 00035bd4 /system/lib/libdvm.so
06-20 04:42:48.010 I/DEBUG ( 803): #01 pc 00036344 /system/lib/libdvm.so
06-20 04:42:48.010 I/DEBUG ( 803): #02 pc 00020338 /system/lib/libdvm.so
06-20 04:42:48.010 I/DEBUG ( 803):
06-20 04:42:48.010 I/DEBUG ( 803): code around pc:
06-20 04:42:48.010 I/DEBUG ( 803): 81d35bb4 0a000001 e1a01006 eb014609 e797c008
06-20 04:42:48.010 I/DEBUG ( 803): 81d35bc4 e5961000 e59c20ac e1510002 0a0000b5
06-20 04:42:48.010 I/DEBUG ( 803): 81d35bd4 e5912020 e3120101 0a000055 e3510000
06-20 04:42:48.010 I/DEBUG ( 803): 81d35be4 e1a03001 0a000021 e5950010 e1510000
06-20 04:42:48.010 I/DEBUG ( 803): 81d35bf4 3a00001e e5953000 e593c00c e5930010
06-20 04:42:48.010 I/DEBUG ( 803):
06-20 04:42:48.010 I/DEBUG ( 803): code around lr:
06-20 04:42:48.010 I/DEBUG ( 803): 81d36328 e590404c e5812054 e1540003 0a000006
06-20 04:42:48.010 I/DEBUG ( 803): 81d36338 e4930004 e1a01007 e5873008 ebfffe10
06-20 04:42:48.010 I/DEBUG ( 803): 81d36348 e5973008 e1540003 1afffff8 e3a00000
06-20 04:42:48.010 I/DEBUG ( 803): 81d36358 eb0143fe e28dd02c e8bd8ff0 e1a0000b
06-20 04:42:48.010 I/DEBUG ( 803): 81d36368 eb01442e eafffffa e59fe048 e3a00006
06-20 04:42:48.010 I/DEBUG ( 803):
06-20 04:42:48.010 I/DEBUG ( 803): stack:
06-20 04:42:48.010 I/DEBUG ( 803): 44dafd00 400091f0 /dev/ashmem/dalvik-heap (deleted)
06-20 04:42:48.010 I/DEBUG ( 803): 44dafd04 01040004
06-20 04:42:48.010 I/DEBUG ( 803): 44dafd08 40009228 /dev/ashmem/dalvik-heap (deleted)
06-20 04:42:48.010 I/DEBUG ( 803): 44dafd0c 00000000
06-20 04:42:48.010 I/DEBUG ( 803): 44dafd10 00000001
06-20 04:42:48.010 I/DEBUG ( 803): 44dafd14 fffffe7c
06-20 04:42:48.010 I/DEBUG ( 803): 44dafd18 00264fa0 [heap]
06-20 04:42:48.010 I/DEBUG ( 803): 44dafd1c 47095000 /dev/ashmem/CursorWindow (deleted)
06-20 04:42:48.010 I/DEBUG ( 803): 44dafd20 40009228 /dev/ashmem/dalvik-heap (deleted)
06-20 04:42:48.010 I/DEBUG ( 803): 44dafd24 403e8b38 /dev/ashmem/dalvik-heap (deleted)
06-20 04:42:48.010 I/DEBUG ( 803): 44dafd28 81da5608 /system/lib/libdvm.so
06-20 04:42:48.010 I/DEBUG ( 803): 44dafd2c fffffe7c
06-20 04:42:48.010 I/DEBUG ( 803): 44dafd30 81da5608 /system/lib/libdvm.so
06-20 04:42:48.010 I/DEBUG ( 803): 44dafd34 00002000
06-20 04:42:48.010 I/DEBUG ( 803): 44dafd38 df002777
06-20 04:42:48.010 I/DEBUG ( 803): 44dafd3c e3a070ad
06-20 04:42:48.010 I/DEBUG ( 803): #00 44dafd40 47095000 /dev/ashmem/CursorWindow (deleted)
06-20 04:42:48.010 I/DEBUG ( 803): 44dafd44 00253644 [heap]
06-20 04:42:48.010 I/DEBUG ( 803): 44dafd48 00000001
06-20 04:42:48.010 I/DEBUG ( 803): 44dafd4c 40009228 /dev/ashmem/dalvik-heap (deleted)
06-20 04:42:48.010 I/DEBUG ( 803): 44dafd50 fffffe7c
06-20 04:42:48.010 I/DEBUG ( 803): 44dafd54 81da5608 /system/lib/libdvm.so
06-20 04:42:48.010 I/DEBUG ( 803): 44dafd58 00002000
06-20 04:42:48.010 I/DEBUG ( 803): 44dafd5c 81d36348 /system/lib/libdvm.so
06-20 04:42:48.010 I/DEBUG ( 803): #01 44dafd60 000002bb
06-20 04:42:48.010 I/DEBUG ( 803): 44dafd64 81d9ef60 /system/lib/libdvm.so
06-20 04:42:48.010 I/DEBUG ( 803): 44dafd68 81d9f02c /system/lib/libdvm.so
06-20 04:42:48.010 I/DEBUG ( 803): 44dafd6c 81da5608 /system/lib/libdvm.so
06-20 04:42:48.010 I/DEBUG ( 803): 44dafd70 400091e8 /dev/ashmem/dalvik-heap (deleted)
06-20 04:42:48.010 I/DEBUG ( 803): 44dafd74 fffffe7c
06-20 04:42:48.010 I/DEBUG ( 803): 44dafd78 00253644 [heap]
06-20 04:42:48.010 I/DEBUG ( 803): 44dafd7c 00252b58 [heap]
06-20 04:42:48.010 I/DEBUG ( 803): 44dafd80 00000400
06-20 04:42:48.010 I/DEBUG ( 803): 44dafd84 7fffffff
06-20 04:42:48.010 I/DEBUG ( 803): 44dafd88 400091e8 /dev/ashmem/dalvik-heap (deleted)
06-20 04:42:48.010 I/DEBUG ( 803): 44dafd8c 400091e8 /dev/ashmem/dalvik-heap (deleted)
06-20 04:42:48.010 I/DEBUG ( 803): 44dafd90 81da5608 /system/lib/libdvm.so
06-20 04:42:48.010 I/DEBUG ( 803): 44dafd94 00000001
06-20 04:42:48.010 I/DEBUG ( 803): 44dafd98 fffffe84
06-20 04:42:48.010 I/DEBUG ( 803): 44dafd9c fffffe7c
06-20 04:42:48.010 I/DEBUG ( 803): 44dafda0 00002710
06-20 04:42:48.010 I/DEBUG ( 803): 44dafda4 400091f4 /dev/ashmem/dalvik-heap (deleted)
06-20 04:42:48.010 I/DEBUG ( 803): 44dafda8 400091f8 /dev/ashmem/dalvik-heap (deleted)
06-20 04:42:48.010 I/DEBUG ( 803): 44dafdac 81d2033c /system/lib/libdvm.so
答案 0 :(得分:0)
从日志中我可以看到您使用的是Android 2.3(Gingerbread)。实际上在垃圾收集期间此版本中存在错误。这就是为什么我认为有Android本机库崩溃。
请在此处查看类似问题 https://groups.google.com/forum/#!topic/android-ndk/k6rWjsrs_z0
解决方法 - (取自上述链接): 解决方法是以原子方式存储对象数组元素。在里面 Bionic C库,bcopy例程是单独实现的 memmove,并且非常偶然地,原子地移动字大小的值。 此提交将System.arraycopy切换为使用bcopy而不是 的memmove。