关闭窗口时出错(可可应用程序)
这是我在应用程序中关闭窗口时收到的日志:
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 中显示了剪切内容警告(在按钮处)
谢谢
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看来你的Windows ptr等于0xFFFFFFFF,这很可能是一个坏兆头,你有applicationWillTerminate的来源吗?您是否尝试以任何方式访问窗口?
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 ?