App suddenly dies

321 views
Skip to first unread message

niels

unread,
May 31, 2011, 2:52:54 AM5/31/11
to android-ndk
Hi all,
I'm currently developing an application that integrates a native
library using NDK. JNI calls are made in both directions. After some
time running, the app is suddenly killed with a segmentation fault.

In LogCat I see no stack trace but only the following output:
05-29 17:36:11.008: DEBUG/Zygote(31968): Process 11816 terminated by
signal (11)
05-29 17:36:11.008: INFO/ActivityManager(31973): Process com.xxx (pid
11816) has died.
05-29 17:36:11.012: INFO/WindowManager(31973): WIN DEATH:
Window{484c4b60 com.xxx/com.xxx.MainActivity paused=false}

Normally if a provoke a segmentation fault, I see a full stack trace.
I therefor don't understand, why the system behaves different here. I
appreciate each idea on how to start investigating.

Best regards,
Niels

PS: I'm using NDK r5b. My development device runs with Android 2.2.1.

niels

unread,
Jun 6, 2011, 10:43:32 AM6/6/11
to android-ndk
I finally found the source of my issue. There was an endless recursion
in my program and therefor the application produced a call stack
overflow. Unfortunately android simply kills the program with signal
11 and doesn't print any additional information.

Is this a bug in Android or is there no chance to get the stack trace
after a stack overflow?

Regards,
Niels

PS:
Easily reproducible with the following native method void bla()
{ bla(); }
Reply all
Reply to author
Forward
0 new messages