为什么 GDB 调试器不断冻结 Xcode 4?
这是一个非常奇怪的错误...
我正在开发一个 iPhone 项目,使用相机源并通过 OpenGL 着色器运行它以对其应用效果。然而,每次我在代码中简单地创建一个新的 GLfloat 时,调试器都会在启动时冻结...我无法复制和粘贴文本,因为整个 XCode 都冻结了,但我已经将其从其中一个拼凑在一起日志文件:
GNU gdb 6.3.50-20050815 (Apple version gdb-1518) (Sat Feb 12 02:56:02 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "--host=x86_64-apple-darwin --target=arm-apple-darwin".2#b2a16f854957b341^2@43"Xcode.IDEFoundation.ConsoleAdaptor.Debugger17"tty /dev/ttys000
(gdb)
手机没有冻结,因为我可以按主页按钮并继续在上面做其他事情。然而,Xcode 4 完全冻结,CPU 占用率为 99%,我必须强制退出并重新启动。
然而……真正奇怪的是我有一部 iPhone 3GS,而当我借用别人的 iPhone 4 时,它编译并运行得很好。当我切换回 iPhone 3GS 时,只有第一次没问题……之后,它又不断死机。
这可能是我正在做的事情,还是另一个 XCode 4 bug?我想尝试将调试器切换到 LLDB,但这并没有出现在“方案”窗口的下拉列表中...即使 Xcode 用户指南声明 GDB 和 LLDB 都可用:
谢谢!
This is a really weird bug...
I'm working on an iPhone project using the camera feed and running it through an OpenGL shader to apply effects to it. However, every time I simply create a new GLfloat in the code, the debugger freezes when launched... I can't copy and paste the text because the whole of XCode freezes up, but I've cobbled it together from one of the log files:
GNU gdb 6.3.50-20050815 (Apple version gdb-1518) (Sat Feb 12 02:56:02 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "--host=x86_64-apple-darwin --target=arm-apple-darwin".2#b2a16f854957b341^2@43"Xcode.IDEFoundation.ConsoleAdaptor.Debugger17"tty /dev/ttys000
(gdb)
The phone has not frozen, because I can hit the home button and carry on doing other stuff on it. However, Xcode 4 has completely frozen with a beachball running at 99% CPU, and I have to Force Quit and start it again.
However... The really strange thing is I have an iPhone 3GS, and when I borrow someone's iPhone 4 it compiles and runs fine. When I switch back to the iPhone 3GS, it's fine for the first time only... After that, it freezes constantly again.
Is this possibly something I am doing, or is it yet another XCode 4 bug? I wanted to try switching the debugger to LLDB, but that doesn't appear in my dropdown list in the Scheme window... Even though the Xcode User Guide states that both GDB and LLDB are available:
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我也在开发一个视频处理应用程序,这正是我所遇到的症状。
它以波浪形式起作用。
我不知道这是什么原因,但我正在慢慢收集事实来解决它:
上述所有问题,除了转动GDB 只能暂时解决问题 - 再运行几次后它就会回来......
I am working on a video processing app as well, and this is exactly the symptoms i am having.
it works in waves.
I don't know what the reason for this is, but i am slowly gathering facts to solve it:
all of the above except turning off GDB only solves the issue temporary - it comes back after few more runs...
当程序构建并开始运行时,尝试打开终端,并在前台(Xcode 顶部)。
另外,如果可能的话,尝试下载 xcode 4.1。这似乎永远解决了这个恼人的问题,而且我实际上可以再次使用调试器!
Try to have terminal open, AND IN THE FOREGROUND (ON TOP OF XCODE) when the program builds and begins running.
Also, if possible, try downloading xcode 4.1. This seemed to fix this annoying problem for good, AND I can actually use the debugger again !
我以前遇到过这个问题,今天一整天又开始出现这个问题。我已经尝试了各种方法,从清理项目到重新启动我的 iPad 和 MacBook Pro,甚至更换不同的电缆。
两次发生这种情况的有效方法:
我清理了项目,更改了构建目标,并在 iPhone 模拟器、iPad 模拟器上运行它。然后返回到原始(主)构建目标(实际应用程序)并在 iPhone 和 iPad 模拟器上运行它。所有这些都运行正确,所以我最终在 iPad 设备上运行了原始应用程序,它可以工作并且一直可以工作。
似乎清理项目、更改构建目标和在模拟器上运行的组合正在清除之前导致 XCode 和我的 iPad 设备挂起和冻结的某些内容。
祝你好运
I had this problem once before and it started happening again all day today. I've tried everything from cleaning the project to restart both my iPad and MacBook Pro and even swapping a different cable.
What worked the two times this has happened:
I cleaned the project, changed the build target, and ran it on the iPhone simulator, iPad simulator. Then returned to the original (main) build target (the actual app) and ran that on the iPhone and iPad simulators. All of those ran correctly, so I finally ran the original app on the iPad device and it worked and has kept working.
Seems like a combination of cleaning the project, changing build targets, and running on the simulator is flushing something out that previously caused XCode and my iPad device to hang and freeze.
Good luck
就我而言,这是错误的代码签名身份
In my case it was the wrong Code Signing Identity
最小化循环内的“NSLog”语句有助于使用 OpenGL ES、OpenCV 等的应用程序。
Minimizing "NSLog" statements within loops helps for applications using OpenGL ES, OpenCV, etc.