15
Oct
08

Symbolication

Today we have a good post for your attention on how to diagnose iPhone crashes in the wild after the fact. Salient points are where the user can find their crash logs from the iPhone:

Whenever you synchronize your iPhone or iPod Touch, all the crash logs are transferred to your computer. Here are their locations:

  • Mac OS X :~/Library/Logs/CrashReporter/MobileDevice/<DEVICE_NAME>
  • Windows XP: C:\Documents and Settings\<USERNAME>\Application Data\Apple computer\Logs\CrashReporter/<DEVICE_NAME>
  • Windows Vista: C:\Users\<USERNAME>\AppData\Roaming\Apple computer\Logs\CrashReporter/MobileDevice/<DEVICE_NAME>

The log file names start with application name and have the extension “crash”. They are just plain text files and can be sent by e-mail in original or zipped form, or even copy-pasted into your e-mail program.

And then when your angry user sends you that, you can apply the ’symbolicatecrash’ script — the usage of which is described here by Craig Hockenberry — to turn the rather meaningless trace of function addresses and offsets in the raw crash log into a much more helpful list of function names and line numbers. And the only trick on your side is

To add symbols to the crash log you need the dSYM file generated by the linker when you compiled your application for AppStore. In other words, when you build for AppStore you should keep the dSYM package in a safe place backed up by Time Machine. This is very important. You should keep a copy of the dSYM for each version of your application ever shipped.

which is a pretty darn solid idea in any case — matter of fact, I’d say every build shipped to customers and its symbolics file should be in your svn (or whatever) revision control. You never know what minor change to the System or your tool chain in subsequent updates will make builds from source just that little bit different after the fact that make it impossible to reproduce a problem!


Leave a Reply