Rajat Jaswal
Rajat Jaswal

Reputation: 1

How to use ndk-stack in Android Studio 1.3

I keep getting the fatal signal 11 error in my app. I've been trying to debug this error by calling the ndk-stack tool from the terminal window in Android Studio 1.3 but to no avail. I've downloaded and linked the ndk platform successfully already.

My question is, what command do i have to enter into the terminal so as to get a readable output. I don't know where the symbols file is and I'm unable to pull the tombstone from my device for some reason so a solution using the below output would be great.

Also I'm using the NDK only for this specific debugging purpose. I've built my app using java only.

08-13 18:27:52.010  25202-25214/? A/libc﹕ Fatal signal 11 (SIGSEGV), code 2, fault addr 0xaec77ac0 in tid 25214 (FinalizerDaemon)
08-13 18:27:52.112      186-186/? I/DEBUG﹕ *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-13 18:27:52.112      186-186/? I/DEBUG﹕ Build fingerprint: 'google/hammerhead/hammerhead:5.1/LMY47I/1767468:user/release-keys'
08-13 18:27:52.112      186-186/? I/DEBUG﹕ Revision: '11'
08-13 18:27:52.112      186-186/? I/DEBUG﹕ ABI: 'arm'
08-13 18:27:52.112      186-186/? I/DEBUG﹕ pid: 25202, tid: 25214, name: FinalizerDaemon  >>> com.exampleapp <<<
08-13 18:27:52.112      186-186/? I/DEBUG﹕ signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xaec77ac0
08-13 18:27:52.121      186-186/? I/DEBUG﹕ r0 aec2a640  r1 00000020  r2 7463656a  r3 aec2cc60
08-13 18:27:52.121      186-186/? I/DEBUG﹕ r4 aec2a640  r5 aec77ac0  r6 130a8440  r7 ffffffff
08-13 18:27:52.122      186-186/? I/DEBUG﹕ r8 6fc735b8  r9 b4a37400  sl 1314a850  fp 130a8440
08-13 18:27:52.122      186-186/? I/DEBUG﹕ ip b6e18e2c  sp b3c67a68  lr b6e0c3b1  pc aec77ac0  cpsr 60070010
08-13 18:27:52.122      186-186/? I/DEBUG﹕ backtrace:
08-13 18:27:52.122      186-186/? I/DEBUG﹕ #00 pc 00077ac0  [anon:libc_malloc]
08-13 18:27:52.122      186-186/? I/DEBUG﹕ #01 pc 000223af  /system/lib/libbinder.so (android::Parcel::freeDataNoInit()+22)
08-13 18:27:52.122      186-186/? I/DEBUG﹕ #02 pc 00022409  /system/lib/libbinder.so (android::Parcel::~Parcel()+4)
08-13 18:27:52.122      186-186/? I/DEBUG﹕ #03 pc 000819a3  /system/lib/libandroid_runtime.so
08-13 18:27:52.122      186-186/? I/DEBUG﹕ #04 pc 0001881d  /data/dalvik-cache/arm/system@[email protected]

Upvotes: 0

Views: 1855

Answers (1)

ADD
ADD

Reputation: 754

Navigate to the NDK root directory using command prompt, create a new file named log.txt, paste there the debug log and then execute this command replacing the example path (path\to\your\project\MyProject\myprojectname) with the correct one:

ndk-stack.exe -sym C:\path\to\your\project\MyProject\myprojectname\src\main\jniLibs\armeabi -dump log.txt

Upvotes: 2

Related Questions