As I’ve mentioned before, my background is in software testing. I’ve made a career out of making software crash. You may think your app is flawless – that it can’t possibly crash. Wait until you hand it off to someone else. If that person is sitting right next to you, you may be able to walk through the steps in the debugger in the simulator and figure out what happened. But if that person is someone who downloaded your app from iTunes – or worse, a whole lot of people who bought your app from iTunes – and it only crashes on the actual device – then things will get a lot more complicated.
Reproducing a Crash
When a professional software tester, such as myself, crashes a product our job is to try to reproduce the crash and write up detailed steps on how we did it. But when the product crashes in the field customers aren’t so helpful. Quite often they will tell you that they have no idea how the product crashed, or they don’t have the patience to try to reproduce it. Hopefully you will at least be able to get them to give you a log. What log is that you may wonder? Is this something that you build in to your product? It could be – but I’m talking about the crash log that the iPhone will (hopefully) generate automatically and replicate to their desktop via iTunes.
A great article on where the crash logs are located and how to process them can be found here:
http://www.anoshkin.net/blog/2008/09/09/iphone-crash-logs/
In that article you will find out how to use a very useful tool: symbolicatecrash . Pay close attention to the instructions on generating and keeping a dSYM file when you release an app.
The article also contains a few useful links:
- http://developer.apple.com/tools/xcode/symbolizingcrashdumps.html
- http://developer.apple.com/mac/library/technotes/tn2004/tn2123.html
- http://furbo.org/2008/08/08/symbolicatifination/
For debugging apps you may find these articles useful as well:
- http://cocoawithlove.com/2008/10/debugging-tips-for-objective-c.html
- http://siliconbased.wordpress.com/2009/08/19/iphone-sdk-gdb-debugging-cheat-sheet/
Tags: crash, dSYM, log, symbolicatecrash