当我退出应用程序时,出现此错误:
Apr 11 20:32:31 imac.subnet192.com NetCalc[25082] <Error>: kCGErrorIllegalArgument: _CGSFindSharedWindow: WID -1
Apr 11 20:32:31 imac.subnet192.com NetCalc[25082] <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
Apr 11 20:32:31 imac.subnet192.com NetCalc[25082] <Warning>: _CGSReferenceWindowByID: Window id 0xffffffff not found (locally or shared)
Apr 11 20:32:31 imac.subnet192.com NetCalc[25082] <Error>: kCGErrorIllegalArgument: CGSDeviceCreate: Invalid window
Apr 11 20:32:31 imac.subnet192.com NetCalc[25082] <Error>: Failed to create window context device
Apr 11 20:32:31 imac.subnet192.com NetCalc[25082] <Error>: CGWindowContextCreate: failed to create window context delegate.
2012-04-11 20:32:31.679 NetCalc[25082:707] _initWithWindowNumber: error creating graphics ctxt object for ctxt:0x136f3, window:0xffffffff
问题似乎不在代码中,启动后关闭应用程序(不接触任何内容)无论如何都会生成此错误消息。
更新:
- 仅当我退出应用程序右上角的“X”时才会出现该错误。如果我右键单击停靠栏或使用工具栏退出,则不会生成错误。
我不需要关闭应用程序即可出现错误。关上 window 就够了。
我已取消所有 socket 和操作的链接,仅保留默认配置。我仍然收到错误。
最佳答案
正如 Cubia 所说复选框“关闭时释放”可以解决该问题。如果没有,请取消选中“一次性”复选框。
关于objective-c - 退出时出现应用程序错误 - Objective-C,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10115972/