当它碰到一个断点时,Xcode 5.1崩溃 [英] Xcode 5.1 crashes when it hits a break point
问题描述
我一直在开发一个应用程序,并已能够调试它。所有的突然,我不能使用断点没有Xcode 5.1崩溃。它会在断点处停止,看起来像是试图在左下角窗口中显示局部变量,然后崩溃。
I have been working on an App today and have been able to debug it. All of the sudden I can't use breakpoints without Xcode 5.1 crashing. It will stop on the breakpoint, look like it's trying to display the local variables in the bottom left window, and then crash.
这是崩溃报告:
Process: Xcode [8084]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 5.1 (5084)
Build Info: IDEFrameworks-5084000000000000~21
App Item ID: 497799835
App External ID: 444172641
Code Type: X86-64 (Native)
Parent Process: launchd [189]
Responsible: Xcode [8084]
User ID: 294396280
Date/Time: 2014-04-03 14:57:52.981 -0600
OS Version: Mac OS X 10.9.2 (13C64)
Report Version: 11
Anonymous UUID: 5BFD5C24-5465-3BC8-137A-4BF1A8D48B38
Sleep/Wake UUID: F94AB6A7-9517-4F94-93DA-CC2C9154C8A7
Crashed Thread: 30 DBGLLDBSessionThread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Application Specific Information:
ProductBuildVersion: 5B130a
Assertion failed: (!isNull() && "Cannot retrieve a NULL type pointer"), function getCommonPtr, file /SourceCache/lldb/lldb-310.2.36/llvm/tools/clang/include/clang/AST/Type.h, line 547.
(如果有用的话,我可以提供线程正在做的报告的其余部分)。
(I can supply the rest of the report of what the threads are doing if it is helpful).
我在代码中的各种文件和位置放置了断点。我可以在一些地方使用断点,但大多数断点导致崩溃。
I have placed breakpoints in various files and locations in the code. I am able to use breakpoints in some places, but the majority of the breakpoints cause the crash.
我浏览了几个SO页面没有运气。
I have looked through several SO pages with no luck. Among other things I have tried deleting all the breakpoints and just adding 1 back in. I have deleted and regenerated the schemes.
任何想法?
我更新到5.1.1。并且问题仍然存在:
I updated to 5.1.1. and the problem still exists:
Process: Xcode [19072]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 5.1.1 (5085)
Build Info: IDEFrameworks-5085000000000000~10
Code Type: X86-64 (Native)
Parent Process: launchd [197]
Responsible: Xcode [19072]
User ID: 294396280
推荐答案
我最近遇到了这个问题,以及相同的LLVM错误:
I encountered this problem as well recently with the same exact LLVM error:
断言失败:(!isNull()&&无法检索NULL类型
指针),函数getCommonPtr
Assertion failed: (!isNull() && "Cannot retrieve a NULL type pointer"), function getCommonPtr
在我的例子中,它是一段代码,我在另一个对象中存储枚举值(Permission)作为引用,而不是一个值:
In my case it was a piece of code where I was storing an enum value (Permission) within another object as a reference, rather than a value:
正确:
@property(nonatomic, readwrite) Permission permission;
错误:
@property(nonatomic) Permission *permission;
我能够通过运行Xcode的代码分析来缩小问题范围。在我对每个类中的一个或多个警告进行更正后,我将重新运行分析,然后测试并提交。冗长但有效,现在我可以正确调试。希望这有助于引导某人在正确的方向。
I was able to narrow down the problem by running Xcode's code analysis. After I made a correction to one or more of the warnings in each class I would rerun the analysis, then test and commit. Tedious but effective, and now I can debug again properly. Hope this helps steer someone in the right direction.
这篇关于当它碰到一个断点时,Xcode 5.1崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!