如何用符号表示用户通过电子邮件发送给我的 Mac OS X 应用程序崩溃报告?

发布于 2024-11-09 02:53:15 字数 546 浏览 0 评论 0原文

我正在开发一个应用程序,我已将其发送给一些测试人员。在启动应用程序的短短几分钟内,用户就遇到了崩溃。当弹出窗口说应用程序崩溃时,他复制了详细信息部分中的所有文本并将其通过电子邮件发送给我。我已将文本保存到纯文本文件中,并为其赋予 .crash 扩展名,这会导致它像常规崩溃报告一样由控制台打开,所以我认为我的扩展名正确(但可能不是)。 我发送的版本是由 Xcode 使用 Archive 选项构建的,因此 Xcode 知道应用程序和 .dSYM 的位置。 我知道使用 iPhone 应用程序,您可以将崩溃报告拖到管理器中,Xcode 会为您将其符号化。我找不到任何地方可以获取 Mac 崩溃报告。 我查看了atos,但它讨论了内存位置,包括应用程序运行的位置,但我没有看到我的报告中列出的信息。查看原始崩溃报告,看起来视图控制器已提前发布,但我无法真正判断这是原因还是症状。 我真正的问题是;有没有办法让 Xcode 符号化报告或一个工具,我可以只移交 .dSYM 文件、应用程序和报告并取回符号化报告? 我查遍了 Google,但我发现的所有内容(除了之前提到的 atos 手册页)都是关于符号化 iPhone 报告,而不是 Mac OS X 报告。

I am working on an app that I have sent to a few beta testers. Within just a few minutes of launching the app a user got a crash. When the window poped up saying the app had crashed he copied all of the text in the details section and emailed it to me. I have saved the text into a plain text file and given it the .crash extension which causes it to be opened by console like a regular crash report so I think I have the extension right (but maybe not).
The version I sent out was built by Xcode with the Archive option so Xcode knows where the app and .dSYM are.
I know that with iPhone apps you can drag a crash report to the organizer and Xcode will symbolicate it for you. I can not find anywhere that will take a Mac crash report.
I have looked at atos but it talks about memory locations including the location the app was running at and I don't see that information listed in the report I have. Looking at the raw crash report it looks like a view controller was released early but I can't really tell if that was the cause or a symptom.
My real question is; is there a way to have Xcode symbolicate the report or a tool that I can just hand over the .dSYM file, app, and report and get back a symbolicated report?
I've looked all over Google but everything I find (other than the previously mentioned man pages for atos) is about symbolicating iPhone reports, not Mac OS X ones.

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

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

发布评论

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

评论(3

最冷一天 2024-11-16 02:53:15

或者如答案 https://stackoverflow.com/a/18354072/317461

放置您的发布版本和 .dSYM 文件在同一目录中并打开终端

$cd directory
$lldb MyApp.app
(lldb) image lookup -v --address 0x00085f3c

Or as in answer https://stackoverflow.com/a/18354072/317461

Put your release build and your .dSYM file in the same directory and open terminal

$cd directory
$lldb MyApp.app
(lldb) image lookup -v --address 0x00085f3c
残疾 2024-11-16 02:53:15

我们的应用程序也遇到了同样的问题,我使用atos手动逐行符号化崩溃报告。

我现在调整了 Apple 的符号脚本,使其能够与 Mac 应用程序和 PLCrashReporter 的崩溃报告一起使用。

https://github.com/lksnmnn/Symbolicate-CrashReports

如何使用它:

确保您的计算机上拥有以下所有文件:

  1. 崩溃报告:report.crash
  2. 应用程序的 dSYM 文件:MyApp.dSYM
  3. 可执行文件您的应用程序的 / app 文件夹:MyApp.app
  4. 改进的符号脚本:symbolicatecrash

现在进入命令行(终端)并执行以下操作:

# set the developer directory
export DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer"

# Now run the script
/Path/To/symbolicatecrash /Path/To/report.crash > /Path/To/readable_report.crash

# Use -v for verbose logging.

该脚本将找到您的 dSYM以及您的可执行文件和尽可能多的符号。现在,您将在指定的输出文件中找到符号化报告readed_report.crash

构建设置:

为了获得正确的报告和符号,请将构建设置设置为:

Strip Debug Symbols During Copy: Yes
Strip Style: All Symbols
Strip Linked Product: Yes

编辑:改进了答案,使其符合 Stack Overflow 答案政策。

We had the same problem with our app and I was symbolicating the crash reports manually line by line with atos.

I now tweaked Apple's symbolicate script such that it works with Mac apps and crash reports from PLCrashReporter.

https://github.com/lksnmnn/Symbolicate-CrashReports

How to use it:

Make sure you have all of the following files on your computer:

  1. The crash report: report.crash
  2. The dSYM file of your app: MyApp.dSYM
  3. The executable / app folder of your app: MyApp.app
  4. The improved symbolicate script: symbolicatecrash

Now go in the command line (Terminal) and do the following:

# set the developer directory
export DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer"

# Now run the script
/Path/To/symbolicatecrash /Path/To/report.crash > /Path/To/readable_report.crash

# Use -v for verbose logging.

The script will find your dSYM and your executable and symbolicates as much as it cans. You will now find your symbolicated report in the stated output file readable_report.crash

Build settings:

For proper reports and symbols, set your build settings to this:

Strip Debug Symbols During Copy: Yes
Strip Style: All Symbols
Strip Linked Product: Yes

Edit: Improved the answer such that it aligns with the Stack Overflow answer policy.

待天淡蓝洁白时 2024-11-16 02:53:15

您可以使用 GDB 进行符号化,将您的发布版本和 .dSYM 文件放在同一目录中
打开终端

$ cd directory
$ gdb MyApp.app
(gdb) info line *0x00085f3c  

You can use GDB for Symbolication, Put your release build and your .dSYM file in the same directory
open terminal

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