Xcode 4 无法表示崩溃日志
我刚刚将 Xcode 更新为 XYZ 现在,我对从测试仪甚至手机收到的崩溃日志的符号表示有问题。
当我构建 AdHoc 发行版时,我使用“Arhive”方案,然后使用我的开发人员凭据创建 *.ipa 文件。
这是问题吗? 我找不到这些 AdHoc 构建的 dSym 文件。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
符号化脚本在寻找正确的二进制/dSYM 时遇到问题。它使用 Spotlight 来完成此操作,但经常出现问题。这里有一些需要尝试的事情:
确保您的 .app 没有
其中有空格。
可能正在查找以下版本
您的应用程序安装在模拟器上
(向后,但有时确实如此
这对我来说)。重置您的模拟器。
清除您的构建目录。
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:
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.
我今天也遇到了同样的问题。根据我在网上的研究,armv6 库存在一个问题,导致符号化过程失败。我在此处的开发论坛中找到了答案。
对于没有访问权限的用户,您需要从
/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources 创建
symbolicatecrash
脚本的副本/。编辑该文件并将第 323 行上的“die”替换为“print”(这就是它不起作用的原因,脚本在此处失败)。然后针对崩溃日志运行
symbolicatecrash
。您将看到第 323 行的错误,但随后它将代表您的所有行和变量。对于系统库来说它仍然失败,但它提供了足够的信息来修复您自己的错误。希望这有帮助。
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.
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).Then run
symbolicatecrash
against your crash log. You'll see the error from line 323, but then it will symbolicate all your lines and variables. It still fails for the system libraries, but it give enough information to fix your own bugs.Hope this helps.
我想我有这个问题,或者类似的问题。
Xcode 4.0 没有显示测试仪崩溃的符号。
我似乎通过打开我创建的 xarchive 并从其中复制 dsym 文件(右键单击并“查看包内容”)将其放在存档文件夹中的旁边来解决此问题。我不能保证这就是解决方案 - 我当时尝试了许多其他解决方案,但我知道我现在有符号,而以前没有。值得尝试吗?
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?
要根据崩溃日志中的 ID 查找 dSYM 文件,如下所示:
您可以执行以下操作:
对于使用“DWARF with dSYM”构建的 OSX 应用程序,您实际上不需要 dSYM 文件,可以使用 https://developer.apple.com/library/content/ technotes/tn2151/_index.html#//apple_ref/doc/uid/DTS40008184-CH1-SYMBOLICATE_WITH_ATOS
另外,要检查二进制文件的 UID,您可以执行类似
UUID 的操作:6194D2B0-4E61-3834-AD15-C279EB1848XX ( ARMv7)
UUID:D1B7F956-7D79-3D4D-BA53-E9EBB368A9F8(armv7s)
To locate a dSYM file based on it's ID in a crashlog that looks like this :
you can do:
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
Additionally to check the UID of a binary you can do something like
UUID: 6194D2B0-4E61-3834-AD15-C279EB1848XX (armv7)
UUID: D1B7F956-7D79-3D4D-BA53-E9EBB368A9F8 (armv7s)
除了coob的回答之外,我发现将这些目录添加到Spotlight的忽略列表中(系统偏好设置→ Spotlight → 隐私)会有所帮助:
~/Library/Developer/Xcode/DerivedData/
(Xcode 4 build artefacts)~/Library/Application Support/iPhone Simulator/
(iPhone 模拟器的文件系统)如下所示:
(请参阅 此博文了解更多详细信息。)
更新:来自 joerick 的评论:“这可行,但也意味着 Instruments.app 无法找到调试符号,因此我必须从隐私列表中删除 DerivedData 才能进行一些分析。” - 如果您使用仪器,请记住这一点。
Further to coob's answer, I find adding these directories to Spotlight's ignore list (System Preferences → Spotlight → Privacy) helps:
~/Library/Developer/Xcode/DerivedData/
(Xcode 4 build artefacts)~/Library/Application Support/iPhone Simulator/
(file system for the iPhone Simulator)Like this:
(See this blog post for 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.
对我来说,第 323 行编辑和 Spotlight 排除都没有修复它。因此,我追踪了
symbolicatecrash
中的问题,并在 github 上发布了修补版本。只需替换 /usr/local/bin/symbolicatecrash ,您的 iOS 崩溃报告就会再次开始符号化。此补丁可能不适用于 Mac 应用程序,因为它对 .xcarchive 目录的结构做出了假设,而这似乎不适用于桌面应用程序。
编辑:如果 Spotlight 尚未为您的档案编制索引,您可能仍然会遇到问题。您可以通过在终端中运行以下命令来强制索引:
有关故障排除的更多信息 此处。
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.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.
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:
More info on troubleshooting here.