Debug Android App Crash - No Info In Logcat, No Info In Console When Attached
Solution 1:
One thing that you might try is setting an uncaught exception handler:
http://developer.android.com/reference/java/lang/Thread.UncaughtExceptionHandler.html
If you error doesn't get trapped here then it is not being thrown on the thread you think it is being thrown on, or the error is occurring outside the scope of the java exception processing mechanism.
Solution 2:
Crashes come in all sorts of forms (especially when you talk about Android). Hence there are a lot of ways of detecting/analyzing them.
1) Logs are usually the first thing to look at. However, you need to be sure that they are turned on for your app (production apps usually have logs turned off), so make sure they your logs actually get printed in logcat and only then look for the crash log.
2) Sometimes you have no access to logs or have no control on the component which is causing the crash. In this case, crash reports on Google Play Store can help you find out what is going wrong. However, that tool is not always easy to use or available to you (self hosted applications are a good example for that). For those cases, tools like Crashlytics are great help at getting your crash data.
3) Some crashes come from native C++ code, those are even harder to pinpoint. I found that Crashlytics and similar tools are a great help when handling with those.
4) Don't forget that sometimes the app is not really crashing, but is "gracefully" shutdown by the OS because it is hogging RAM.
Post a Comment for "Debug Android App Crash - No Info In Logcat, No Info In Console When Attached"