Setting wantsLayer = YES; crashes on view load.
Setting wantsLayer = YES; crashes on view load.
- Subject: Setting wantsLayer = YES; crashes on view load.
- From: Kevin Ross <email@hidden>
- Date: Sun, 31 May 2009 23:31:15 -0700
Hi everyone, I have a Core Data document based app that I've been
working on for a while and I now want to change some of the view
drawing to use CALayers. The trouble I'm having is that when I set a
view's wantsLayer = YES, I end up getting EXC_BAD_ACCESS. This
happens when I try to set it on any arbitrary view in any of the nibs
in my project, when setting it from code, or from clicking the
checkbox in IB. I've tried new CALayer projects from scratch and they
work fine, is there something I could have done to my project that
would prevent me from setting a view's wantsLayer property to YES?
Thank you for taking time to read this.
Kevin Ross
Stack Trace of crash:
#0 0x9129c688 in objc_msgSend ()
#1 0x91bbe7a6 in +[NSConcreteNotification
newTempNotificationWithName:object:userInfo:] ()
#2 0x91bc158d in _nsnote_callback ()
#3 0x951fa64a in __CFXNotificationPost ()
#4 0x951fa923 in _CFXNotificationPostNotification ()
#5 0x951fac18 in CFNotificationCenterPostNotification ()
#6 0x9368250c in CARenderContextNew ()
#7 0x9365671a in -[CAContextImpl initWithOptions:] ()
#8 0x936823cf in +[CAContext localContextWithOptions:] ()
#9 0x93682386 in +[CAContext localContext] ()
#10 0x93682296 in CAViewCreate ()
#11 0x930643d0 in -[NSView(NSInternal) _createLayerTreeRenderer] ()
#12 0x930642ac in -[NSView(NSLayerKitGlue)
_setUpLayerTreeRendererAndSurface] ()
#13 0x92df5e51 in -[NSView lockFocusIfCanDraw] ()
#14 0x92df58b1 in -[NSView lockFocus] ()
#15 0x92df9c4b in -[NSView
_recursiveDisplayAllDirtyWithLockFocus:visRect:] ()
#16 0x92dfa0ba in -[NSView
_recursiveDisplayAllDirtyWithLockFocus:visRect:] ()
#17 0x92dfa0ba in -[NSView
_recursiveDisplayAllDirtyWithLockFocus:visRect:] ()
#18 0x92dfa0ba in -[NSView
_recursiveDisplayAllDirtyWithLockFocus:visRect:] ()
#19 0x92dfa0ba in -[NSView
_recursiveDisplayAllDirtyWithLockFocus:visRect:] ()
#20 0x92df8679 in -[NSView
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView
:] ()
#21 0x92df7fbb in -[NSThemeFrame
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView
:] ()
#22 0x92df4adf in -[NSView
_displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] ()
#23 0x92d354b3 in -[NSView displayIfNeeded] ()
#24 0x92d35061 in -[NSWindow displayIfNeeded] ()
#25 0x92df0c37 in -[NSWindow
_reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:] ()
#26 0x92df0690 in -[NSWindow orderWindow:relativeTo:] ()
#27 0x92e2270d in -[NSWindow orderFront:] ()
#28 0x92d03503 in -[NSIBObjectData
nibInstantiateWithOwner:topLevelObjects:] ()
#29 0x92cf9616 in loadNib ()
#30 0x92cf8f78 in +[NSBundle(NSNibLoading)
_loadNibFile:nameTable:withZone:ownerBundle:] ()
#31 0x92cf8bbb in +[NSBundle(NSNibLoading)
loadNibFile:externalNameTable:withZone:] ()
#32 0x92d38ed9 in -[NSWindowController loadWindow] ()
#33 0x92d38c72 in -[NSWindowController window] ()
#34 0x92d38b9a in -[NSWindowController showWindow:] ()
#35 0x92d38add in -[NSDocument showWindows] ()
#36 0x92d36da4 in -[NSDocumentController
openUntitledDocumentAndDisplay:error:] ()
#37 0x92f229ea in -[NSDocumentController newDocument:] ()
#38 0x92e044cb in -[NSApplication sendAction:to:from:] ()
#39 0x92eb3108 in -[NSMenu performActionForItemAtIndex:] ()
#40 0x92eb2e0d in -[NSCarbonMenuImpl
performActionWithHighlightingForItemAtIndex:] ()
#41 0x92eb2a93 in -[NSMenu performKeyEquivalent:] ()
#42 0x92eb1338 in -[NSApplication _handleKeyEquivalent:] ()
#43 0x92dce0fb in -[NSApplication sendEvent:] ()
#44 0x92d2b62f in -[NSApplication run] ()
#45 0x92cf8834 in NSApplicationMain ()
_______________________________________________
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