I've had two users of my application write in with a very strange saving issue. After some time working with the application (it's a document based Cocoa application), the application stops allowing to save the document and the "Save" and "Save as…" main menu items are grayed out. Opening new documents apparently still works, however they come up with a blank canvas. I asked both users to check Console.app and those are the lines they found:
First user:
<Error>: kCGErrorFailure: _CGSBindWindowBacking: cannot map backing data shmem
<Error>: kCGErrorFailure: _CGSLockWindow: Unable to lock window
Second user:
kCGErrorIllegalArgument: CGSShapeWindow
kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
<Error>: kCGErr开发者_运维百科orIllegalArgument: CGSShapeWindow
<Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
<Error>: kCGErrorIllegalArgument: CGSShapeWindow
kCGErrorIllegalArgument: CGSShapeWindow
I tried my best to reproduce this issue, but without luck. I'm slowly running out of ideas what might cause this issue. Does anyone have any idea what is going on? Memory issue?
I sadly never really found a solution for this problem. Even had an Apple engineer look into this issue via a DTS. The work around that made this issue disappear was keeping images in a temp folder and only loading them into memory when needed. This greatly reduced my memory food print and made the issue go away.
精彩评论