Most of the errors that occur in my C++ code cause the app to simply exit, with no LogCat output whatsoever, and no message on the device. Null pointers and incorrect use of JNI often produce this result, and needless to say, it makes debugging very hard.
Currently I can get a stack trace with the 'bt' command in ndk-gdb, but not if the crash occurs within the first 2 seconds of startup, because ndk-gdb starts the process and attaches to it after it has started. Plus, ndk-gdb is unreliable, often saying it can't find any symbols, or complaining about nonfatal "SIGILL" errors, for example.
Is there a way to trap the error and print a stack trace, or other information when an app crashes? For example, if there was a SIGSEGV, I'd like to know which address the app was trying to access.
trace.txt
file give something ? I don't remember if his location is : /data/anr/trace.txt
or /data/data/{pkg}/trace.txt
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With