c++ - How to check crash log using android ndk in cocos2d-x -
i use cocos2d-x develop game, after runs in ios, turn around android platform.
but run somewhere in android, , receive error log this:
08-26 10:49:23.823: a/libc(2884): fatal signal 11 (sigsegv) @ 0x0000000c (code=1), thread 2917 (thread-285)
with this, can't fix crash log.
so question how can check stack of crash log?
and in so, there similar questions, none useful answer me.
using ndk-stack read crash logs
i find perfect answer in http://www.cocos2d-x.org/boards/6/topics/20437.
the solution is:
when errors on logcat, saved on $project_path/obj/local/armeabi
$project_path
path cocos2d-x android project. symbolicate messages understandable, can use ndk-stack tool.
open terminal (or cygwin, not sure though) , type in
cd $android_ndk adb logcat | ./ndk-stack -sym $project_path/obj/local/armeabi
where:
$android_ndk
path android ndk
$project_path
path cocos2d-x android project
and try it, , following stack-trace:
********** crash dump: ********** build fingerprint: 'google/soju/crespo:4.1.2/jzo54k/485486:user/release-keys' pid: 2884, tid: 2917, name: thread-285 >>> com.gumichina.allen <<< signal 11 (sigsegv), code 1 (segv_maperr), fault addr 0000000c stack frame #00 pc 0062bfb4 /mnt/asec/com.gumichina.allen-2/lib/liballen.so (cocos2d::ccobject::release()+20): routine release in /users/tangyue/project/crosskaiser-native/application/proj.android/../../cocos2dx/cocoa/ccobject.cpp:82 stack frame #01 pc 006d8094 /mnt/asec/com.gumichina.allen-2/lib/liballen.so (cocos2d::cctouchhandler::~cctouchhandler()+128): routine ~cctouchhandler in /users/tangyue/project/crosskaiser-native/application/proj.android/../../cocos2dx/touch_dispatcher/cctouchhandler.cpp:108 stack frame #02 pc 006d8524 /mnt/asec/com.gumichina.allen-2/lib/liballen.so (cocos2d::cctargetedtouchhandler::~cctargetedtouchhandler()+84): routine ~cctargetedtouchhandler in /users/tangyue/project/crosskaiser-native/application/proj.android/../../cocos2dx/touch_dispatcher/cctouchhandler.cpp:193 stack frame #03 pc 006d8570 /mnt/asec/com.gumichina.allen-2/lib/liballen.so (cocos2d::cctargetedtouchhandler::~cctargetedtouchhandler()+20): routine ~cctargetedtouchhandler in /users/tangyue/project/crosskaiser-native/application/proj.android/../../cocos2dx/touch_dispatcher/cctouchhandler.cpp:193 stack frame #04 pc 0062bff4 /mnt/asec/com.gumichina.allen-2/lib/liballen.so (cocos2d::ccobject::release()+84): routine release in /users/tangyue/project/crosskaiser-native/application/proj.android/../../cocos2dx/cocoa/ccobject.cpp:86 stack frame #05 pc 006aade4 /mnt/asec/com.gumichina.allen-2/lib/liballen.so (cocos2d::ccarrayremoveobjectatindex(cocos2d::_ccarray*, unsigned int, bool)+100): routine ccarrayremoveobjectatindex in /users/tangyue/project/crosskaiser-native/application/proj.android/../../cocos2dx/support/data_support/cccarray.cpp:197 stack frame #06 pc 006aafa0 /mnt/asec/com.gumichina.allen-2/lib/liballen.so (cocos2d::ccarrayremoveobject(cocos2d::_ccarray*, cocos2d::ccobject*, bool)+72): routine ccarrayremoveobject in /users/tangyue/project/crosskaiser-native/application/proj.android/../../cocos2dx/support/data_support/cccarray.cpp:235 stack frame #07 pc 0062fed4 /mnt/asec/com.gumichina.allen-2/lib/liballen.so (cocos2d::ccarray::removeobject(cocos2d::ccobject*, bool)+52): routine removeobject in /users/tangyue/project/crosskaiser-native/application/proj.android/../../cocos2dx/cocoa/ccarray.cpp:295 stack frame #08 pc 006d6c90 /mnt/asec/com.gumichina.allen-2/lib/liballen.so (cocos2d::cctouchdispatcher::forceremovedelegate(cocos2d::cctouchdelegate*)+500): routine forceremovedelegate in /users/tangyue/project/crosskaiser-native/application/proj.android/../../cocos2dx/touch_dispatcher/cctouchdispatcher.cpp:200 stack frame #09 pc 006d7888 /mnt/asec/com.gumichina.allen-2/lib/liballen.so (cocos2d::cctouchdispatcher::touches(cocos2d::ccset*, cocos2d::ccevent*, unsigned int)+1620): routine touches in /users/tangyue/project/crosskaiser-native/application/proj.android/../../cocos2dx/touch_dispatcher/cctouchdispatcher.cpp:449 stack frame #10 pc 006d7b74 /mnt/asec/com.gumichina.allen-2/lib/liballen.so (cocos2d::cctouchdispatcher::touchesended(cocos2d::ccset*, cocos2d::ccevent*)+56): routine touchesended in /users/tangyue/project/crosskaiser-native/application/proj.android/../../cocos2dx/touch_dispatcher/cctouchdispatcher.cpp:507 stack frame #11 pc 0068acb8 /mnt/asec/com.gumichina.allen-2/lib/liballen.so (cocos2d::cceglviewprotocol::handletouchesend(int, int*, float*, float*)+124): routine handletouchesend in /users/tangyue/project/crosskaiser-native/application/proj.android/../../cocos2dx/platform/cceglviewprotocol.cpp:333 stack frame #12 pc 0069340c /mnt/asec/com.gumichina.allen-2/lib/liballen.so (java_org_cocos2dx_lib_cocos2dxrenderer_nativetouchesend+88): routine java_org_cocos2dx_lib_cocos2dxrenderer_nativetouchesend in /users/tangyue/project/crosskaiser-native/application/proj.android/../../cocos2dx/platform/android/jni/touchesjni.cpp:42 stack frame #13 pc 0001de30 /system/lib/libdvm.so (dvmplatforminvoke+112) stack frame #14 pc 0004ce73 /system/lib/libdvm.so (dvmcalljnimethod(unsigned int const*, jvalue*, method const*, thread*)+390) stack frame #15 pc 0004ef8f /system/lib/libdvm.so (dvmresolvenativemethod(unsigned int const*, jvalue*, method const*, thread*)+174) stack frame #16 pc 00027260 /system/lib/libdvm.so stack frame #17 pc 0002bb38 /system/lib/libdvm.so (dvminterpret(thread*, method const*, jvalue*)+180) stack frame #18 pc 0005f5b1 /system/lib/libdvm.so (dvmcallmethodv(thread*, method const*, object*, bool, jvalue*, std::__va_list)+272) stack frame #19 pc 0005f5db /system/lib/libdvm.so (dvmcallmethod(thread*, method const*, object*, jvalue*, ...)+20) stack frame #20 pc 00054193 /system/lib/libdvm.so stack frame #21 pc 00012b90 /system/lib/libc.so (__thread_entry+48): unable open symbol file obj/local/armeabi//libc.so. error (9): bad file descriptor stack frame #22 pc 000122f4 /system/lib/libc.so (pthread_create+172): unable open symbol file obj/local/armeabi//libc.so. error (9): bad file descriptor
Comments
Post a Comment