[Top][All Lists]

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

Re: Disappointed by GNUstep

From: Gregory Casamento
Subject: Re: Disappointed by GNUstep
Date: Mon, 7 Feb 2022 11:11:08 -0500

It’s worth noting that ARC is no panacea.  It will not magically solve all of the problems we have with memory management. 

On Mon, Feb 7, 2022 at 09:14 Sergei Golovin <> wrote:
On 2022-02-06 22:50:07 +0400 Fred Kiefer <> wrote:

> Your change looks great to me, as always. Let's just hope it does not
> break
> anything for the other two issues that caused the different changes
> on that
> code.

That one issue in December was due to deallocation of NSPopUpButtonCell
causing to call -[synchronizeTitleAndSelectedItem] followed with
of the _menuItem, its _menu  and all dependants (validators) where
the segfault occurs because one of the validators has been deallocated

#0  0x00007ffff6ee9415 in objc_msg_lookup () from
#1  0x00007ffff7845af0 in -[NSApplication targetForAction:to:from:]
(self=0x5555559683a0, _cmd=0x7ffff7c72330 <_OBJC_SELECTOR_TABLE+2384>,
     theAction=0x555555ad8570, theTarget=0x555555e464b0,
sender=0x555555d1feb0) at NSApplication.m:2294
#2  0x00007ffff7949ca8 in -[NSMenu _autoenableItem:]
(self=0x555555d1fa40, _cmd=0x7ffff7c723f0 <_OBJC_SELECTOR_TABLE+2576>,
     item=0x555555d1feb0) at NSMenu.m:1184
#3  0x00007ffff794a078 in -[NSMenu update] (self=0x555555d1fa40,
_cmd=0x7ffff7c721a0 <_OBJC_SELECTOR_TABLE+1984>) at NSMenu.m:1260
#4  0x00007ffff7948f56 in -[NSMenu itemChanged:] (self=0x555555d1fa40,
_cmd=0x7ffff7c79650 <_OBJC_SELECTOR_TABLE+496>,
     anObject=0x555555d1fdd0) at NSMenu.m:878
#5  0x00007ffff7957bdd in -[NSMenuItem setImage:]
(self=0x555555d1fdd0, _cmd=0x7ffff7c98cf0 <_OBJC_SELECTOR_TABLE+1168>,
     at NSMenuItem.m:375
#6  0x00007ffff797c589 in -[NSPopUpButtonCell setMenuItem:]
(self=0x555555d1fc60, _cmd=0x7ffff7c98da0 <_OBJC_SELECTOR_TABLE+1344>,
     at NSPopUpButtonCell.m:652
#7  0x00007ffff797cf77 in -[NSPopUpButtonCell
synchronizeTitleAndSelectedItem] (self=0x555555d1fc60,
     _cmd=0x7ffff7c98ac0 <_OBJC_SELECTOR_TABLE+608>) at
#8  0x00007ffff797b631 in -[NSPopUpButtonCell setMenu:]
(self=0x555555d1fc60, _cmd=0x7ffff7c98940 <_OBJC_SELECTOR_TABLE+224>,
     at NSPopUpButtonCell.m:218
#9  0x00007ffff797b284 in -[NSPopUpButtonCell dealloc]
(self=0x555555d1fc60, _cmd=0x7ffff7534970 <_OBJC_SELECTOR_TABLE+48>)
     at NSPopUpButtonCell.m:153

May be doing that is excessive in the context  of deallocation?

The attached patch changes the -[dealloc] to do the code chunk
equivalent to -[setMenu:nil]
avoiding that -[NSPopUpButtonCell synchronizeTitleAndSelectedItem] and


Gregory Casamento
GNUstep Lead Developer / OLC, Principal Consultant - - Become a Patron - My GNUstep GoFundMe - Store

reply via email to

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