Symbolicate adhoc iphone app crashes
Asked Answered
S

3

13

I can't manage to make my code symbolicated ... I read the part "below" :

Given a crash report, the matching binary, and its .dSYM file, symbolication is relatively easy. The Xcode Organizer window has a tab for crash reports of the currently selected device. You can view externally received crash reports in this tab - just place them in the appropriate directory. This is the same as the Mac OS X directory described in the first section. It doesn't matter which device you have tethered, but the directory in which you place the crash report must be the directory for the tethered and selected device.

It is not necessary to place the binary and .dSYM file in any particular location. Xcode uses Spotlight and the UUID to locate the correct files. It is necessary, though, that both files be in the same directory and that this directory is one that is indexed by Spotlight. Anywhere in your home directory should be fine.

But it doesn't work for me ... here is what I did :

  • I opened xcode organizer and I had my iphone device with crash logs
  • App and dsym files are in my xcode project which is on my desktop

All the rest should be automatic, right ? but crash logs aren't symbolicated yet ...

Any comments welcome.

Cheers.

Gotye.

Schizophrenia answered 23/4, 2010 at 8:8 Comment(1)
Are the .app and .dSYM files you have on your desktop the exact ones that were generated at the time you built your ad hoc binary? Any change, even minor, can disrupt the symbolication process.Irma
U
13

I've been struggling with this for several days and finally figured it out. I wasn't able to get symbolicated logs from any Archived application I installed to my phone. For me, it was a problem with the build settings, although I did notice that it was able to symbolicate logs from some older builds as well after I followed these steps. YMMV may vary with crash logs from older builds. I was able to get symbolicated logs after following these steps in Xcode 4.0.1 on iOS 4.3.1.

In the Xcode Project navigator, click on your project and then click Build Settings. When you archive your application, Xcode uses the Release configuration by default. You'll want to set the following values for the Release configuration only, so you'll have to expand any settings that aren't already expanded to allow you to set it on a per-configuration basis.

Ensure these values are set for the Release configuration:

  • Generate Debug Symbols: Yes
  • Debug Information Format: DWARF with dSYM File
  • Deployment Postprocessing: Yes
  • Strip Linked Product: Yes
  • Use Separate Strip: Yes
  • Strip Debug Symbols During Copy: No
  • Strip Style: All Symbols

Once those are set, Archive and reinstall your application. New crash reports generated from the resulting archive should be symbolicated correctly. For me, many old crash reports also symbolicated correctly after following these steps although I'm not sure how accurate the results would be if the builds were very different.

For reference, I figured all this out after studying this page: https://web.archive.org/web/20110727155234/http://developer.apple.com/tools/xcode/symbolizingcrashdumps.html

I also found this page, which is handy if you're trying to figure out what a particular build setting does: https://developer.apple.com/library/archive/documentation/DeveloperTools/Reference/XcodeBuildSettingRef/1-Build_Setting_Reference/build_setting_ref.html

Undertaking answered 29/3, 2011 at 16:48 Comment(1)
Generate Debug - Yes, Debug Info Dwarf+dSym, Strip Debug Durig Copy No, Strip Style All, are all set like that by default. Setting Deployment Postprocessing and Strip Linked Product had no affect for me. However Use Separate Strip is what made it work!!! Thank youPeripteral
S
8

In order to symbolicate your crash report, try this approach:

(a) Locate the symbolicator (/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources/symbolicatecrash)

(b) Open Terminal and drag this file (so that the path gets copied correctly)

(c) Run a command like /Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources/symbolicatorcrash .crash .app (mention the whole path of the crash report and the app file)

(d) Symbolicated crash report will show up

Stormi answered 7/10, 2010 at 12:33 Comment(4)
The same crash report I receieve in Device Logs in Organizer, I receive using your method. Why?Bracer
for me, adding explicit path to the .app helped; while Xcode (since version 4.2 I think) must have skipped it - I'm getting non-symbolicated crashes for my apps in Xcode.Thankyou
@Thankyou : as I mentioned, whole path of both app and crash report should be mentioned, am confused with the non symbolicated report bit, which version of Xcode are you using?Stormi
@CodeWriter I'm using newest version, 4.3.2 (4E2002)Thankyou
P
5

Steps to analyze crash report from apple:

  1. Copy the release .app file which was pushed to the appstore, the .dSYM file that was created at the time of release and the crash report receive from APPLE into a FOLDER.

  2. OPEN terminal application and go to the folder created above (using CD command)

  3. atos -arch armv7 -o '(your .app file name here)'/'(.dSYM filename here)' (memory location in the crash report where the crash occured). The memory location should be the one at which the app crashed as per the report.

Ex : atos -arch armv7 -o 'app name.app'/'app name' 0x0003b508

This would show you the exact line, method name which resulted in crash.

Thanks

Phosphate answered 10/2, 2011 at 9:25 Comment(2)
This isn't the same as symbolicating the entire crash report. This gives you the corresponding symbol for a single address.Nerty
@DaveCameron Yes the above did only that but if used without an address, it allow you to analyse multiple locations by submitting the address one by one. #1461392Phosphate

© 2022 - 2024 — McMap. All rights reserved.