Symbolicate crash failed on xcode 4.5
Asked Answered
S

5

9

I just upgraded my xcode to version 4.5, I tried three ways for symbolicating crash log, but neither of them success.

Firstly, I got the crash log from my device and then imported it into "Device Logs" of Organizer, but the exact function of my app cannot be displayed, the memory address still displayed in result.

Secondly, I copied the 'symbolicatecrash' file from '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources' to '/usr/local/bin' and put the .DSYM file, .app file and .crash file into a folder, run the command: 'symbolicatecrash Myapp.crash', the result still display memory address.

Finally, I tried the method from http://xperienced.com.pl/blog/symbolicate-ios-crash-report, but still no lucky.

Could you please kindly help me with solve this question?

Thanks in advance!

Sapphism answered 23/9, 2012 at 7:30 Comment(4)
Please add what error symbolicatecrash will show when using the -A -v options, otherwise we can only do wild guesses.Achieve
@Kerni, it displays "Error: "DEVELOPER_DIR" is not defined at /usr/local/bin/symbolicatecrash line 53." Then I used following two commands: 1. sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer; 2. export DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer". I tried to 'symbolicatecrash Myapp.crash' again, the result still only display memory address.Sapphism
I just found the notification such as "got symbolicator for /Users/myuser/Library/Developer/Xcode/iOS DeviceSupport/5.0.1 (9A405)/Symbols/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation, base address 33c9f000" when I run 'symbolicatecrash MyApp.crash -A -v'. But I cannot find the notification for getting the symbolicator for my app. I put .DSYM file, .app file and .crash file together in a folder and keep my device connect to my mac. Is any step I missed or wrong? Thanks!Sapphism
I found the output as following:.........fetching symbol file for MyApp--[undef] Searching []...-- NO MATCH Searching in Spotlight for dsym with UUID of ebe83c99417237ad96dbd4f0ae242ec8 Running mdfind "com_apple_xcode_dsym_uuids == EBE83C99-4172-37AD-96DB-D4F0AE242EC8" '@'dsym_paths = ( ) '@'exec_names = ( ) Did not find executable for dsym ## Warning: Can't find any unstripped binary that matches version of /var/mobile/Applications/7F44D445-8CA8-4F4E-AEDE-DC9CB9BCE04C/MyApp.app/MyAppSapphism
S
9

I solved it according to the discussion in https://github.com/TheRealKerni/QuincyKit/issues/46. And run the perl script from https://github.com/TheRealKerni/QuincyKit/blob/3c4a0b163ac71599a7795508fe6a91c1ced9daa6/server/local/symbolicatecrash.pl to get the correct result.

@Kerni, thank you for your script!

Sapphism answered 24/9, 2012 at 5:12 Comment(3)
This post led me to a great solution after many hours of searching. If you goto Xcode->Organizer click on archives then right-click any archive and select show in finder. Back up to the folder called Xcode that contains the archive. Run terminal and cd to this folder, you can do this easily by typing 'cd ' then dragging the folder to the terminal. Now type 'mdimport .' and enter. This will take a minute to finish. If you go back to Organizer and find your crash file then press Re-Symbolicate it should now give you method names and line numbers.Julissa
Voted up the answer, but Joe's comment actually solved my problem.Woodrum
Joe's answer didn't work for me, but I did figure out that dwarfdump works (see my posted answer).Compossible
C
3

Have you turned off spotlight? symbolicatecrash uses spotlight to find the binaries and dsym files, so if you've turned off spotlight then it won't be able to find them. Anyway, here is how to convert a hex stacktrace address into a line number:

[1] Find the .dSym file by going to XCode->Organizer, clicking on archives, then right click on the archive, and cd into this directory (you can just drag the folder into a shell window).

[2] cd into the dSYMs directory.

[3] run the dwarfdump command to translate the hex address into a line number in your code:

dwarfdump --arch armv7 myApp.dSYM --lookup 0xaabbccdd | grep 'Line table'
Compossible answered 12/10, 2013 at 1:1 Comment(1)
In year 2023, you will most likely be using arm64 instead of armv7 for the above command. Instead of Line table you can try Line info - it worked for me. Also, take a note that 0xaabbccdd is the address on disk which you need to calculate by subtracting ASLR slide from Backtrace address. Find more in this WWDC session: wwdcnotes.com/notes/wwdc21/10211Schober
L
2

If you have international characters in your app name (e.g. "ø", "ô", "ç") then symbolication will fail. The various steps during symbolication mess up these characters resulting in an invalid symbolication path.

Lifeboat answered 21/12, 2012 at 10:58 Comment(0)
V
1

I had Xcode 4.5 and 4.4.1 installed, after deleting 4.4.1 the symbolicating problem was fixed.

Voluble answered 21/11, 2012 at 19:59 Comment(0)
R
1

If you haven't already tried this, upgrade your mac to OSX 10.8.2. I was running OSX 10.7.5, and upgrading immediately fixed my sybolication woes.

I had tried pretty much everything to get my crash logs to symbolicate. I never had problems before, but a few months had passed since I'd looked at a crash log; at some point during that period I upgraded to Xcode 4.5.2. It seems to me that something with the Xcode 4.5.2 symbolicatecrash perl script does not work correctly on a mac running OSX 10.7.5. In symbolicatecrash, it calls atos to sybolicate an address; it couldn't find the matching symbols, even though I knew for a fact that I had the correct xcarchive. Anyhow, if you can afford the $20, spring for OSX 10.8.2 and hopefully that'll work for you.

Rattlesnake answered 2/12, 2012 at 23:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.