这是我在申请中关闭窗口时得到的日志:
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
在我关闭应用程序之前一切正常:当它进入 applicationWillTerminate 方法时,这些消息会出现在日志和应用程序崩溃中。
我只是打开并关闭应用程序,启动后没有代码执行
我不知道是否重要,但我在MainMenu.xib中也有剪辑内容警告(按下按钮)
由于
答案 0 :(得分:0)
看来你的windows ptr等于0xFFFFFFFF,这很可能是一个坏兆头,你有applicationWillTerminate的来源吗?您是否尝试以任何方式访问Windows?