I recently was receiving a NullPointerException crash report in the android market with one of my apps. I was not able to recreate the bug when testing so I thought it may be specific to a device. To solve this issue I included BugSense with my latest release. BugSense has worked reporting other issues and has been very helpful, but I am still getting reports of the original error with the latest version in the Android Market but in BugSense. Does BugSense not work on some devices?
Some details about the crash:
- BugSense is called in my Splash Screen Activity.
- Splash Screen opens the Main Activity.
- Main Activity has an Instance of MyObject.
- MyObject is set when a user clicks an item in a ListView.
- Clicking an item in the ListView opens an AlertDialog.
- MyObject.getName() is called in onCreateDialog.
- Crash Occurs – NPE.
Error doesn’t appear on BugSense Dashboard. User Comments in Android Market state “app is crashing as soon as it opens.” My original thought was the user found a way to open a dialog without clicking on a list item but after seeing the user comment it appears the app is trying to access onCreateDialog before it ever needs to be called.
So my questions: How is it possible for the app to crash without BugSense reporting on it? and Why would onCreateDialog get called before the Activity ever needs it?
I use ACRA to report crashes, and upload them to both Google Docs (the “normal” ACRA way) and BugSense.
Even after exchanging multiple emails with BugSense, and their attempts to fix the situation, I get about 5 times the number of entries in Google Docs than I get in BugSense.
BugSense is silently dropping 4 in 5 reports, most likely because its parsers don’t like the data that the reports contain. Its UI is much more useful than wading through a huge Google Docs spreadsheet, but I can’t trust BugSense because it under-reports so much.