Search code examples
iossymbolicatecrash

iOS: symbolicatecrash is stuck


symbolicatecrash is stuck.

I was trying to run it like this:

symbolicatecrash -v crash.txt MYAPP

The execution never ends. It used to work in the past but now (Xcode 7 and 8) it is stuck.

Is there a solution please?


Solution

  • Here is a solution:

    The in-depth details appear here: iOS9: duplicated lines in crash reports are causing symbolicatecrash to get stuck

    The quick solution is to edit this perl script (new location in Xcode 8!):

    /Applications/Xcode.app//Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash

    Now search for defined($images{$bundlename}) and add next; right after, like this:

            if ( defined($images{$bundlename}) ) {
                next;
    

    That's all!

    Some VERY USEFUL symbolication tips:

    For symbolication you need 3 files:

    1. A text file with the crash report: starting with Incident Identifier: and ending with something like 0x1974d0000 - 0x1974f3fff libxpc.dylib arm64 <ad580443238d39978d09004c210d0c18> /usr/lib/system/libxpc.dylib

    2. The app folder, named MYAPP.app (the Finder hides the .app extension). If you have and IPA of the app, unzip it and it will be wishing the Payload folder.

    3. The dSYM folder, as generated by Xcode while compiling.

    You should rename the dSYM folder into MYAPP.app.dSYM and put all three files in the same folder.

    All the three must have the same UUID. To verify that you can use the following commands (I got gsed by running brew install gnu-sed):

    UUID of app:
    dwarfdump --uuid MYAPP.app/MYAPP

    UUID of symbols:
    dwarfdump --uuid MYAPP.app.dSYM

    UUID od crash:
    cat crash.txt | grep -A 1 "Binary Images:" | gsed -r -n -e 's_.*<([0-9a-z]{8})([0-9a-z]{4})([0-9a-z]{4})([0-9a-z]{4})([0-9a-z]{12}).*_\1-\2-\3-\4-\5_p' | awk '{print toupper($0)}'

    Now, if they all match the same UUID, you can:

    symbolicatecrash -v crash.txt MYAPP