Android NDK奇怪崩溃

时间:2014-10-03 18:17:21

标签: android android-ndk segmentation-fault

Android NDK出现问题。我的应用程序因错误11而崩溃,但问题是堆栈转储毫无意义。

********** Crash dump: **********
Build fingerprint: 'samsung/p4noterfub/p4noterf:4.1.2/JZO54K/N8000UBCML2:user/release-keys'
pid: 27557, tid: 27557, name: com.nirai.app  >>> com.nirai.app <<<
signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 5d2b601c
Stack frame #00  pc 000046d2  /system/bin/linker
Stack frame #01  pc 00005c3b  /system/bin/linker
Stack frame #02  pc 0004f90d  /system/lib/libandroid_runtime.so
Stack frame #03  pc 0001df30  /system/lib/libdvm.so (dvmPlatformInvoke+112)
Stack frame #04  pc 0004d183  /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+394)
Stack frame #05  pc 00027360  /system/lib/libdvm.so
Stack frame #06  pc 0002bc68  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+180)
Stack frame #07  pc 0005fbb7  /system/lib/libdvm.so (dvmInvokeMethod(Object*, Method const*, ArrayObject*, ArrayObject*, ClassObject*, bool)+374)
Stack frame #08  pc 00067165  /system/lib/libdvm.so
Stack frame #09  pc 00027360  /system/lib/libdvm.so
Stack frame #10  pc 0002bc68  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+180)
Stack frame #11  pc 0005f8f1  /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+272)
Stack frame #12  pc 00049773  /system/lib/libdvm.so
Stack frame #13  pc 0004c169  /system/lib/libandroid_runtime.so
Stack frame #14  pc 0004d2cb  /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, char const*)+390)
Stack frame #15  pc 00000dcf  /system/bin/app_process
Crash dump is completed

没有引用我的lib(libtest.so),所以我现在迷路了!

额外信息:

NDK r8d
API 9
Testing on real unrooted device (emulator hangs with no crash)

1 个答案:

答案 0 :(得分:0)

错误似乎发生在System.load - 你的 NDK r8d真的很旧(~2012),很多bugs were fixed since then, strongly suggest you update到最新的NDK版本r10b并尝试使用新的工具链重建您的应用。