apps

iPhone Crash Reports – use symbolicatecrash

Wednesday, November 3rd, 2010 | apps, code hacking, iphone / objective-c | No Comments

iPhone Crash Reports: the mobile developer’s key to debugging what went wrong in a user’s device interacting with your app.

While debugging tonight, I found the report crazy symbolicated (i.e. all the states were replaced with the memory locations). To de-symbolicate, use the tool symbolicatecrash, a fun unix script designed to :

  1. take the crash report
  2. combine with the dSym file generated from your release build (you kept it right?)
  3. output a de-symbolized, readable file

I found my symbolicatecrash here:
Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks
/DTDeviceKit.framework/Versions/A/Resources/symbolicatecrash

After some advice online, I copied it into my /usr/local/bin folder:
sudo cp /Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks
/DTDeviceKit.framework/Versions/A/Resources/symbolicatecrash /usr/local/bin

Then put the two files together and run a statement like this (names have been changed to protect the app I debugged):
symbolicatecrash test.crash test.app.dSYM > report-with-symbols.crash

And you have readable crash files!

One, note, I ran into this error:
Can’t understand the output from otool

To fix that, open up your symbolicate crash, and replace this line (around line 301):
die “Can’t understand the output from otool ($TEST_uuid -> ‘$otool -arch $arch -l $path’)”;

with this:

#die “Can’t understand the output from otool ($TEST_uuid -> ‘$otool -arch $arch -l $path’)”;
print “Can’t understand the output from otool ($TEST_uuid)”;

References:

  • http://efreedom.com/Question/1-1207223/iPhone-SDK-30-Symbolicatecrash-Getting-Along
  • http://www.anoshkin.net/blog/2008/09/09/iphone-crash-logs/
  • http://furbo.org/2008/08/08/symbolicatifination/
Share
Subscribe

archives