4

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.

This is the crash report:

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.

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.

Any ideas?

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
Ryan Tensmeyer
  • 865
  • 10
  • 26
  • 1
    I reinstalled and I still have the same problem :( – Ryan Tensmeyer Apr 05 '14 at 06:17
  • 1
    Tried this on the 5.1.1 GM Seed? – Sergey Grischyov Apr 09 '14 at 16:49
  • mac and device also should be rebooted – sage444 Apr 09 '14 at 16:56
  • 3
    Throw away the derived data folder (hey, it's like chicken soup, it might not help but it can't hurt) – matt Apr 09 '14 at 17:01
  • 1
    I have rebooted my mac and device. I tried deleting the derived data folder. No luck on either of these. I am currently downloading the 5.1.1 GM seed. – Ryan Tensmeyer Apr 10 '14 at 15:55
  • 1
    It still crashes on 5.1.1 – Ryan Tensmeyer Apr 10 '14 at 17:27
  • Well, the last refuge of a scoundrel is to assume that the project itself is hosed somehow, so maybe try making a new project and migrating the code into it? – matt Apr 10 '14 at 17:54
  • Experiencing similar issues but worse since 5.1.1. Reduced to using NSLog as any active breakpoint, once hit, will spawn the beach ball until I force quit Xcode. – verec Apr 15 '14 at 21:08
  • 1
    I have also been doing all my debugging using NSLog (sigh) – Ryan Tensmeyer Apr 16 '14 at 21:35
  • This is why I hate Xcode. Xcode is the worst piece of software ever written by Apple. Apple should buy AppCode, rename it to Xcode and we would be all happy. Why don't you download AppCode (you have a 30-days trial), so you can at least work today, while you figure out the problem. – Duck Apr 26 '14 at 18:55
  • have you tried to use disk utility to repair permissions? – Duck Apr 26 '14 at 18:58
  • @SpaceDog Using AppCode will let you continue to work (won't crash like Xcode), but you still cannot get debugger info on breakpoints. I'm having the same problem. Will report back as I sort it out. – ninehundreds Aug 05 '15 at 16:18

2 Answers2

0

I happened to have two iPhones connected via USB (a 4 with iOS 7.1 and a 5 with iOS 7.1.1), and Xcode 5.1.1 was "beach-balling" on me at the first break-point, wherever it might be, whichever breakpoint was hit first.

Just disconnected the iPhone 4 from USB.

I can use breakpoints again :)

YMMV of course ...

verec
  • 5,224
  • 5
  • 33
  • 40
  • In my case I am just using an emulator. Other projects are still working, so it seems to be a problem just in this project. – Ryan Tensmeyer Apr 28 '14 at 15:46
0

I encountered this problem as well recently with the same exact LLVM error:

Assertion failed: (!isNull() && "Cannot retrieve a NULL type pointer"), function getCommonPtr

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:

Correct:

@property(nonatomic, readwrite) Permission permission;

Wrong:

@property(nonatomic) Permission *permission;

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.

ninehundreds
  • 1,097
  • 2
  • 21
  • 43