Xcode 4 无法符号化崩溃日志
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5458573/
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
Xcode 4 failure to symbolicate Crash Log
提问by Andrei Neacsu
I have just updated my Xcode to 4.0.1. Now I have a problem with the symbolication of the crash logs received from my tester and even from my phone too.
我刚刚将我的 Xcode 更新到 4.0.1。现在我对从我的测试人员甚至我的手机收到的崩溃日志的符号表示有问题。
When I build the AdHoc distribution I am using the "Arhive" scheme, then I create the *.ipa file singing it with my developer credentials.
当我构建 AdHoc 发行版时,我使用了“Arhive”方案,然后我创建了 *.ipa 文件,并使用我的开发人员凭据进行了唱歌。
Is this the issue? And I can't find the dSym files for these AdHoc builds.
这是问题吗?而且我找不到这些 AdHoc 构建的 dSym 文件。
采纳答案by Simon Whitaker
Further to coob's answer, I find adding these directories to Spotlight's ignore list (System Preferences → Spotlight → Privacy) helps:
除了 coob 的回答之外,我发现将这些目录添加到 Spotlight 的忽略列表(系统偏好设置 → Spotlight → 隐私)有帮助:
~/Library/Developer/Xcode/DerivedData/
(Xcode 4 build artefacts)~/Library/Application Support/iPhone Simulator/
(file system for the iPhone Simulator)
~/Library/Developer/Xcode/DerivedData/
(Xcode 4 构建工件)~/Library/Application Support/iPhone Simulator/
(iPhone 模拟器的文件系统)
Like this:
像这样:
(See this blog postfor additional detail.)
Update: from a comment by joerick: "This works, but it also meant that Instruments.app couldn't find the debug symbols, so I had to remove DerivedData from the Privacy list to do some profiling." - bear this in mind if you use Instruments.
更新:来自joerick的评论:“这有效,但这也意味着 Instruments.app 找不到调试符号,因此我不得不从隐私列表中删除 DerivedData 以进行一些分析。” - 如果您使用仪器,请记住这一点。
回答by Christopher Pickslay
For me, neither the line 323 edit nor the Spotlight exclusions fixed it. So I tracked down the issues in symbolicatecrash
and published a patched version on github. Just replace /usr/local/bin/symbolicatecrash and your iOS crash reports will start symbolicating again.
对我来说,323 行编辑和 Spotlight 排除都没有修复它。所以我追踪了问题symbolicatecrash
并在 github 上发布了一个补丁版本。只需替换 /usr/local/bin/symbolicatecrash ,您的 iOS 崩溃报告将再次开始符号化。
This patch may not work for Mac apps, as it makes assumptions about the structure of the .xcarchive directory which don't appear to hold for desktop apps.
此补丁可能不适用于 Mac 应用程序,因为它假设 .xcarchive 目录的结构似乎不适用于桌面应用程序。
Edit: you may still have problems if Spotlight hasn't indexed your archives. You can get force an index by running the following in a terminal:
编辑:如果 Spotlight 没有为您的档案编入索引,您可能仍然会遇到问题。您可以通过在终端中运行以下命令来强制索引:
mdimport ~/Library/Developer/Xcode/Archives/
More info on troubleshooting here.
有关故障排除的更多信息,请参阅此处。
回答by Alastair Stuart
The symbolication script is having an issue finding the right binary/dSYM. It uses Spotlight to do this and often cocks up. Here's a few things to try:
符号化脚本在寻找正确的二进制/dSYM 时遇到问题。它使用 Spotlight 来做到这一点,并且经常出现问题。这里有几件事情可以尝试:
Make sure your .app doesn't have a space in it.
It may be finding the version of your app installed on the simulator (backwards, but it sometimes does this for me). Reset your simulator.
Clear your build directory.
确保您的 .app 中没有空格。
它可能会找到安装在模拟器上的应用程序版本(向后,但有时会为我这样做)。重置模拟器。
清除您的构建目录。
回答by Hiltmon
I had the same issue today. From my research on the web, there is an issue with the armv6 libraries that cause the symbolicate process to fail. I found the answer in the dev forums here.
我今天遇到了同样的问题。根据我在网上的研究,armv6 库存在一个问题,导致符号化过程失败。我在这里的开发论坛中找到了答案。
For those without access, you need to create a copy of the symbolicatecrash
script from /Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources/
. Edit the file and replace the 'die' on line 323 with a 'print' (this is why it's not working, the script fails here).
对于那些没有访问权限的人,您需要symbolicatecrash
从/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources/
. 编辑文件并将第 323 行的“die”替换为“print”(这就是它不起作用的原因,脚本在这里失败)。
Then run symbolicatecrash
against your crash log. You'll see the error from line 323, but then it will symbolicate all yourlines and variables. It still fails for the system libraries, but it give enough information to fix your own bugs.
然后symbolicatecrash
针对您的崩溃日志运行。您将看到第 323 行的错误,但随后它将象征您的所有行和变量。对于系统库,它仍然失败,但它提供了足够的信息来修复您自己的错误。
Hope this helps.
希望这可以帮助。
回答by Nic
I think I had this issue, or something similar. Xcode 4.0 wasn't showing the symbols for a crash I had from a tester. I seemed to fix this by opening the xarchive that I had created, and copying out the dsym file from within it (right click and 'view package contents') to sit alongside it in the archive folder. I can't guarantee this was the solution - I was trying a number of other solutions at the time, but I know that I have the symbols now and didn't before. Worth trying?
我想我有这个问题,或者类似的问题。Xcode 4.0 没有显示我从测试人员那里得到的崩溃符号。我似乎通过打开我创建的 xarchive 并从其中复制 dsym 文件(右键单击并“查看包内容”)将其放在存档文件夹中来解决此问题。我不能保证这是解决方案 - 当时我正在尝试许多其他解决方案,但我知道我现在有符号,以前没有。值得尝试?
回答by valexa
To locate a dSYM file based on it's ID in a crashlog that looks like this :
要在如下所示的崩溃日志中根据其 ID 查找 dSYM 文件:
Binary Images: 0x100000000 - 0x100021ff7 +com.developer.foobar 1.1 (2) <D1B7F956-7D79-3D4D-BA53-E9EBB368A9F8> /Applications/FooBar.app/Contents/MacOS/FooBar
二进制图像:0x100000000 - 0x100021ff7 +com.developer.foobar 1.1 (2) <D1B7F956-7D79-3D4D-BA53-E9EBB368A9F8> /Applications/FooBar.app/Contents/MacOS/FooBar
you can do:
你可以做:
mdfind com_apple_xcode_dsym_uuids == D1B7F956-7D79-3D4D-BA53-E9EBB368A9F8
mdfind com_apple_xcode_dsym_uuids == D1B7F956-7D79-3D4D-BA53-E9EBB368A9F8
For OSX apps built with "DWARF with dSYM" you do not actually need the dSYM file and can use the manual approach at https://developer.apple.com/library/content/technotes/tn2151/_index.html#//apple_ref/doc/uid/DTS40008184-CH1-SYMBOLICATE_WITH_ATOS
对于使用“DWARF with dSYM”构建的 OSX 应用程序,您实际上并不需要 dSYM 文件,可以使用https://developer.apple.com/library/content/technotes/tn2151/_index.html#//apple_ref 上的手动方法/doc/uid/DTS40008184-CH1-SYMBOLICATE_WITH_ATOS
Additionally to check the UID of a binary you can do something like
另外要检查二进制文件的 UID,您可以执行以下操作
dwarfdump --uuid /Users/valexa/Desktop/GPSnote.app/GPSnote
UUID: 6194D2B0-4E61-3834-AD15-C279EB1848XX (armv7)
UUID: D1B7F956-7D79-3D4D-BA53-E9EBB368A9F8 (armv7s)
UUID:6194D2B0-4E61-3834-AD15-C279EB1848XX(armv7)
UUID:D1B7F956-7D79-3D4D-BA53-E9EBB368A9F8(armv7s)