I'm getting a strange CoreGraphics error from the following code:
NSView *docView = [[[webView mainFrame] frameView] documentView];
NSSize s = [docView bounds].size;
[[docView window] display];
[[docView window] setContentSize:s]; // Commenting this line removes the errors.
Here are the errors:
a.out[20033] : unknown error code: invalid memory allocation
a.out[20033] : kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
a.out[20033] : unknown error code: invalid memory allocation
a.out[20033] : unknown error code: invalid memory allocation
I've been running this code for the last week and never had a problem until today. Any ideas what is causing it?