gnustep-dev
[Top][All Lists]
Advanced

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

Re: Crashes in GUI when applying a theme (Thematic)


From: Riccardo Mottola
Subject: Re: Crashes in GUI when applying a theme (Thematic)
Date: Tue, 24 Nov 2020 23:53:43 +0100
User-agent: GNUMail (Version 1.3.0)

Hi Richard!

My investigation confirms (I used NSZombieEnabled=YES and set a breakpoint at the log of the priblem, and lookd at the stack) that we have a deallocated object. Specifically the exception is in [[_attachedMenu _owningPopUp] pullsDown] when the -pullsDown message is sent to the _owningPopUp as a result of an NSMenuView receiving a GSThemeDidActivateNotification. Presumably the reason is that the NSMenuView has been detached from somthing in which the NSPopUpButtonCell has been deleted/deallocated, but as the view has not been deallocated it still receives the notification and tried to redraw.

I think adding [_menu _setOwnedByPopUp: nil] and DESTROY(_menu) near the end of NSPopUpButtonCell's -dealloc may be the correct fix, since the popup owns/retains the menu and appears to be leaking it.


I did some research myself and you seem to be very close to a solution. The best way to fix it would be to call [self setMenu: nil] at that place, but, as a very old changelog entry tells, I tried that before and it gave some issues in GNUMail. For now I will add your suggested changes and get Riccardo to test all his favourite applications to see whether this causes any damage.


After some discussion ad tests with Fred, I pushed on his behalf his proposed solution. It needs to be tested the following days. I did have a run on most applications without any apparent harm (including GNUMail).

We need to settle this some days! No immediate harm has been found to GNUMail or Thematic, although with both I can reproduce some crashes, but I think they are unrelated to this bug.

E.g. in Thematic open GAP's "WinClassic" theme which has horizontal (possibly open before another theme, then open that one) Thematic will just close, exiting, mystierously, without a crash...

And I have strange issues with passwords in GNUmail, but all unrelated, it is just I am testing things... both with gcc runtime and libobjc2 runtime.

Thumbs up! Riccardo




reply via email to

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