On Monday, October 28, 2002, at 01:30  am, Adam Fedor wrote:

Charles Philip Chan wrote:
There seem to be a problem with GWorkspace.app and GNUstep cvs dated
Oct. 26. The problem is that whenever an Inspector panel is closed the
program segfaults. Here is the backtrace:
#0  0x405054c7 in objc_msg_lookup () from /usr/local/lib/libobjc.so.1
#1  0x080810ea in -[GenericContsView dealloc] (self=0x83f94c0,

I see the problem. NSTextView knows it is going to be dealloc'd twice, so it makes arrangements not to release its ivars prematurely. However, subclasses (GenericContsView) do not know this so they happily release their ivars twice.
In an ideal world, dealloc methods would be defensively coded so that they cleaned up their ivars
and could be safely called more than once ... however that's rather a lot to ask :-)

Unfortuneatly, in this case, knowing the problem does not make it easy to solve :-(
I've committed what I hope is a simple fix to CVS

This is to morph the subclass into an NSTextView class the first time dealloc is called,
so the second time it's called the subclas dealloc methods should not get executed.



_______________________________________________
Bug-gnustep mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-gnustep


Reply via email to