discuss-gnustep
[Top][All Lists]
Advanced

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

Re: GNUMail - editing window crash


From: Fred Kiefer
Subject: Re: GNUMail - editing window crash
Date: Wed, 05 Feb 2014 23:57:52 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

I committed a change that should resolve this issue. now when the window
of the NSWindowController is set to nil or another window the old one
gets its delegate clears if that was set to the owner of the
NSWindowController (which most often is self).

I am not really convinced by this change, as we never should clear
something that we do not set ourself.

Fred

On 05.02.2014 02:24, Riccardo Mottola wrote:
> Hi,
> 
> Fred Kiefer wrote:
>> That is a good question. A window controller sets its window to nil,
>> when it gets deallocated. This releases the window and should cut the
>> connection from the window to the controller. But only the connections
>> GNUstep knows about. If your code sets the controller as the delegate of
>> the window (Why do you do this? You don't seem to need it on MacOSX),
>> you will need to override the -setWindow: and clean out the delegate
>> when the window gets reset.
> I do not know why it is done, I only think it is done on MacOSX too..
> 
> What do you mean by "clean out the delegate" ?
> 
> I did an override in the controller's setWindow method and printed it
> out. I indeed get two calls, one at open time, one at close time:
> 
> 2014-02-05 01:21:05.141 GNUMail[5089] Controller setWindow! <EditWindow:
> 0x2bf325c8>Number: 21 Title: Window, Window
> 2014-02-05 01:21:24.086 GNUMail[5089] Controller setWindow! (null), (null)
> Segmentation fault (core dumped)
> 
> however since I get it called with null, I suppose it is cleaning up,
> that is removing the window from the controller. Nothing I can "clean
> up" in null, reset its delegate.
> 
> Riccardo




reply via email to

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