On Aug 31, 2009, at 3:58 PM, Kyle Sluder wrote:

On Mon, Aug 31, 2009 at 12:26 PM, Eric Gorr<mail...@ericgorr.net> wrote:
Building and running it on Snow Leopard causes it to crash horribly.

Try reopening/resaving your nib in the latest Interface Builder?


Thanks. I did try that, but it didn't help.

I tried using this .xib file in a simple test application, created the view controller, sent it the loadView message...it worked.

I have also tried starting with a fresh .xib file, created with the newest IB, and it will crash while trying to load the view.

Clearly, I am doing something bad, which Leopard is tolerant of, but Snow Leopard isn't - What that is, I am not sure.


Here is a more complete stack trace:

#0      0x908b3911 in __CFBasicHashDeallocate
#1      0x9089bbab in _CFRelease
#2      0x908c85bd in _CFAutoreleasePoolPop
#3      0x90a3ce62 in NSPopAutoreleasePool
#4      0x95e8ac95 in -[NSNib instantiateNibWithExternalNameTable:]
#5      0x95e8a968 in -[NSNib instantiateNibWithOwner:topLevelObjects:]
#6      0x95e89de1 in -[NSViewController loadView]
#7 0x01275ef8 in -[BasePaletteController awakeFromNib] at BasePaletteController.mm:117 #8 0x95dd0622 in -[NSIBObjectData nibInstantiateWithOwner:topLevelObjects:]
#9      0x95dce5aa in loadNib
#10 0x95dcd9a4 in +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:] #11 0x95dcd8b5 in +[NSBundle(NSNibLoading) loadNibFile:externalNameTable:withZone:]
#12     0x95e5d6ab in -[NSWindowController loadWindow]
#13     0x95df441a in -[NSWindowController window]
#14     0x0007f180 in IsCocoaPaletteVisible at Palettes.Mac.mm:129

Basically, what happens is that the window controller that is managing the palette is asked if it is visible:

[[aController window] isVisible]

Since it hasn't been loaded yet, Cocoa loads the window and sends the controller the awakeFromNib message.

The view on the window has it's own controller. awakeFromNib needs access to the view, which causes the view controller to load it.

The moment it tries, the application crashes in Snow Leopard, but not Leopard.


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to