Using ndk-stack to read crash logs
Asked Answered
G

1

0

I'm using cocos2d-x v2.1.4 and I have this crash log from logcat:

I/DEBUG   ( 6575): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG   ( 6575): Build fingerprint: 'acer/a500_ww_gen1/picasso:4.0.3/IML74K/1333032611:user/release-keys'
I/DEBUG   ( 6575): pid: 6680, tid: 6680  >>> com.xxxxx.xxxxx <<<
I/DEBUG   ( 6575): signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 5bd10d1f
I/DEBUG   ( 6575):  r0 0000006e  r1 5ceda8ec  r2 00000000  r3 5bd10d1f
I/DEBUG   ( 6575):  r4 00000000  r5 5bb4dfc1  r6 5bd13c38  r7 5ceda8ec
I/DEBUG   ( 6575):  r8 00007530  r9 00000000  10 00000000  fp 5bd13c38
I/DEBUG   ( 6575):  ip 5bd76e4c  sp 5ced9948  lr 5bb4e179  pc 5bb4dfce  cpsr 00000030
I/DEBUG   ( 6575):  d0  0000000000000000  d1  0000000000000000
I/DEBUG   ( 6575):  d2  0000000000000000  d3  000000003f000000
I/DEBUG   ( 6575):  d4  0000000000000000  d5  0000000000000000
I/DEBUG   ( 6575):  d6  0000000000000000  d7  0000000000000000
I/DEBUG   ( 6575):  d8  0000000000000000  d9  0000000000000000
I/DEBUG   ( 6575):  d10 0000000000000000  d11 0000000000000000
I/DEBUG   ( 6575):  d12 0000000000000000  d13 0000000000000000
I/DEBUG   ( 6575):  d14 0000000000000000  d15 0000000000000000
I/DEBUG   ( 6575):  scr 80000012
I/DEBUG   ( 6575): 
I/DEBUG   ( 6575):          #00  pc 0032ffce  /data/data/com.xxxxx.xxxxx/lib/libgame.so
I/DEBUG   ( 6575):          #01  pc 00330176  /data/data/com.xxxxx.xxxxx/lib/libgame.so
I/DEBUG   ( 6575):          #02  pc 00330f68  /data/data/com.xxxxx.xxxxx/lib/libgame.so (curl_mvsnprintf)
I/DEBUG   ( 6575):          #03  pc 00323e2c  /data/data/com.xxxxx.xxxxx/lib/libgame.so (Curl_failf)
I/DEBUG   ( 6575):          #04  pc 0031d39e  /data/data/com.xxxxx.xxxxx/lib/libgame.so (Curl_resolv_timeout)
I/DEBUG   ( 6575):          #05  pc 00329ea2  /data/data/com.xxxxx.xxxxx/lib/libgame.so (Curl_connect)

I can tell from this log that it was caused by a cURL method not properly finishing or something but I want to know which function causes the crash. I tried using ndk-stack but I am getting this result:

********** Crash dump: **********
Build fingerprint: 'acer/a500_ww_gen1/picasso:4.0.3/IML74K/1333032611:user/release-keys'
pid: 6498, tid: 6498  >>> com.xxxxx.xxxxx <<<
signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 5bb71d1f
Stack frame #00  pc 0032ffce  /data/data/com.xxxxx.xxxxx/lib/libgame.so: Unable to locate routine information for address 32ffce in module /Users/xxxxx/Desktop/xxxxx/_projects/xxxxx/xxxxx/proj.android/obj/local/armeabi/libgame.so
Stack frame #01  pc 00330176  /data/data/com.xxxxx.xxxxx/lib/libgame.so: Unable to locate routine information for address 330176 in module /Users/xxxxx/Desktop/xxxxx/_projects/xxxxx/xxxxx/proj.android/obj/local/armeabi/libgame.so
Stack frame #02  pc 00330f68  /data/data/com.xxxxx.xxxxx/lib/libgame.so (curl_mvsnprintf): Unable to locate routine information for address 330f68 in module /Users/xxxxx/Desktop/xxxxx/_projects/xxxxx/xxxxx/proj.android/obj/local/armeabi/libgame.so
Stack frame #03  pc 00323e2c  /data/data/com.xxxxx.xxxxx/lib/libgame.so (Curl_failf): Unable to locate routine information for address 323e2c in module /Users/xxxxx/Desktop/xxxxx/_projects/xxxxx/xxxxx/proj.android/obj/local/armeabi/libgame.so
Stack frame #04  pc 0031d39e  /data/data/com.xxxxx.xxxxx/lib/libgame.so (Curl_resolv_timeout): Unable to locate routine information for address 31d39e in module /Users/xxxxx/Desktop/xxxxx/_projects/xxxxx/xxxxx/proj.android/obj/local/armeabi/libgame.so
Stack frame #05  pc 00329ea2  /data/data/com.xxxxx.xxxxx/lib/libgame.so (Curl_connect): Unable to locate routine information for address 329ea2 in module /Users/xxxxx/Desktop/xxxxx/_projects/xxxxx/xxxxx/proj.android/obj/local/armeabi/libgame.so

Is there a way to get more meaningful information from the stack trace? Or is it because I'm using libcurl which was compiled as static library, and ndk-stack wasn't able to find information about it?

Gauthier answered 8/7, 2013 at 9:8 Comment(2)
just struggled a few days ago with exactly the same problem. ndk-stack not a very useful solution - sometime it's drops out poor output.Avens
did you find better way to anylayze stack trace??Penalize
B
0

you can use VisualGDB , using VisualGDB you can debug your native code in visual studio, you have to install the VisualGDB plugin in visual studio, then you can import your exsisting cocos2d-x Android Eclipse project to visual studio. You can check the following link

http://visualgdb.com/tutorials/android/

I have configured my cocos2d android project to visual studio with the help of VisualGDB, let me know if you face any issue.

Biblicist answered 8/7, 2013 at 13:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.