1

I have a question regarding dSYM. I made an experiment with my app and added following code to it:

if (currentMenuPage_ == MenuPageAttrsVals) {
    return ((ValueAndId *) [currentValues_ objectAtIndex:-1]).name;
}

as expected application crashed and crash log was generated.

However Xcode and atos can not tell me exact line where the crash is.

2   CoreFoundation                  0x3192c23d -[__NSArrayI objectAtIndex:] + 165
3   MyApp                           0x00053487 0x49000 + 42119
4   MyApp                           0x0005102d 0x49000 + 32813

Do I have to set some special settings when building my app to generate proper dSYM?

If I call dwarfdump --uuid MyApp.app.dSYM I get a number. Does this number should appear somewhere in my crash log?

MichK
  • 3,202
  • 3
  • 29
  • 33

1 Answers1

2

That number should appear in the first line under the Binary Images section. (It might be formatted differently, e.g. lowercase and without the - chars).

Please remember, every time you do a build, this UUID changes, and if you did not save the previous dSYM, it won't symbolicate it.

If you did not change a lot (any) code, you could replace the UUID string in the Binary Images section (keep the format in there) with the new one from the latest dSYM.

If symbolication did not work, and the UUID is correct, that folder is most likely not indexed by Spotlight, so the symbolication script can't find the dSYM.

Kerni
  • 15,241
  • 5
  • 36
  • 57
  • Ok, I did `mdimport .` in `*/Debug-iphoneos` directory but it didn't help. Also, if I call `atos -arch armv7 -o MyApp.app.dSYM/Contents/Resources/DWARF/MyApp` and write `0x0007bac5` address read from crash log in response I get: `0x0007bac5 (in MyApp)` and no info about line number. – MichK Dec 01 '12 at 17:13
  • 1
    @MichK did you compare the UUID of both? Are they different or identical? If `mdfind` doesn't find the UUID, then either the directory is not indexed by spotlight *OR* you don't have the dSYM with that UUID any more (See my remarks in my answer above on this) . Regarding using atos directly you should check my answer here: http://stackoverflow.com/questions/13574933/ios-crash-reports-atos-not-working-as-expected/13576028#13576028 – Kerni Dec 01 '12 at 18:34
  • Thank you very much! Your answer how to use `atos` helped me the most. I calculated address in a way described in a link which you provided and it worked:). Unfortunately `mdfind` cannot find dSYM for specified uuid, but it is not a problem if I can do this by atos. Thanks once again. – MichK Dec 02 '12 at 17:46