Thursday, February 3, 2011

Symbolicate crash logs

Symbolicating of crash logs is the process of converting the HEX addresses into readable symbols (class/method names).
It is helpful to resolve the crashing issues of your application.
The crash logs for live appStore application can be retrieved from iTuneConnect web portal.
And during testing of your application the crash logs are retrieved from device by syncing the device with itune application. After sync. crash logs are stored in system at "~/Library/Logs/CrashReporter/MobileDevice/" for Mac OSx and at "C:\Users\\AppData\Roaming\Apple computer\Logs\CrashReporter/MobileDevice/" for Windows7 PC.

The crash log may seem as below:













Digging about reading the crash logs, here are the steps to get the class/method names in the .crash file.

1. Sync the device with your system.

2. Create a folder on the desktop, say "crashFiles",just to keep all files at one place.

3. Paste AppName.app.dSYM files to "crashFile" folder.
(Note: This file is created through xCode in your release folder)

4. Copy the .symbolicatecrash file in your system from the location "/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources/" & paste the file to "carshFile" folder on desktop.

5. Locate the .Crash file in your system. Following are the paths for .Crash file in different OS.
- Mac OS X : ~/Library/Logs/CrashReporter/MobileDevice/
- Windows XP: C:\Documents and Settings\
\Application Data\Apple computer\Logs\CrashReporter/
- Windows Vista: C:\Users\
\AppData\Roaming\Apple computer\Logs\CrashReporter/MobileDevice/
- Paste the .crash file in "crashFile" on desktop.
6. Start "terminal" from spotlight or Utilities folder in Applictions folder.
7. Run the below command with absolute path to all files:
 - $ symbolicatecrash AppName.crash AppName.app.dSYM > report-with-symbols.crash

OR
 - Drag and Drop symbolicatecrash file on terminal.

 - Drag and Drop .crash file on terminal.

 - Drag and Drop .app.dSYM file on terminal.
8. Now type ">report-with-symbols.crash" and hit enter.

Running above command will create a .Crash file "report-with-symbols.crash" replacing the symbols with more descriptive class/function name to dig in. The generate file may seem like below:






Happy coding...

1 comment:

  1. I came across this tool today that makes this much easier! http://www.mattrajca.com/xsymbolicate/

    ReplyDelete