OS X Crash Log Symbolication
Asked Answered
C

4

8

I cannot symbolicate OS X (not iOS) crash logs from testers and users using XCode 4.6 . The crash logs cannot be dragged into the organizer, and the organizer does not show any crash logs from ~/Library/Logs/DiagnosticReports/, though some logs are in that directory.

Didier Malenfant commented on a previous thread XCode not importing OS X crash log that

The bottom line is quite simple. As of now (Xcode 4.6), OS X crash logs cannot be imported into Xcode. Only iOS ones.

Is this the current state of affairs? It’s hard to imagine that organizations are able to support new OS X software without effective ways to intepret crash reports.

Cary answered 5/7, 2013 at 18:45 Comment(2)
see #6086234Brambly
Thanks. But the answer you cite is more than a year older than the answer I cited above, which contradicts it. Are you routinely symbolicating user-submitted logsin xcode 4.6.?Cary
H
7

If you have a stack trace; for example:

0   com.your_app        0x00000001016191e0 0x1015fb000 + 123360
1   com.your_app        0x000000010161509d 0x1015fb000 + 106653
2   com.your_app        0x00000001016147b9 0x1015fb000 + 104377
3   com.your_app        0x000000010161df81 0x1015fb000 + 143233`

Try the following:

atos -o YOUR_APP.app.dSYM/Contents/Resources/DWARF/YOUR_APP -l 0x1015fb000 0x00000001016191e0 0x000000010161509d 0x00000001016147b9 0x000000010161df81`
Hostage answered 19/4, 2014 at 19:13 Comment(0)
C
3

You can use GDB for Symbolication, Put your release build and your .dSYM file in the same directory open terminal

$ cd directory
$ gdb MyApp.app
(gdb) info line *0x00085f3c  

or you can use atos as suggested by trojanfoe

$cd directory
$atos -o MyApp.app/Contents/MacOS/MyApp
info 0x00085f3c

or

$ cd directory
$ lldb MyApp.app
(lldb) image lookup -v --address 0x1ec4
Chapa answered 21/8, 2013 at 9:44 Comment(2)
Or atos: developer.apple.com/library/mac/documentation/Darwin/Reference/…Pivot
Or lldb :) image lookup -v --address 0x1ec4Pivot
B
2

We had the same problem with our app and I was symbolicating the crash reports manually line by line with atos.

I now tweaked Apple's symbolicate script such that it works with Mac apps and crash reports from PLCrashReporter.

https://github.com/lksnmnn/Symbolicate-CrashReports

How to use it:

Make sure you have all of the following files on your computer:

  1. The crash report: report.crash
  2. The dSYM file of your app: MyApp.dSYM
  3. The executable / app folder of your app: MyApp.app
  4. The improved symbolicate script: symbolicatecrash

Now go in the command line (Terminal) and do the following:

# set the developer directory
export DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer"

# Now run the script
/Path/To/symbolicatecrash /Path/To/report.crash > /Path/To/readable_report.crash

# Use -v for verbose logging.

The script will find your dSYM and your executable and symbolicates as much as it cans. You will now find your symbolicated report in the stated output file readable_report.crash

Build settings:

For proper reports and symbols, set your build settings to this:

Strip Debug Symbols During Copy: Yes
Strip Style: All Symbols
Strip Linked Product: Yes
Beaudoin answered 26/2, 2016 at 11:59 Comment(0)
L
0

I've used MacSymbolicator and Xsymbolicate in cases where I had a dsym and crash report file. They did the job for simply needs, though Xcode's built in crash reporting support has also gotten better, at least for apps sold in the App Store.

Liz answered 8/12, 2018 at 22:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.