Xcode 4 无法表示崩溃日志

发布于 2024-10-27 10:24:09 字数 157 浏览 3 评论 0 原文

我刚刚将 Xcode 更新为 XYZ 现在,我对从测试仪甚至手机收到的崩溃日志的符号表示有问题。

当我构建 AdHoc 发行版时,我使用“Arhive”方案,然后使用我的开发人员凭据创建 *.ipa 文件。

这是问题吗? 我找不到这些 AdHoc 构建的 dSym 文件。

I have just updated my Xcode to X.Y.Z. Now I have a problem with the symbolication of the crash logs received from my tester and even from my phone too.

When I build the AdHoc distribution I am using the "Arhive" scheme, then I create the *.ipa file singing it with my developer credentials.

Is this the issue?
And I can't find the dSym files for these AdHoc builds.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

千仐 2024-11-03 10:24:10

符号化脚本在寻找正确的二进制/dSYM 时遇到问题。它使用 Spotlight 来完成此操作,但经常出现问题。这里有一些需要尝试的事情:

  1. 确保您的 .app 没有
    其中有空格。

  2. 可能正在查找以下版本
    您的应用程序安装在模拟器上
    (向后,但有时确实如此
    这对我来说)。重置您的模拟器。

  3. 清除您的构建目录。

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:

  1. Make sure your .app doesn't have a
    space in it.

  2. It may be finding the version of
    your app installed on the simulator
    (backwards, but it sometimes does
    this for me). Reset your simulator.

  3. Clear your build directory.

世界等同你 2024-11-03 10:24:10

我今天也遇到了同样的问题。根据我在网上的研究,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.

玩套路吗 2024-11-03 10:24:10

我想我有这个问题,或者类似的问题。
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?

小嗷兮 2024-11-03 10:24:10

要根据崩溃日志中的 ID 查找 dSYM 文件,如下所示:

二值图像:
0x100000000 - 0x100021ff7 +com.developer.foobar 1.1 (2) /Applications/FooBar.app/Contents/MacOS/FooBar

您可以执行以下操作:

mdfind com_apple_xcode_dsym_uuids == D1B7F956-7D79-3D4D-BA53-E9EBB368A9F8

对于使用“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,您可以执行类似

dwarfdump --uuid /Users/valexa/Desktop/GPSnote.app/GPSnote 

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 :

Binary Images:
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

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

dwarfdump --uuid /Users/valexa/Desktop/GPSnote.app/GPSnote 

UUID: 6194D2B0-4E61-3834-AD15-C279EB1848XX (armv7)
UUID: D1B7F956-7D79-3D4D-BA53-E9EBB368A9F8 (armv7s)

零度° 2024-11-03 10:24:09

除了coob的回答之外,我发现将这些目录添加到Spotlight的忽略列表中(系统偏好设置→ Spotlight → 隐私)会有所帮助:

  • ~/Library/Developer/Xcode/DerivedData/ (Xcode 4 build artefacts)
  • ~/Library/Application Support/iPhone Simulator/ (iPhone 模拟器的文件系统)

如下所示:

Spotlight 设置为抑制无用的 .app 文件

(请参阅 此博文了解更多详细信息。)

更新:来自 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:

Spotlight settings to suppress unhelpful .app files

(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.

神经大条 2024-11-03 10:24:09

对我来说,第 323 行编辑和 Spotlight 排除都没有修复它。因此,我追踪了 symbolicatecrash 中的问题,并在 github 上发布了修补版本。只需替换 /usr/local/bin/symbolicatecrash ,您的 iOS 崩溃报告就会再次开始符号化。

此补丁可能不适用于 Mac 应用程序,因为它对 .xcarchive 目录的结构做出了假设,而这似乎不适用于桌面应用程序。

编辑:如果 Spotlight 尚未为您的档案编制索引,您可能仍然会遇到问题。您可以通过在终端中运行以下命令来强制索引:

mdimport ~/Library/Developer/Xcode/Archives/

有关故障排除的更多信息 此处

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:

mdimport ~/Library/Developer/Xcode/Archives/

More info on troubleshooting here.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文