Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSImage lockFocus throws exception?



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.