Xcode 4 failure to symbolicate Crash Log
Solution 1
Further to coob's answer, I find adding these directories to Spotlight's ignore list (System Preferences → Spotlight → Privacy) helps:
-
~/Library/Developer/Xcode/DerivedData/
(Xcode 4 build artefacts) -
~/Library/Application Support/iPhone Simulator/
(file system for the iPhone Simulator)
Like this:
(See this blog post for additional detail.)
Update: from a comment by joerick: "This works, but it also meant that Instruments.app couldn't find the debug symbols, so I had to remove DerivedData from the Privacy list to do some profiling." - bear this in mind if you use Instruments.
Solution 2
For me, neither the line 323 edit nor the Spotlight exclusions fixed it. So I tracked down the issues in symbolicatecrash
and published a patched version on github. Just replace /usr/local/bin/symbolicatecrash and your iOS crash reports will start symbolicating again.
This patch may not work for Mac apps, as it makes assumptions about the structure of the .xcarchive directory which don't appear to hold for desktop apps.
Edit: you may still have problems if Spotlight hasn't indexed your archives. You can get force an index by running the following in a terminal:
mdimport ~/Library/Developer/Xcode/Archives/
More info on troubleshooting here.
Solution 3
The symbolication script is having an issue finding the right binary/dSYM. It uses Spotlight to do this and often cocks up. Here's a few things to try:
Make sure your .app doesn't have a space in it.
It may be finding the version of your app installed on the simulator (backwards, but it sometimes does this for me). Reset your simulator.
Clear your build directory.
Solution 4
I had the same issue today. From my research on the web, there is an issue with the armv6 libraries that cause the symbolicate process to fail. I found the answer in the dev forums here.
For those without access, you need to create a copy of the symbolicatecrash
script from /Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources/
. Edit the file and replace the 'die' on line 323 with a 'print' (this is why it's not working, the script fails here).
Then run symbolicatecrash
against your crash log. You'll see the error from line 323, but then it will symbolicate all your lines and variables. It still fails for the system libraries, but it give enough information to fix your own bugs.
Hope this helps.
Andrei Neacsu
Updated on September 13, 2021Comments
-
Andrei Neacsu over 2 years
I have just updated my Xcode to X.Y.Z. Now I have a problem with the symbolication of the crash logs received from my tester and even from my phone too.
When I build the AdHoc distribution I am using the "Arhive" scheme, then I create the *.ipa file singing it with my developer credentials.
Is this the issue? And I can't find the dSym files for these AdHoc builds.
-
Andrei Neacsu about 13 years@coob, Thank you for your answer. My app doesn't have any spaces in it's name. I simply can not find the dSym file after it finishes building the archive. If I reveal in Finder the application archive I just find a .xcodearchive file. No dSym or any other files.
-
Alastair Stuart about 13 yearsAre you using XCode 3 or 4? I'm not familiar with 4, when I 'Reveal in Finder an archived application' on XCode 3 it shows me a directory like '1DE8BA58-B733-4FA6-88E0-8F9F71297070.apparchive' in '/Users/al/Library/Application Support/Developer/Shared/Archived Applications' which has the app, a plist and the dsym inside.
-
David about 13 yearsXCode 4 puts it in ~/Library/Developer/Archives. Then a directory by date, then an .xcarchive bundle. In finder, control-click to show package contents. dSYM is within dSYMs directory. App is within Products/Applications. All that said, I can't get XCode 4.0.1 to symbolicate a new crash log.
-
Andrei Neacsu about 13 years@David, So let me understand this, you encountered this issue too?
-
David about 13 yearsYes. I am having this problem. I was able to view crash logs fine with XCode 3.x but cannot with 4.0.1. I just did a test forcing a crash in my app. Does not symbolicate. I've opened a thread on the Apple developer forums.
-
Andrei Neacsu about 13 years@David, Please, would you post back here what you find out on the Apple developer forum?
-
Nic about 13 yearsI have had some troubles with XCode 4.0 since it doesn't archive the same way as Xcode 3. It creates an xarchive, I then have to create a .ipa, and -as it was the way I did things in the past- pulled out the .app package from this to send to my tester. I think maybe xcode doesn't find the dsym since it is internal to the xarchive package itself.
-
Jonathan about 13 yearsI can confirm that steps outlined here should solve the problem short term, i've posted about it on the Apple Dev forums also. Simon's suggestion about excluding these folders from spotlight is also a good long term suggestion
-
Jonathan about 13 yearsThis is a good idea, till a proper fix is in place. I've filed a bug report with Apple, so we'll see how it develops.
-
Simon Whitaker about 13 years@Jonathan - yeah, this is definitely an interim fix. Hopefully Apple will crack this in the next 4.5GB patch. :-)
-
Dave Dunkin about 13 yearsI had to add "~/Library/MobileDevice/Archived Applications" for it to work.
-
joerick about 13 yearsThis works, but it also meant that Instruments.app couldn't find the debug symbols, so I had to remove DerivedData from the Privacy list to do some profiling.
-
peppy about 13 yearsThis worked for me while the Spotlight/die changes didn't. Saved a lot of fiddling; Thanks a lot. Do not that you will need to replace symbolicatecrash at the full path if you want it to work in xcode (
/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources/
) -
Chris Miles about 13 yearsRather than messing with Spotlight preferences I deleted all builds of the app in question from the above recommended directories and symbolication worked again for that app. I prefer this than potentially breaking Instruments and any other tools. Cheers!
-
Adam almost 13 yearsAnd what do you do if your app DOES have a space in it? e.g. app is already live on the app store, I have a crash report, but Xcode refuses to symbolicate it.
-
Adam almost 13 yearsThis didn't work for me - and deleting the DerivedData directory didn't work either. Seems to be more bugs in Xcode4 relating to this symbolication :(
-
knuku almost 13 yearsYour custom symbolicatecrash made my day while Spotlight exceptions did nothing. Nevertheless thanks everyone for all the useful answers!
-
cduhn almost 13 yearsWarning: When I tried using this script it symbolicated my .crash file, but the symbols were all wrong. The methods shown in the stack came from entirely different parts of the code that were unrelated and out of context. I was ultimately able to get properly symbolicated output by copying my .app and .dSYM files out of my .xcarchive and placing them along side the crash report. I verified that Spotlight could find these files, then I dragged the crash report into organizer.
-
AndrewCr almost 13 yearsI had to delete the "builds" directory after adding the above spotlight includes. Running the symbolicator from the command line (/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources/symbolicatecrash) will show you where it's looking when it chokes.
-
Dmitry Shashlov over 12 yearsGreat job, thanks a lot! Now all my crash reports symbolized even in XCode 4.
-
Jay over 12 yearsApple removed that link ... ARGH!!
-
SAHM over 11 years@Adam did you find a way to symbolicate a crash report from an app on the app store that has a space in the name? I also have an apostrophe. Having a heck of a time getting this working.
-
Adam over 11 years@JPK - No, I didn't. And Symbolicate STILL DOES NOT WORK in Xcode 4.5.x (it worked for 2 weeks, then stopped and has never worked since) - Apple refuses to fix it properly. They rely on their (badly broken) "index the whole hard disk" search demon, that is slow and badly written. And they provide no alternatives. ARGH!
-
SAHM over 11 years@Adam Thanks. I have an app that I had to pull off of the app store.. it is crashing on startup on some users devices and I absolutely can't reproduce it no matter what I do. It is a Christmas app that I work on all year, and it is usually featured by Apple. Apple DTS responded once, telling me to do something I had already done, and I responded back and haven't heard back from them. I have crash logs that could help but I can't read them. It is a helpless and hopeless feeling, as my family depends on this income and it is just..gone. What's worse is that users who love the app have lost it.
-
Nianliang over 11 years@cduhn's comment should be an answer! it works on xcode 4.5.1 with osx 10.7! I've tried many other methods but all failed.