Re: CGGStackRestore: gstack underflow
Re: CGGStackRestore: gstack underflow
- Subject: Re: CGGStackRestore: gstack underflow
- From: Ryan Brown <email@hidden>
- Date: Wed, 6 Aug 2008 02:41:21 -0700
A shot in the dark...
Are you manually activating the run loop using NSDefaultRunLoopMode? I
recently encountered the same problem (using Core Animation as well),
and eventually tracked it down to the way I was waiting for messages
from a CFMessagePort to arrive. Specifying a custom run loop mode
caused the problem to go away, and I'm still mystified as to why.
If that isn't it, I'd check that you are using Core Animation
properly. Is the NSView a layer-hosting or layer-backed view? Does it
have any NSView subviews or CALayer sublayers? Read this if you
haven't already:
http://developer.apple.com/documentation/GraphicsImaging/Conceptual/Animation_Overview/ChooseAnimTech/chapter_5_section_3.html#/
/apple_ref/doc/uid/TP40004952-CH5-SW4
Best,
Ryan
On Aug 5, 2008, at 10:08 PM, Gordon Apple wrote:
It does not appear to come from anything in my drawing code. It only
happens when I use layers. The view in a scroller. Moving the
scroll bars
or resizing the window results in a flood of such console messages.
The
drawLayer:inContext: appears to be balanced:
NSGraphicsContext *nsGraphicsContext;
nsGraphicsContext = [NSGraphicsContext
graphicsContextWithGraphicsPort:ctx flipped:YES ];
[NSGraphicsContext saveGraphicsState];
[NSGraphicsContext setCurrentContext:nsGraphicsContext];
... (My drawing)
[NSGraphicsContext restoreGraphicsState];
This was straight out of the Core Animation Cookbook.
On 8/5/08 5:09 PM, "Kyle Sluder" <email@hidden>
wrote:
On Tue, Aug 5, 2008 at 5:44 PM, Gordon Apple <email@hidden> wrote:
What should I be looking for to find the problem?
I'm not a CoreGraphics expert, but my first instinct is too many
calls
to -[NSGraphicsContext restoreGraphicsState].
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden