5

It has been a while since I used symbolicate in XCode and it used to work. Today when I tried this...

  1. Archive my app.
  2. Install the app on my device from XCode. (Just connect the device and run the app in release mode).
  3. Stopped the app from Xcode.
  4. Ran the app on my device (which is connected to the Mac) which of course crashed.
  5. Now when I open Organizer and go to Device logs, it shows a new crash log file.
  6. But it fails to symbolicate the symbols of my app. All Apple library stuff are symbolicated fine.

I searched all over the net, nothing seems to work.

Edit: In the Build Settings if I disable "Strip Debug Symbol During Copy" even for release build, everything works fine. But Xcode should have been able to symbolicate using the dSYM file I guess. I do not want to distribute the app with debug symbols.

Thanks in advance.

abix
  • 287
  • 3
  • 14
  • Does this help: http://stackoverflow.com/questions/5458573/xcode-4-failure-to-symbolicate-crash-log – trojanfoe Mar 09 '13 at 09:40
  • Could you please add some more details on how you exactly proceed in step 2? – Kerni Mar 09 '13 at 10:25
  • Added some more information in the description. Basically I don't do much. Just archive the app from product menu, then run the app on my device, it crashes and crash log appears in the organizer. Unfortunately it cannot symbolicate it. – abix Mar 09 '13 at 10:36

4 Answers4

4

This article will help finding where the problem is: http://support.hockeyapp.net/kb/how-tos-faq/how-to-solve-symbolication-problems

Since you say you run in release mode, the version running on the device is NOT the one that you archived! So if there is a release build already available in the DerivedData directory, it will take that. Otherwise it will create a new build and install that one.

Now there are two possibilities why symbolication doesn't work:

  1. You are doing another release build later on, so the previous build and dSYM get overwritten (see explanation in the link above)
  2. Spotlight doesn't find the dSYM and app binary with the UUID written in the crash report (see explanation in the link above to verify that)

Update: Note regarding stripping symbols: when you don't strip the symbols as mentioned in your edited post, the symbolication is done on the device already. But of course you will be missing the line numbers.

Kerni
  • 15,241
  • 5
  • 36
  • 57
  • I think it is because of the reason 1, the one I am running and the one I archived are not the same. I am basically adding a mechanism for the user to send the crash log (using PLCrashReport) via email. I am not able to test this feature as these logs are not getting symbolicated. – abix Mar 09 '13 at 12:57
  • Check the UUID of an archived build and send search that UUID as described in the linked document to make sure those can be found. As a side note: I recommend using e.g. QuincyKit.net or another hosted service for handling crash reports. Using emails will get a real mess once your app is in the app store and you receive hundreds of these emails. – Kerni Mar 09 '13 at 13:07
  • Thanks Kerni! Upon following the link that you provided carefully it appeared that spotlight was not able to locate the dSYM using the UUID. Running the command "mdimport ." in the product folder immediately resolved the issue. – abix Mar 09 '13 at 17:56
0

Upon following the link given by Kerni in the above solution, I found that it was spotlight which was not able to find the dSYM file using UUID of the crash log file.

Running following command...

mdimport .

... in the product folder (the one where MyApp1.app and myApp.app.dSYM are located) the problem was resolved.

I am not sure why I have to run it every time I build my application, my mac is not doing it automatically for some reason. But it works.

abix
  • 287
  • 3
  • 14
0

I have installed Xcode on a directory with white spaces. I fixed it by removing the white spaces of the directory and run xcode-select. (mdimport didnt work for me)

    sudo xcode-select -switch <myxcodedir>
jdtogni
  • 129
  • 1
  • 7
0

I had the same problem.

In the projects Build Settings in Xcode, under DEBUG_INFORMATION_FORMAT, set DWARF with dSYM File for the Debug configuration. Xcode defaults it to just DWARF.

Sergiu Todirascu
  • 1,367
  • 15
  • 23