How to symbolicate iPhone Crash Reports; Aasim Naseem, May 10, 2011March 12, 2024 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.zipNote: 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.crashWhere 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; Aasim NaseemI’m an engineer by profession, a blogger and a photojournalist by hobby. Seasonal writer at LAFZ Media UK. I write on different topics and things around us. Contact me at +971.56.126.8842 or Aasim.Naseem@outlook.com iOS Tips & Tutorials ./symbolicatecrash -A -vdSYM filehow to decode iphone crash reporthow to get with crash reportsiphoeiphoniphone app crash reportiPhone App Crash ReportsiPhone Crash LogsiPhone Crash reportsymbolicatesymbolicatecrash
grt work Ans. Your writing style is really simple and descriptive. You directly target the reader’s mind. keep blooging. good work.Reply
search on google and found your post and it solve my prob in first attempt. before i tried using xcode but fail e time. you saved my much time. thx for dis.Reply
Yes you can do this directly from Window->Organizer and by drag-drop crash reports at Cash Report section at left side menu; Infact this the real way to do this; xcode internally calls this scrip and shows the result in main panel screen;Due to some unknown reason (i’m still digging) i was unable to symbolicate the crash reports my client sent to me, using this method; I tried it three different machins having my app file, dSYM file and crash reports together but no gain; The above mentioned method is proven is has been tested on multiple machines with different/same input data;Reply
wao Ans you rock again. you clearly told the whole story. worth to bookmark and share. how you find time to write all such things.Reply
hi Ans, can i decrypt iphone mobile analyzer binary log files with this method ? Ex. filename:”IPHONE 0x00000000.mal.bin” MobileAnalyzer Enable & Disable Codes on Iphone: *5005*MA#[call] - enable MobileAnalyzer (“MobileAnalyzer: enabled=true; fullTrace=false; lowLevelTrace=none”) #5005*MA#[call] - disable MobileAnalyzer (“MobileAnalyzer: enabled=false; fullTrace=false; lowLevelTrace=none”)Reply
Good work but for me don’t work this method. I have the error: “Can’t understand the output from otool (…) at ./symbolicatecrash line 323.” (I have the files .app, .app.dSYM, .crash and symbolicatecrash in the same folder)Any idea? Many thanks AlbertoReply
@alberto: Do one thing;Delete the the application from your simulator, plus build directory from your code base; Then run symbolicate crash again, should work as expected;Infact symbolicatecrash script tries to find .dSYM file and build file using spotlight; In some cases it finds the version of simulator app and start symbolication; Try my hint and let me know if it works;Reply
Thanks for the info.Recently i came to know that the symbolicated crash file is already available under the folder “DeviceName.symbolicated” which is under “MobileDevice” folder. When i open the .crash file, i exactly get the direct output which you ‘ve got at the end.But do you know any other way to decode the remaining address values ? line numbers 8-10 and 15-23 in your case. Please refer to the last screen shot posted by you.Reply
I couldn’t find this directory under MobileDevices; I have “Provisioning Profiles” and “Archived Applications” there;I’m using xcode 4.0 (Build 4A304a) and Max OS 10.6.8;Reply
Thank you for this post; I was wondering if was possible to get a real stack trace from the crash logs. Definitely helpful.Reply
I put everything in one folder, but it doesn’t seem to be able to find the .app file there.Or maybe it does and is missing something else. It says:## Warning: Can’t find any unstripped binary that matches version of /var/mobile/Applications/1659F247-FC72-4718-9F45-D1054CD1FDE5/RK1-3-41.app/RK1-3-41What does it mean by “unstripped binary”?Here’s my command line: ./symbolicatecrash -A -v RK1-3-41_2011-10-30-153308_Bruces-Library-iPad.crash RK-1-3-41.app.dSYMI have RK1-3-41.app and also RK1-3-41.app.dSYM in the directory as well as the crash report (which I removed from the named iPad.Thanks, BruceReply
Seems that your binary and .dSYM file doesn’t match with each other; Sorry for being so late for this reply, I missed it; Pardon me;So did get get the solution?Reply
Hi, Ans! I’m using Hockey and their Hockey App now for ad hoc deployment. Very, very convenient, not too expensive, works fine, impossible to make a mismatch and great support, too. Using Hockey has simplified all this. Thanks for your thoughtful reply.Reply
Bare with me as I was hit in a Hummer vs. Honda accident and have lost some memory. Internets the best thing it’s seems to jog it. I’m or I was an MIS major and have had computers in my blood since 5. I went to Defcon in 1999 by myself and hackers, though hilarious gave me goosebumps. Ive been trying to read this but what I’m not seeing is any jailbroken users thoughts. Saurik, Cydias founder has had a /Syslog dump as well as a pretty remarkable app called, CrashReporter for 2 to 3 years maybe even longer. It allows you to read the crash report or symbolicate it all in the same app. The thing I thought was pretty cool is that its doing it’s jobs even without u looking. I checked the other day and I had I’d guess 135 instances and it’s lists each one by AppName.ipa or .deb or for the rebel jailbreakers, it throws in MobileSubstrate. Now I never had time to truly delve into the inner symphony of IOS before my brain got rocked by Mr. Mid-Life crisis. I really really wanted to though. I will forever be an iPhone junkie for too many reasons to list. The most boring reason of all is it was what got me into UNIX. I’m now seeing though why Jobs Big Brother culture is so terrible for thr majority of us. Anyhow I ramble to much but I don’t give a dam# I will get that degree and stay with computers I just might not be the fastest. Now my main question guys is that CrashReporter is great but it doesn’t take you any further than your apps it sounds excepts it does it in .001 seconds and it’s constantly hoarding these crashes or errors. You go into it and like for me I saw about 50 names of may apps most had one crash or whatever and it gives u the date but one of mine “Sandboxd” had 95!!! So I ask myself why would Apple being Sandboxing anything or are they? Is it just a name? Is this part of mobile substrate? Makes sense right, its basically what mobile substrate does to bypass apple. Well I’d love to show you guys my syslogs/reports/symbolications. I’d love so see what the heck is going on that 95 crashes in a few days started to occurr. BTW I first noticed it when my mobilemail i.e. Email opens but nothing loads it just sits their white screened. Now I’d get frustrated and force it to close. Eventually though I checked thr CrashReporter like I said but not before I used one of the other benefits to jailbreaking, putting it in to Safe Mode. What do you know!!! It works!!! As most problems do, but I need a way to test it before and after or maybe someone out there could teach me how to read these crash reports because thr key to my dilemma is that it’s not mobilemail that’s causing thr problem its “Sandboxd” which I’m pretty sure means mobile substrate which in return means who the heck knows well I don’t. So please any help would be lovely. Thanks for hanging in their.Reply
Hiiiii ans…. I don’t have iPhoneRemoteDevice.xcodeplugin for symbolicate crashlog. The link is provided by you is not working. Can u send me this plugin. ThanksReply
Thanks for writing to me; Yes the link was broken; I have update the post with working link; You can now download it from http://dl.dropbox.com/u/18976202/symbolicatecrash.zip; Let me know If you find any problem;Reply
Hiiiiii ans……. Thanks for that link. I got that symbolicatecrash file, I put all the required files in 1 folder and execute the command for symbolicating but in result i got all the text of crash file on terminal. Please help me to get proper crash details with file name and line number…. ThanksReply
jamesServer:crashlogs prateekverma$ ./symbolicatecrash -A -v CandidMarket_2012-12-27-104326_Cartier-iPad.crash CandidMarket.app.dSYM -bash: ./symbolicatecrash: Permission deniedAs above i kept every thing at one place and run the comment but i am getting Permission deniedReply
Hi, I wonder if I can use the script in Linux. In the perl script it uses the command “atos” to symbolicate the numeric address to function name and line. Thanks.Reply
try this http://www.youtube.com/watch?v=3_duMb8ffLw I’m little busy right now, please check this video if this help you out .. else we shall discuss your problem in detail .. sorry for short reply .Reply
now it says … sudo: ./symbolicatecrash: command not found. Thanks for reply. Help me out whenever you are free.Reply
I thought I should mention and recommend Hockey ( http://hockeyapp.net ). It’s an inexpensive service with a free trial that will take care of all of your symbolication needs and do so much more. Since I’ve been using it, I haven’t had to worry about this sort of stuff at all. I use it for all ad hoc distribution needs as well for myself and my clients. I have no affiliation with them, just a fan, but you can try it out for free and at least get a few crashes symbolicated.Reply
Don’t know whether this will help, but I found this alias I must have made at some time when I did a “spotlight” on symbolicate crash. Perhaps it will help you find the file and let you give an appropriate full path.alias symbolicate=”/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources/symbolicatecrash -v”Reply
It’s awesome in support of me to have a web site, which is useful for my knowledge. thanks adminReply
rror: “DEVELOPER_DIR” is not defined at ./symbolicatecrash line 60. it is giving me this reply…..i have confusion in which i need to see line 60?Reply
Offer huge variety of (VAD) worth added services to the purchasers. You are going to immediately see a food selection that includes different money symbols, elongated hyphens, inverted exclamation factors and many other heroes. v They could be fixed in any comfortable position in the car or truck.Reply