How to symbolicate Mac OSX crash reports issued by Apple? How to symbolicate Mac OSX crash reports issued by Apple? xcode xcode

How to symbolicate Mac OSX crash reports issued by Apple?


You can use the atos command to get the line number where the app crashed.

Heres a quick guide:

  1. Create a directory for your working files
  2. Open Xcode, select Window->Organizer, goto the Archive tab and find the version of your app that experienced the crash.
  3. Right click on the app archive and select "Show in Finder"
  4. Right click on the .xarchive, select "Show Contents" and find the AppName.dSYM directory and the app and copy them to your working folder
  5. Copy the stack trace to your working folder
  6. Open terminal and change to your working folder. An ls should show YourApp.app YourApp.app.dSYM stacktrace.txt
  7. Open your stack trace in TextEdit. Your going to need to find the Code Type from the header (system architecture - eg. X86-64) and the addresses of the crash. Search through the threads to find the one that crashed (it will say something like "Thread 2 Crashed") then find your objects. You need the two addresses (hex numbers) from that line to get the code line.
  8. Once you've got all the information you need to run the following in the terminal:

    atos -o YourApp.app/Contents/MacOS/YourApp -arch x86_64 -l [load-address] [address]

For example, heres an extract from a stacktrace:

Process:         MyApp [228]Path:            /Applications/MyApp.app/Contents/MacOS/MyAppIdentifier:      uk.co.company.appVersion:         1.0 (1)App Item ID:     774943227App External ID: 218062633Code Type:       X86-64 (Native)Parent Process:  launchd [154]Responsible:     MyApp [228]User ID:         501Date/Time:       2013-12-17 10:20:45.816 +0100OS Version:      Mac OS X 10.9 (13A603)Report Version:  11Anonymous UUID:  7AA662B1-7696-A2C5-AF56-9D4BA2CE9515Crashed Thread:  2Exception Type:  EXC_CRASH (SIGABRT)Exception Codes: 0x0000000000000000, 0x0000000000000000<snip>Thread 2 Crashed:0   libsystem_kernel.dylib          0x00007fff8b95a866 __pthread_kill + 101   libsystem_pthread.dylib         0x00007fff8bf4f35c pthread_kill + 922   libsystem_c.dylib               0x00007fff87571bba abort + 1253   libsystem_malloc.dylib          0x00007fff897ae093 free + 4114   uk.co.company.app           0x0000000103580606 0x10356e000 + 752705   uk.co.company.app               0x00000001035803da 0x10356e000 + 747146   com.apple.Foundation            0x00007fff8d00970b __NSThread__main__ + 13187   libsystem_pthread.dylib         0x00007fff8bf4e899 _pthread_body + 1388   libsystem_pthread.dylib         0x00007fff8bf4e72a _pthread_start + 1379   libsystem_pthread.dylib         0x00007fff8bf52fc9 thread_start + 13

I can see that the "Code Type" is x86_64, that Thread 2 crashed, and that on line 4 my code was running so we have the addresses we need. Using this information I run the following:

$ atos -o MyApp.app/Contents/MacOS/MyApp -arch x86_64 -l 0x10356e000 0x0000000103580606

This returns:

got symbolicator for MyApp.app/Contents/MacOS/MyApp, base address 100000000obj_free (in MyApp) (somefile.c:135)

Telling me my app crashed at line 135 of somefile.c


@inkjet 's comment above deserves its own answer. He built an app that does a full symbolication from your dsym and .crash file.

A free alternative to Sumbolon that I made: bch.us.to/apps/macsymbolicator — It uses atos in the same way described by Rich Able below. – inket Dec 24 '13 at 4:39

putting it all together:

  1. download Mac Symbolicator from here

  2. Open Xcode, select Window->Organizer, goto the Archive tab and findthe version of your app that experienced the crash.

  3. Right click on the app archive and select "Show in Finder"

  4. Right click on the .xarchive, select "Show Contents" and find theAppName.dSYM directory

  5. Drag your .crash file and AppName.dsym to Sumbolon

  6. Magic happens


this link

this link explains everything to symbolicate the crash log with the line no of crash. you just need to have .dsyms file, .app file and crash log in same folder

i looked around and find nothing better than this. so i am posting it by hoping this will help others.