Slides for my talk at Oredev: http://oredev.org/2015/sessions/crash-fast-square-s-approach-to-android-crashes
The Square Register Android app has few crashes. Getting there requires a systematic approach: coding defensively, gathering information, measuring impact and improving architecture.;This talk presents our concrete steps towards lowering the crash rate, from the general philosophy to the tools we use, together with real crash examples.
16. * line numbers => checkout correct version of sources
* Smart stacktrace => stupid
17. * Stacktrace: quick fix of simple error
* Who started animation, why?
* Stacktrace on server: each frame is a layer
* Callback => loss of info. Stacktrace not enough.
19. * Associate customer id to crash
* Best is to ask customer what they did.
* Great for alpha / internal testing.
20. * Startup is the worst. Crash after work is second.
* Asking for feedback channels frustration, avoids 1 star reviews.
21. * Custom crash dialog that asks for feedback.
* Good idea: offer a link to contact support
* Emotional connection to customer.
22. 1
2
3
4
* Can’t ask for feedback while crashing: display popup on restart.
* Risky: what if crash on restart. Don’t double restart. Maybe crash dedicated activity + different process.
* Twitter & Fb seem to do that.
23. Static info
* diff UI, diff code path => isTablet helps identify problem
* isTablet: sw600dp
* app version number + SHA version numbers for dev builds
24. * Picture of what the screen look like at time of crash.
* Bitmap? Too big. Upload description of view hierarchy.
36. Offensive programming
Crash Fast
2
1
* Detect problems early
* Complain as loudly as possible
* Quality of code increases
* If you can’t understand, make the problem happen earlier, and ship it.
37. Exception Grouping
* Exceptions thrown by a common Preconditions class might be grouped together in the crash reporting tool.