Search Unity

Unable to symbolicate crash logs when using Unity for iPhone

Discussion in 'iOS and tvOS' started by Ecco, Jun 8, 2011.

  1. Ecco

    Ecco

    Joined:
    Jun 8, 2011
    Posts:
    27
    I recently ran into the problem of submitting an app to Apple that used Unity and iOS 4.3 as base SDK. It ran perfectly on our own devices but it crashed immediately after launch on Steve's iphone. They added a couple of crash logs for me to check out.

    Of course to symbolicate the crash log I need DWARF symbols, but apparently Unity by default turns off generating debug info (why?). I switched it on in my project settings and rebuilt the app. Fortunately the UUID hadn't changed so I should be able to use the newly generated symbols with the crash log, right?

    Turns out the dSYM files didn't contain any debug info at all. After some inspection I found out that Unity adds some extra linker flags "-Wl,-S,-x". This strips the binary of debug symbols before xcode exports the dSYM folder.
    Removing this flag unfortunately changes the UUID of the app, so using these symbols to make sense of the crash log that was sent might be a bad idea.

    I since found out that I wasn't the only one with the problem so I just resubmitted our game with iOS 4.2. But it has left me wondering why Unity by default makes it impossible for us to make sense of crash logs. Is there some other way we should be debugging our apps?

    And why does Unity set those specific flags? Could I not remove those flags and just enable "Strip Debug Symbols During Copy" option to do the same thing but at the appropriate stage?

    I hope someone can shed some light on this :)
     
  2. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    These flags save you couple of megabytes on distribution size. If you are happy with bigger distribution size you may remove them.
    P.S. There is dedicated blog post on iOS SDK 4.3 issue : http://blogs.unity3d.com/2011/06/15/unity-and-ios-sdk-4-3/