• 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
NSImage lockFocus throws exception?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSImage lockFocus throws exception?


  • Subject: NSImage lockFocus throws exception?
  • From: John Stiles <email@hidden>
  • Date: Tue, 20 Mar 2007 18:51:34 -0700

I'm trying to use NSImage from within a largely Carbon-based application.
I can create an image fine by using NSImage's initWithData. It succeeds, and if I ask for its size with [[[image representations] objectAtIndex:0] size], it is correct.
However, when I call [image lockFocus], I get the following error:


*** Uncaught exception: <NSInternalInconsistencyException> Error (1002) creating CGSWindow

The stack crawl is:

#0 0x9282447f in _NSRaiseError ()
#1 0x9284b23f in +[NSException raise:format:] ()
#2 0x932d22ae in _NXCreateWindow ()
#3 0x932d209a in CreateWindowNamed ()
#4 0x932d1cef in NewCacheWindowInfo ()
#5 0x932d1847 in _NXAllocateImageCache ()
#6 0x932d0f8a in -[NSCachedImageRep _initWithSize:depth:separate:alpha:allowDeep:] ()
#7 0x932d6cd3 in -[NSImage _focusOnCache:] ()
#8 0x932d698e in -[NSImage _cacheRepresentation:stayFocused:] ()
#9 0x932d689d in -[NSImage _lockFocusOnRep:] ()
#10 0x932d0d68 in -[NSImage lockFocus] ()
#11 0x003cb966 in my program


Has anyone seen this before? Any ideas?

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: NSImage lockFocus throws exception?
      • From: Shawn Erickson <email@hidden>
    • Re: NSImage lockFocus throws exception?
      • From: John Pannell <email@hidden>
  • Prev by Date: Re: Switching NSArrayControllers around
  • Next by Date: setFrameUsingName and (auto resizing) palette windows
  • Previous by thread: Re: NSData dataWithBytes problem on Intel
  • Next by thread: Re: NSImage lockFocus throws exception?
  • Index(es):
    • Date
    • Thread