Error when closing window (cocoa application)

1.2k views Asked by At

this's a log which I get when close window in my application:

Nov 21 20:58:17 Mac-mini.local FirstGUIapp[3255] <Error>: kCGErrorIllegalArgument: _CGSFindSharedWindow: WID -1
Nov 21 20:58:17 Mac-mini.local FirstGUIapp[3255] <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
Nov 21 20:58:17 Mac-mini.local FirstGUIapp[3255] <Warning>: _CGSReferenceWindowByID: Window id 0xffffffff not found (locally or shared)
Nov 21 20:58:17 Mac-mini.local FirstGUIapp[3255] <Error>: kCGErrorIllegalArgument: CGSDeviceCreate: Invalid window
Nov 21 20:58:17 Mac-mini.local FirstGUIapp[3255] <Error>: Failed to create window context device
Nov 21 20:58:17 Mac-mini.local FirstGUIapp[3255] <Error>: CGWindowContextCreate: failed to create window context delegate.
2011-11-21 20:58:17.307 FirstGUIapp[3255:403] _initWithWindowNumber: error creating graphics ctxt object for ctxt:0xefef, window:0xffffffff

Everything works fine until I close application: when it enters into applicationWillTerminate method these messages appear in log and app crashes.

I just open and close application, no code executes after launching

I don't know if it matter, but I have also Clipped Content warning in MainMenu.xib (at push button)

Thanks

1

There are 1 answers

0
deksan On

It seems your windows ptr is equal 0xFFFFFFFF which is most probaly a bad sign, do you have the source of applicationWillTerminate? Are you trying to access to the windows in any way ?