xcode 不能象征崩溃日志 - 为什么?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10772748/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 00:25:15  来源:igfitidea点击:

Can't symbolicate crash log - why?

iosxcode

提问by Anders Sewerin Johansen

I have a crash file from a user, and a DSYM dir from the xarchive build for the app store. Despite that, I don't get a translation of addresses to function names. Can anybody tell me why?

我有来自用户的崩溃文件,以及来自应用商店的 xarchive 构建的 DSYM 目录。尽管如此,我没有得到地址到函数名称的转换。谁能告诉我为什么?

Command line:

命令行:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources/symbolicatecrash TypO\ Lite_2012-05-26-221125_GC-64-4G-iPad.crash TypO\ Lite.app.dSYM

Output:

输出:

Error: No developer directory found at /Developer. Run /usr/bin/xcode-select to update the developer directory path.
Incident Identifier: 485C4142-0FCF-4F92-A06E-31FFA6FC5F8C
CrashReporter Key:   bf6e22e903e9819111c4d7498eb6006d32f64472
Hardware Model:      iPad3,3
Process:         TypO Lite [1357]
Path:            /var/mobile/Applications/527E2243-2DFB-4934-A9D3-F5C7C13FCBC0/TypO Lite.app/TypO Lite
Identifier:      TypO Lite
Version:         ??? (???)
Code Type:       ARM (Native)
Parent Process:  launchd [1]

Date/Time:       2012-05-26 22:11:25.868 +1000
OS Version:      iPhone OS 5.1.1 (9B206)
Report Version:  104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread:  0

Last Exception Backtrace:
0   CoreFoundation                  0x32de088f 0x32d27000 + 759951
1   libobjc.A.dylib                 0x34d85259 0x34d7c000 + 37465
2   TypO Lite                       0x000f8119 0xe7000 + 69913
3   TypO Lite                       0x000f8725 0xe7000 + 71461
4   TypO Lite                       0x000f018f 0xe7000 + 37263
5   TypO Lite                       0x000f1f33 0xe7000 + 44851
6   TypO Lite                       0x00116453 0xe7000 + 193619
7   TypO Lite                       0x00115d51 0xe7000 + 191825
8   UIKit                           0x3531fcab 0x352e4000 + 244907
9   UIKit                           0x353197dd 0x352e4000 + 219101
10  UIKit                           0x352e7ac3 0x352e4000 + 15043
11  UIKit                           0x352e7567 0x352e4000 + 13671
12  UIKit                           0x352e6f3b 0x352e4000 + 12091
13  GraphicsServices                0x32e8422b 0x32e7f000 + 21035
14  CoreFoundation                  0x32db4523 0x32d27000 + 578851
15  CoreFoundation                  0x32db44c5 0x32d27000 + 578757
16  CoreFoundation                  0x32db3313 0x32d27000 + 574227
17  CoreFoundation                  0x32d364a5 0x32d27000 + 62629
18  CoreFoundation                  0x32d3636d 0x32d27000 + 62317
19  UIKit                           0x3531886b 0x352e4000 + 215147
20  UIKit                           0x35315cd5 0x352e4000 + 203989
21  TypO Lite                       0x000e8343 0xe7000 + 4931
22  TypO Lite                       0x000e8324 0xe7000 + 4900

It turns out I am getting a lot of errors like these...

事实证明我收到了很多这样的错误......

.....fetching symbol file for libc++abi.dylib--[undef] 
Searching [/Users/andersprivat/Library/Developer/Xcode/iOS DeviceSupport/5.1.1 (9B206)/Symbols/usr/lib/libc++abi.dylib]...--[/Users/andersprivat/Library/Developer/Xcode/iOS DeviceSupport/5.1.1 (9B206)/Symbols/usr/lib/libc++abi.dylib] Running xcrun -sdk iphoneos lipo -info '/Users/andersprivat/Library/Developer/Xcode/iOS DeviceSupport/5.1.1 (9B206)/Symbols/usr/lib/libc++abi.dylib'
Error: No developer directory found at /Developer. Run /usr/bin/xcode-select to update the developer directory path.
## /Users/andersprivat/Library/Developer/Xcode/iOS DeviceSupport/5.1.1 (9B206)/Symbols/usr/lib/libc++abi.dylib doesn't contain armv7 slice
-- NO MATCH
Searching in Spotlight for dsym with UUID of bab4dcbfc5943d3fbb637342d35e8045
Running mdfind "com_apple_xcode_dsym_uuids == BAB4DCBF-C594-3D3F-BB63-7342D35E8045"
@dsym_paths = (  )
@exec_names = (  )
Did not find executable for dsym
## Warning: Can't find any unstripped binary that matches version of /usr/lib/libc++abi.dylib

...and here's the output regarding the actual app.

...这是有关实际应用程序的输出。

......fetching symbol file for TypO Lite--[undef] 
Searching []...-- NO MATCH
Searching in Spotlight for dsym with UUID of f166deb83d95370dba90daf9745afe82
Running mdfind "com_apple_xcode_dsym_uuids == F166DEB8-3D95-370D-BA90-DAF9745AFE82"
Running mdls -name com_apple_xcode_dsym_paths \/Users\/andersprivat\/Desktop\/TypO\ Lite\.app\.dSYM
@dsym_paths = ( /Users/andersprivat/Desktop/TypO Lite.app.dSYM/Contents/Resources/DWARF/TypO Lite )
@exec_names = ( TypO Lite )
Running mdfind "kMDItemContentType == com.apple.application-bundle && kMDItemFSName == 'TypO Lite.app'"
Running mdfind "kMDItemContentType == public.unix-executable && kMDItemFSName == 'TypO Lite'"
Running xcrun -sdk iphoneos lipo -info '/Users/andersprivat/Library/Application Support/iPhone Simulator/5.1/Applications/AB89FB64-C669-4FA4-9351-F3A9FC5D6709/TypO Lite.app/TypO Lite'
Error: No developer directory found at /Developer. Run /usr/bin/xcode-select to update the developer directory path.
## /Users/andersprivat/Library/Application Support/iPhone Simulator/5.1/Applications/AB89FB64-C669-4FA4-9351-F3A9FC5D6709/TypO Lite.app/TypO Lite doesn't contain armv7 slice
UUID of executable is: f166deb83d95370dba90daf9745afe82
Executable name: /Users/andersprivat/Library/Application Support/iPhone Simulator/5.1/Applications/AB89FB64-C669-4FA4-9351-F3A9FC5D6709/TypO Lite.app/TypO Lite

UUID doesn't match dsym for executable /Users/andersprivat/Library/Application Support/iPhone Simulator/5.1/Applications/AB89FB64-C669-4FA4-9351-F3A9FC5D6709/TypO Lite.app/TypO Lite
Running xcrun -sdk iphoneos lipo -info '/Users/andersprivat/Documents/Builds/Debug-iphonesimulator/TypO Lite.app/TypO Lite'
Error: No developer directory found at /Developer. Run /usr/bin/xcode-select to update the developer directory path.
## /Users/andersprivat/Documents/Builds/Debug-iphonesimulator/TypO Lite.app/TypO Lite doesn't contain armv7 slice
UUID of executable is: f166deb83d95370dba90daf9745afe82
Executable name: /Users/andersprivat/Documents/Builds/Debug-iphonesimulator/TypO Lite.app/TypO Lite

UUID doesn't match dsym for executable /Users/andersprivat/Documents/Builds/Debug-iphonesimulator/TypO Lite.app/TypO Lite
Running xcrun -sdk iphoneos lipo -info '/Users/andersprivat/Documents/Builds/Debug-iphoneos/TypO Lite.app/TypO Lite'
Error: No developer directory found at /Developer. Run /usr/bin/xcode-select to update the developer directory path.
## /Users/andersprivat/Documents/Builds/Debug-iphoneos/TypO Lite.app/TypO Lite doesn't contain armv7 slice
UUID of executable is: f166deb83d95370dba90daf9745afe82
Executable name: /Users/andersprivat/Documents/Builds/Debug-iphoneos/TypO Lite.app/TypO Lite

UUID doesn't match dsym for executable /Users/andersprivat/Documents/Builds/Debug-iphoneos/TypO Lite.app/TypO Lite
Did not find executable for dsym
## Warning: Can't find any unstripped binary that matches version of /var/mobile/Applications/527E2243-2DFB-4934-A9D3-F5C7C13FCBC0/TypO Lite.app/TypO Lite

回答by Kerni

Could you please add the -vparameter. That should give you some lots of errors for each library it tries to symbolicate. I suspect neither the iOS 5.1.1 symbols, nor the app specific symbols could be found via spotlight.

能不能加个-v参数。对于它尝试符号化的每个库,这应该会给您带来很多错误。我怀疑通过聚光灯无法找到 iOS 5.1.1 符号和应用程序特定符号。

Did you upgrade a device to 5.1.1 and did Xcode extract the symbols? Check ~/Library/Developer/Xcode/iOS DeviceSupport. It should contain a directory named 5.1.1 (9B206).

您是否将设备升级到 5.1.1 并且 Xcode 是否提取了符号?检查~/Library/Developer/Xcode/iOS DeviceSupport。它应该包含一个名为5.1.1 (9B206).

Regarding your apps symbols: was that from a debug build? If so, did you execute another build afterwards? If so, this is the reason it won't symbolicate the app specific items too. The symbolication script needs the app binary and the exact corresponding dSYM for it.

关于您的应用程序符号:是否来自调试版本?如果是这样,您之后是否执行了另一个构建?如果是这样,这就是它不会象征应用程序特定项目的原因。符号化脚本需要应用程序二进制文件和与其准确对应的 dSYM。

See this answer for more details on that: backtrace still not readable after symbolicating iPad crash log

有关更多详细信息,请参阅此答案:符号化 iPad 崩溃日志后回溯仍然不可读

回答by Bjinse

I suppose the answer is right in front of you. The first line of your log states:

我想答案就在你面前。日志的第一行指出:

Error: No developer directory found at /Developer. Run /usr/bin/xcode-select to update the developer directory path.

Your Xcode.app is in /Applications. Formerly (before Xcode was delivered via the Mac App Store), Xcode used to be in /Developer. So if you run:

您的 Xcode.app 位于 /Applications 中。以前(在 Xcode 通过 Mac App Store 交付之前),Xcode 曾经在 /Developer 中。所以如果你运行:

/usr/bin/xcode-select -print-path

The output will be: /Developer While it should be /Applications

输出将是: /Developer 而它应该是 /Applications

So the solution is to run:

所以解决方案是运行:

sudo /usr/bin/xcode-select -switch /Applications

(It must be run as root to change the setting). Then restart Xcode and click on the log in Organizer. Or import the log if it is not in the list. Now it should symbolicate correctly.

(必须以 root 身份运行才能更改设置)。然后重启Xcode并点击Organizer中的log。或者,如果日志不在列表中,则导入日志。现在它应该正确符号化。

BTW, thanks for your verbose question. It brought me to this solution, because I was having the same problem right now. And because I used Xcode, I did not see the error message about Xcode-select.

顺便说一句,感谢您的详细问题。它让我想到了这个解决方案,因为我现在遇到了同样的问题。而且因为我用的是 Xcode,所以我没有看到关于 Xcode-select 的错误信息。

I am wondering if anybody that had Xcode installed in /Developer has the same problem.

我想知道是否有人在 /Developer 中安装了 Xcode 有同样的问题。