Hello Everyone; Hows your developments going? Im sure you enjoy it as much as i do; Its really a fun; Today's menu is related to iPhone Applications; We often notice that iPhone/iPod/iPad applications hangup or exit abnormally; It means the running application has been crashed due to some unknown reason; It really annoy the users and no one want to even use them; This thing also annoy the developers and they want to know the reason why it get crash at particular point; In such scenarios, the device generates a log file that called crash report; It holds all the information about the reason that leads the application to crash; These reports are a vital developer's tool to help squash bugs and improve their software; The iPhone OS stores crash reports on the iPhone or iPod touch whenever an app crashes, and those get backed up whenever the device is synced with iTunes; Steps to fetch crash reports (User End) - Sync your iPhone to iTunes. - Find the crash logs on your computer.  Here is where they’re located;
  • 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\Windows 7:: 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”; The logs themselves are just text files, so you can open them in your text editor and cut&paste, or (preferably) attach them to an email to sent to developers; A typical crash report looks like this (if you open it in text editor) Here <application name> is the name of your application that crashed; Steps to symbolicate crash Report; (Developer End) Symbolication is a process of decoding the crash report to find out the exact class name and method name that creates problem; You can notice in above image that there were different thread that were running parallel and the 2nd line tells us which thread crashed; After decoding the crash report , you will go through that thread entries to find out your classes/method; There is a script available in your mac machine for symbolication process; You can find that script at /Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Plug-ins/iPhoneRemoteDevice.xcodeplugin/Contents/Resources/symbolicatecrash /usr/local/bin/ If you unable to find it, I have upload it at following url; unzip it and put at your preferable location; http://dl.dropbox.com/u/18976202/symbolicatecrash.zip Note: IT IS VERY IMPORTANT THAT YOU SAVE YOUR BINARY FILE (APP FILE) ALONG WITH dSYM FILE WHEN YOU SHIP YOUR APPLICATION; WITHOUT HAVING THESE FILES YOU ARE NOT ABLE TO DECODE THE CRASH REPORTS; Its time to start symbolication; - Copy your crash report, .app file and .dSYM file along with downloaded scrip (Put everything in one directory) - Open your terminal and move to the directory where you copy download script; - execute following commad ./symbolicatecrash -A -v <crashReportName> <dSYM file name> for example if your application name is myGame, then your binary file name would be myGame.app and your dSYM file would be myGame.app.dSYM. The format of crash report name is as follow applicationName_yyyy-mm-dd-hhmmss_deviceName.crash Where yyyy_mm_dd is date formate .i.e. 2011-05-10 and hhmmss is time formate i.e. 085655. This timestamps describes when a particular application crashed at user's device; deviceName is a name user chose for his/her device; So you will execute this command to symbolicate the crash report; ./symbolicatecrash -A -v myGame_2011-04-26-085655_Ans-iPhone.crash myGame.app.dSYM I'm sure you have now clear idea about different parts of this command; The outcome of crash report will replace binary address of your methods and classes names with actual methods and classes names where the application crashed; It will also tell you the exact line number where you got problem;

By looking the highlighted area in red, isn't much easy to know where the problem is? Yes it is; Feel free to comment and suggestions; Happy Development; – This post belongs to N-FAQ category where i post anything i learn new during my work;     N-FAQ = Not-FAQ; You can find my other tutorials in My Tutorial section or in its sub menu;  free counters