Cocoa应用程序尝试在崩溃时启动lldb? [英] Cocoa app tries to launch lldb on crash?

查看:236
本文介绍了Cocoa应用程序尝试在崩溃时启动lldb?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有几位用户报告有时当我的应用崩溃时,收到如下所示的消息框:

A couple of users are reporting that sometimes when my app crashes, the receive a message box like this:

The lldb command requires the command line developer tools. Would you like to install the tools now?

崩溃(SIGABRT)在我的代码中看起来像一个竞争条件。但是为什么在发生这种情况时似乎试图启动 lldb ?我从来没有见过这样的事情,它似乎相当孤立的几个用户,我不能在本地重现 - 虽然我有开发工具安装。

The crash (SIGABRT) looks like a race condition somewhere in my code. But why is it seemingly trying to launch lldb when this happens? I've never seen anything like this, it seems fairly isolated to a couple of users, and I can't reproduce locally - although I do have the developer tools installed.

这几乎就像在.NET中的JIT调试,但我从来没有听说过Cocoa,我的Google搜索没有结果。

It's almost like JIT debugging in a .NET, but I've never heard of that in Cocoa and my Google searches on this are fruitless.

编辑:

如果我运行 ps ,我们可以看到 Problem Reporter 安装命令行开发工具

If I run ps we can see both the Problem Reporter and Install Command Line Developer Tools:

19582   0.0  0.4  2568032  33224   ??  S    10:22AM   0:00.72 /System/Library/CoreServices/Problem Reporter.app/Contents/MacOS/Problem Reporter
19579   0.0  0.2  2531748  13276   ??  S    10:22AM   0:00.16 /System/Library/CoreServices/Install Command Line Developer Tools.app/Contents/MacOS/Install Command Line Developer Tools

列表中没有其他可疑的。如果我用 -f 开关运行 ps ,我可以看到安装命令行开发工具是 launchd

There is nothing else suspicious in the list. If I run ps with the -f switch, I can see that the parent process for Install Command Line Developer Tools is launchd.

推荐答案

Apple发布的CrashReporter工具不会尝试将调试器连接到崩溃的程序。以前有一个选项,在Leopard或大约(默认情况下不启用),但该功能已被Mountain Lion(也许甚至SnowLeopard)关闭。我不认为有可能在Leopard中安装任何带有lldb的Xcode,所以似乎不太可能是一个老的Apple CrashReporter试图将调试器挂接到应用程序。 OTOH,可以用另一个可以做到这一点的Apple的CrashReporter工具替代,一些第三方供应商做到这一点。也许这是怎么回事?

The CrashReporter tool that Apple ships does not try to connect a debugger to crashed programs. There used to be an option to do that in Leopard or thereabouts (not on by default), but that capability was turned off by Mountain Lion (maybe even SnowLeopard). I don't think it is possible to install any Xcode with lldb in it on Leopard, so it seems unlikely it is an old Apple CrashReporter that is trying to hook the debugger up to the app. OTOH, it is possible to replace the Apple's CrashReporter tool with another that could do this, and some third party vendors do do this. Maybe that is what is going on?

如果你看到这个的用户发送ps auwwx的输出,当对话框出现时,你可能能够发现罪魁祸首。

If you got the users who see this to send you the output of "ps auwwx" when the dialog box is present, you might be able to spot the culprit.

这篇关于Cocoa应用程序尝试在崩溃时启动lldb?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆