One of my apps (release version) was unresponsive, so I had to force-quit it.
OS X presented a Hang report (no crash report), which I copied to a *.crash file.
I'm aware of I can use services such as HockeyApp or atos
directly to symbolicate Crash Reports, but how can I symbolicate Hang reports for OS X apps?
After some time, I found out how to handle the Hang reports, which are slightly different from normal crash reports. Here's what I did:
Show Package Contents
.*.app
fromProducts
and the corresponding*.dSYM
file from thedSYMs
directory into a new folder, e.g., on your Desktop. You will have a MyApp.app and a MyApp.app.dSYM in the new folder. The naming of the files is important.ls
into the new folder via the Terminal.Now to use the
atos
tool ('convert numeric addresses to symbols of binary images or processes'), we need to first determine the load address of your app at runtime, and the address of the stack frame while the app was hanging.Open the Hang report, and find a line which says
Binary Images:
somewhere below theHeaviest stack for ...
line. In my case this looks similar to:The address
0x107b0f000
surrounded by ** is our load-address, which you should copy.Next, we need to find the addresses we want to find symbol information for, that is, get the actual method signatures and the code lines, which led to the hang. Therefore, look up your app's name in the stack at the beginning of the Hang report, below 'Heaviest stack':
At the end of this example stack trace, you find MyApp listed twice. Copy both addresses,
0x108b1e5f7
,0x108b1add8
, and close the report.Now we are ready to use
atos
. In the Terminal enter the following and press Return:atos
will symbolicate the addressess using the *.dSYM file within the same directory and hopefully output something like:Yay, that looks promising! If
atos
outputs the same addresses you've put it, instead of code lines, something went wrong. The top source for errors here are probably wrong memory addresses, so make sure, you've chosen the right ones.Let me know if you have further questions (@raffael_me).