views:

6974

answers:

8

Hey guys,

I'm looking to try and symbolicate my iPhone app's crash reports.

I retrieved the crash reports from iTunes Connect. I have the application binary that I submitted to the App Store and I have the dSYM file that was generated as part of the build.

I have all of these files together inside a single directory that is indexed by spotlight.

What now?

I have tried invoking:

symbolicatecrash crashreport.crash myApp.app.dSYM

and it just outputs the same text that is in the crash report to start with, not symbolicated.

Am I doing something wrong?

Any help would be greatly appreciated, thanks.

A: 

In order to symbolicate crashes, Spotlight must be able to find the .dSYM file that was generated at the same time the binary you submitted to Apple was. Since it contains the symbol information, you will be out of luck if it isn't available.

rpetrich
If you read the question, I stated that I have saved the original dSYM file that was generated at the same time the binary was submitted.
Jasarien
+6  A: 

I also put dsym, app bundle, and crash log together in the same directory before running symbolicate crash

Then I use this function defined in my .profile to simplify running symbolicatecrash:

function desym
{
    /Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources/symbolicatecrash -A -v $1 | more
}

The arguments added there may help you.

You can check to make sure spotlight "sees" your dysm files by running the command:

mdfind 'com_apple_xcode_dsym_uuids = *'

Look for the dsym you have in your directory.

Kendall Helmstetter Gelner
I looked at the mdfind output, and the dSYM file can definitely be seen by spotlight.However, the symbolicatecrash script still doesn't output anything different from the crash report itself. Even using the arguments you provided.
Jasarien
The script should produce some warning text at the beginning if it cannot find the dsym - can you look for that and see what it says?
Kendall Helmstetter Gelner
Also, try adding "." after the command, so it would be "symbolicatecrash -A -v MyApp.crashlog ." . That forces it to look in the current directory if it's not doing so already.
Kendall Helmstetter Gelner
How about "Use of uninitialized value $devToolsPath"
bpapa
Meaning "Can't exec "/usr/bin/xcode-select": No such file or directory at /Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Plug-ins/iPhoneRemoteDevice.xcodeplugin/Contents/Resources/symbolicatecrash line 49."
bpapa
Oops, apparently there is another SO question for that http://stackoverflow.com/questions/1859852/error-while-executing-symbolicatecrash-command-cant-exec-usr-bin-xcode-select
bpapa
And I did all that, and still not working!
bpapa
A: 

Sorry for posting it as an answer and not as a comment due to my current reputation points.

I am having the same problem as Jasarien, symbolicatecrash won't symbolize the crash logs despite doing all what is mentioned above and here: http://developer.apple.com/iphone/library/technotes/tn2008/tn2151.html

Below is the output of symbolicatecrash:

Symbolicating...
13213 characters read.
1 binary images referenced:
  (Use of uninitialized value in print at /usr/local/bin/symbolicatecrash line 754.
)

OS Version 7D11
Arch of Logfile: armv6
0 binary images remain after pruning:

Symbol directory paths:  /Developer/Platforms/iPhoneOS.platform/DeviceSupport/2.0 (5A345)/Symbols /Developer/Platforms/iPhoneOS.platform/DeviceSupport/2.0 (5A347)/Symbols /Developer/Platforms/iPhoneOS.platform/DeviceSupport/2.0.1 (5B108)/Symbols /Developer/Platforms/iPhoneOS.platform/DeviceSupport/2.0.2 (5C1)/Symbols /Developer/Platforms/iPhoneOS.platform/DeviceSupport/2.1.1/Symbols /Developer/Platforms/iPhoneOS.platform/DeviceSupport/2.1/Symbols /Developer/Platforms/iPhoneOS.platform/DeviceSupport/2.2.1/Symbols /Developer/Platforms/iPhoneOS.platform/DeviceSupport/2.2/Symbols /Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.0 (7A341)/Symbols
Finding Symbols:
done.
0 binary images were found.

and, then the crash log follows as it is (without symbols).

Any clue?

Imran Raheem
Try -v flag, an debug from there
DenNukem
A: 

I had to do a lot of hacking of the symbolicatecrash script to get it to run properly.

As far as I can tell, symbolicatecrash right now requires the .app to be in the same directory as the .dsym. It will use the .dsym to locate the .app, but it won't use the dsym to find the symbols.

You should make a copy of your symbolicatecrash before attempting these patches which will make it look in the dsym:

Around line 212 in the getSymbolPathFor_dsymUuid function

212     my @executablePath = grep { -e && ! -d } glob("$dsymdir" . "/Contents/Resources/DWARF/" . $executable);

Around line 265 in the matchesUUID function

265             return 1;
JerryH
A: 

I can only assume that there was an SDK bug that was hard to uncover. Since I asked this question there have been a number of new SDK releases and the problem seems to have gone away.

I'm not doing anything different. The crash logs are symbolicating perfectly now.

Jasarien
Why the downvote? At least have the courtesy to say why.
Jasarien
+16  A: 

With the latest version of Xcode (3.2.2), you can drag and drop any crash reports into the Device Logs section of the Xcode Organiser and they will automatically by symbolicated for you. I think this works best if you built that version of the App using Build & Archive (also part of Xcode 3.2.2)

Alan Rogers
+1  A: 

I've written an article that covers off using the simple tool 'Atos', might be worth a look if you're still having trouble with the Symbolication tool. I found it easier to use and it gets straight to the point.

Take a look here: Deciphering iPhone Crash Logs

Jared Wiltshire
A: 

The Magical XCode Organizer isn't that magical about symbolicating my app. I got no symbols at all for the crash reports that I got back from Apple from a failed app submission.

I tried using the command-line, putting the crash report in the same folder as the .app file (that I submitted to the store) and the .dSYM file:

$ symbolicatecrash "My App_date_blahblah-iPhone.crash" "My App.app"

This only provided symbols for my app and not the core foundation code, but it was better than the number dump that Organizer is giving me and was enough for me to find and fix the crash that my app had. If anyone knows how to extend this to get Foundation symbols it would be appreciated.

AndrewS