• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSGraphicsContext restore crashes my xtension
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSGraphicsContext restore crashes my xtension


  • Subject: Re: NSGraphicsContext restore crashes my xtension
  • From: email@hidden
  • Date: Sun, 27 Jul 2008 17:57:44 +0000

 -------------- Original message ----------------------
From: glenn andreas <email@hidden>
>
> You're setting a graphics context:
> > 	// uncommenting the next line works fine for all ads except the
> > last which
> > 	// causes a crash after the last ad image is placed.
> > 	//[NSGraphicsContext setCurrentContext: nsContext];
>
> But you're never restoring the original context, and as a result, the
> context is autoreleased later (and is still the current context).
> saveGraphicsState and restoreGraphicsState only saves and restores the
> state of the current context - it doesn't save/restore the current
> context...

If you look a couple of lines down from that one, you'll see

[nsContext restoreGraphicsState];

 It doesn't seem to make any difference when I uncomment that line as the gdb backtrace of the crash is exactly the same.

Is that "restoreGraphicsState " what you mean?
_______________________________________________

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

  • Follow-Ups:
    • Re: NSGraphicsContext restore crashes my xtension
      • From: glenn andreas <email@hidden>
  • Prev by Date: Re: NSGraphicsContext restore crashes my xtension
  • Next by Date: Re: observers removed?
  • Previous by thread: Re: NSGraphicsContext restore crashes my xtension
  • Next by thread: Re: NSGraphicsContext restore crashes my xtension
  • Index(es):
    • Date
    • Thread