discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Debugging hints


From: Christopher Armstrong
Subject: Re: Debugging hints
Date: Thu, 28 Jul 2005 15:16:23 +1000

On Wed, 2005-07-27 at 10:17 -0400, Andrew Ruder wrote:
> Christopher Armstrong wrote:
> > Does anyone have any ideas as to how I can locate this object, or get
> > some idea of what it was? Perhaps I should start by breakpointing at the
> > method that handles changing the Preferences panel? 
> 
> You can also try setting NSZombieEnabled environment variable to "YES". 
>   This will cause any deallocated object to spam to the console when it 
> has been deallocated and gets sent a message.  Once you figure out what 
> the object is, you are in good shape to track it down if you are 
> familiar with the source.

This environment variable worked (when I turn on debugging symbols, the
program seems to go into an infinite loop or just hang - this seems to
be another problem). Thanks for the tip. It turns out, that the Colors
module in Preferences releases an instance of NSWindow (instantiated
when it's nib is loaded). The design of this program seems to be as
such, that every module has a nib file, where one of the windows in the
nib has its contentView ripped out, inserted in the Preferences window,
and is subsequently destroyed ([window release]).

This follows correctly with Gorm's documentation, which states that
NSOwner's are responsible for releasing anything connected to an outlet
(one of the outlets on all the nib files is "window"). Other modules do
the same, but for some reason, this one has the NSWindow instance put
into the autorelease pool (or two, as the error messages reveal
something tries to release it twice). I'm unable to get it to create the
same behaviour on Linux, so I'm thinking this a problem in the backend
or gnustep-gui. Commenting out the 

[window release]

line solves the problem, but I don't think this is "correct". This seems
to be a complex problem, what documentation would people recommend that
I read to solve who's responsible here? Has anyone else found this
problem (I'm using Backbone cvs with GNUstep cvs)?



-- 
Christopher Armstrong <quineska @AT@ gamebox dot NET>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]