symbolicatecrash failing because it can't find dSYM

Hi,


I'm trying to use symbolicatecrash to read a crash stack I recieved from a user. I kept the dSYM from the build I uploaded to the App Store, but no matter what I do symbolicatecrash wont use it to symbolicate the crash stack.


The reason seems to be that it can't find the dSYM file because Spotlight is only indexing .dSYM files that are stored by Xcode archive. Is it the case that only archived builds can be symbolicated now?


Regards,


Ryan.

First things first, have you verified that the

.dSYM
has the matching UUID? QA1765 How to Match a Crash Report to a Build shows the steps.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Yes, I verified the UUIDs match. The problem that I got stuck on was this command:

mdfind 'com_apple_xcode_dsym_uuids = *'

only finds dSYM files in my Xcode archive so symbolicatecrash says that it can't find the dSYM even though it's sitting right next the .crash file.


Is symbolicatecrash supposed to work for builds that haven't been archived by Xcode?


I'm using Xcode 7.2 (7C68).

You might try this hack / patch to the symbolicatecrash script. Worked for me.


symbolicatecrash patch to help with symbolication problems

The problem that I got stuck on was this command: mdfind 'comapplexcodedsymuuids = *' only finds dSYM files in my Xcode archive so symbolicatecrash says that it can't find the dSYM even though it's sitting right next the .crash file.

What does

mdls
return for your
.dSYM
file? For example, here’s what I see just after creating a new Xcode project and building it for the first time:
$ mdls -name com_apple_xcode_dsym_uuids build/Debug-iphonesimulator/xxx.app.dSYM
com_apple_xcode_dsym_uuids = (
    "9EFB9D85-EE19-3877-9C23-5890CB5E80AE",
    "9ACB0F32-17B1-3A95-8E4D-434A173DF9ED"
)

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

I get this:


mdls -name com_apple_xcode_dsym_uuids Dodgers.app.dSYM

com_apple_xcode_dsym_uuids = (null)


A malformed dSYM file you think?

A malformed dSYM file you think?

That, or Xcode’s

.dSYM
Spotlight importer is not working. Either way, the absence of these attributes explains why
symbolicatecrash
is failing.

On the Spotlight front, you can use

mdimport
to:
  • get a list of the Spotlight importers — You’d expect to see Xcode’s importer (

    uuid.mdimporter
    ) in that list.
  • force a manual import of your

    .dSYM
    with that importer — This has debugging options so you can see what’s happening.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

mdimport -L does list the uuid importer from xcode. I figured it would because if I just create a test project and archive it the dsym does show up when I run mdfind 'com_apple_xcode_dsym_uuids = *', so the system does seem to work when the build is archived with xcode. Unfortunately the build and dsym I have are from a build produced by a build machine that doesn't archive builds (something I should try and fix I think).


I got this output when I tried to manually import the dsym:


UG-iMac:DodgersArchive UG_iMac$ mdimport -d 4 -g /Applications/Xcode.app/Contents/Library/Spotlight/uuid.mdimporter Dodgers.app.dSYM
mdimport loading plugin at path '/Applications/Xcode.app/Contents/Library/Spotlight/uuid.mdimporter' for all files
(Import.Debug:1319) file:/Users/UG_iMac/Desktop/DodgersArchive/Dodgers.app.dSYM plugin:file:///Applications/Xcode.app/Contents/Library/Spotlight/uuid.mdimporter/ /Applications/Xcode.app/Contents/Library/Spotlight/uuid.mdimporter
Trace/BPT trap: 5

(Note: I had to remove some of the output because it had "invalid characters" for this forum)


After running that command the dsym still doesn't show up with mdfind.

It looks like something is crashing doing the import. Do you see a crash log generated?

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

I don't see a crash log in the directory I ran the command from, where would it put such a crash log?

I’d expect to find it in the usual place (

~/Library/Logs/DiagnosticReports
).

btw The best way to check for a crash log is to run the Console app. If a crash log is generated, that fact and the location of the log are recorded in the All Messages section.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Ok, I found the crash report. You can download it from here:


Dropbox Link to Crash File


It looks to me like the null uuids reported by this command:


mdls -name com_apple_xcode_dsym_uuids Dodgers.app.dSYM

com_apple_xcode_dsym_uuids = (null)


Is causing mdimport to crash.

Ok, I found the crash report. You can download it from here:

Thanks.

It looks to me like the null uuids reported by this command:

Actually, I think that’s the other way around: that data is null because the importer has failed.

The importer shouldn’t crash regardless of what the

.dSYM
file looks like. Please file a bug report about this, including the crash log and the
.dSYM
file that triggers the crash. Once you’ve done that, I’d appreciate you posting your bug number here, just for the record.

You may still be able to get your original crash report symbolicated by hacking the

symbolicatecrash
script (preferably a copy!) to bypass Spotlight and find the
.dSYM
manually. It’s not something I’d done before, and my Ruby skills are woeful, but it’s probably the best way forward given this problem.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Bug reporter

25235300

symbolicatecrash failing because it can't find dSYM
 
 
Q