0

I'm writing a C++ program in Xcode 3.2 for CS106B and I've started getting this error message output to the console window:

Wed Aug  3 15:46:44 cljs-macbook-pro-17.local StanfordCS106BAssignment2[3543] <Error>:   
kCGErrorIllegalArgument: CGSDeviceUnlock: Invalid device lock
Wed Aug  3 15:46:44 cljs-macbook-pro-17.local StanfordCS106BAssignment2[3543] <Error>: 
kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.

I think I must have done something with breakpoints that the compiler doesn't like for some reason, but I'm not sure what. Is there any way to get it to stop doing that?

Slayer0248
  • 1,231
  • 3
  • 15
  • 26

1 Answers1

0

It looks like a bug in the graphics library. Quick fix is to put a WaitForMouseDown() right after you redraw the display if it is causing it to crash. I tried just using sleep for a few milliseconds, but that didn't seem to do it.

Seth Archer Brown
  • 1,141
  • 4
  • 12
  • 27