Re: Why would NSViewController loadView fail?
On Aug 31, 2009, at 5:06 PM, Corbin Dunn wrote: On Aug 31, 2009, at 1:59 PM, Jonathan Hess wrote: I would try running with zombies. And now that you have SnowLeopard, this should be the first thing you (meaning, the collective of Cocoa programmers out there) should do: In Xcode: Run -> Run with Performance Tool -> Zombies Then, reproduce the crashing steps. Yep, I concur - especially since this appears to have found the problem, which, as it turns out, has nothing to do with loading my view. I don't have a solution yet, but at least I believe I know where to look. Thanks again. My guess is that I am simply getting lucky in 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
Re: Why would NSViewController loadView fail?
On Aug 31, 2009, at 1:59 PM, Jonathan Hess wrote: I would try running with zombies. And now that you have SnowLeopard, this should be the first thing you (meaning, the collective of Cocoa programmers out there) should do: In Xcode: Run -> Run with Performance Tool -> Zombies Then, reproduce the crashing steps. -corbin It sounds like one of the objects loaded by the NIB file is being over released. Jon Hess On Aug 31, 2009, at 1:55 PM, Eric Gorr wrote: On Aug 31, 2009, at 3:58 PM, Kyle Sluder wrote: On Mon, Aug 31, 2009 at 12:26 PM, Eric Gorr 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/jhess%40apple.com This email sent to jh...@apple.com ___ 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/corbind%40apple.com This email sent to corb...@apple.com ___ 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
Re: Why would NSViewController loadView fail?
I would try running with zombies. It sounds like one of the objects loaded by the NIB file is being over released. Jon Hess On Aug 31, 2009, at 1:55 PM, Eric Gorr wrote: On Aug 31, 2009, at 3:58 PM, Kyle Sluder wrote: On Mon, Aug 31, 2009 at 12:26 PM, Eric Gorr 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/jhess%40apple.com This email sent to jh...@apple.com ___ 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
Re: Why would NSViewController loadView fail?
On Aug 31, 2009, at 4:54 PM, Jonathan Hess wrote: On Aug 28, 2009, at 1:36 PM, Eric Gorr wrote: I am pretty sure I've got my .xib setup correctly, but when I call loadView on my View Controller, my application crashes. Unfortunately, I am not getting any useful information out of the crash. The only thing I appear to have is a stack trace, but I am not sure what it is telling me. #0 0x906e9911 in __CFBasicHashDeallocate #1 0x906d1bab in _CFRelease #2 0x906fe5bd in _CFAutoreleasePoolPop #3 0x92c1de62 in NSPopAutoreleasePool #4 0x96811c95 in -[NSNib instantiateNibWithExternalNameTable:] #5 0x96811968 in -[NSNib instantiateNibWithOwner:topLevelObjects:] #6 0x96810de1 in -[NSViewController loadView] Anyone have an idea? -[NSViewController loadView] is a method that's meant to be overridden instead of directly invoked. Does the crash reproduce if you call -[NSViewController view] instead? Yes. I actually modified the code to call load view directly. The original code did as you suggestedand, yes, it crashes. ___ 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
Re: Why would NSViewController loadView fail?
On Aug 31, 2009, at 3:58 PM, Kyle Sluder wrote: On Mon, Aug 31, 2009 at 12:26 PM, Eric Gorr 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
Re: Why would NSViewController loadView fail?
On Aug 28, 2009, at 1:36 PM, Eric Gorr wrote: I am pretty sure I've got my .xib setup correctly, but when I call loadView on my View Controller, my application crashes. Unfortunately, I am not getting any useful information out of the crash. The only thing I appear to have is a stack trace, but I am not sure what it is telling me. #0 0x906e9911 in __CFBasicHashDeallocate #1 0x906d1bab in _CFRelease #2 0x906fe5bd in _CFAutoreleasePoolPop #3 0x92c1de62 in NSPopAutoreleasePool #4 0x96811c95 in -[NSNib instantiateNibWithExternalNameTable:] #5 0x96811968 in -[NSNib instantiateNibWithOwner:topLevelObjects:] #6 0x96810de1 in -[NSViewController loadView] Anyone have an idea? -[NSViewController loadView] is a method that's meant to be overridden instead of directly invoked. Does the crash reproduce if you call - [NSViewController view] instead? Jon Hess ___ 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/jhess%40apple.com This email sent to jh...@apple.com ___ 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
Re: Why would NSViewController loadView fail?
On Mon, Aug 31, 2009 at 12:26 PM, Eric Gorr wrote: > Building and running it on Snow Leopard causes it to crash horribly. Try reopening/resaving your nib in the latest Interface Builder? --Kyle Sluder ___ 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
Re: Why would NSViewController loadView fail?
On Aug 28, 2009, at 4:36 PM, Eric Gorr wrote: I am pretty sure I've got my .xib setup correctly, but when I call loadView on my View Controller, my application crashes. Unfortunately, I am not getting any useful information out of the crash. The only thing I appear to have is a stack trace, but I am not sure what it is telling me. #0 0x906e9911 in __CFBasicHashDeallocate #1 0x906d1bab in _CFRelease #2 0x906fe5bd in _CFAutoreleasePoolPop #3 0x92c1de62 in NSPopAutoreleasePool #4 0x96811c95 in -[NSNib instantiateNibWithExternalNameTable:] #5 0x96811968 in -[NSNib instantiateNibWithOwner:topLevelObjects:] #6 0x96810de1 in -[NSViewController loadView] Anyone have an idea? Well, this problem just got a little stranger. Apparently, I can build and run the same code on Leopard and it will work just fine. Building and running it on Snow Leopard causes it to crash horribly. Very weird. If anyone has an idea, I'm interested. ___ 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