开发者

CGContextSetCompositeOperation error for some users when drawing NSWindow

A simple 10.6 Cocoa app I wrote that basically draws a regular window with some buttons and text has been spewing hundreds of console log messages开发者_运维技巧:

      <Error>: CGContextSetCompositeOperation: invalid context 0x0

I do not directly call drawRect: and always use setNeedsDisplay:YES when I need to refresh.

Interestingly, this error does not happen on all machines, I'd say about 50% get the error. However, the program works fine in either case!

Anyone got any clue as to what this error means, where it's stemming from, and more importantly, how can I suppress/get rid of it?

Thanks


Try setting a breakpoint on CGPostError. If you can break on the logging, you can hopefully figure out what's going on.

You shouldn't be looking to just suppress it. It means context creation is failing (thus NULL gets passed for some context parameter), and that's not good.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜