bug-gnustep
[Top][All Lists]
Advanced

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

[bug #61727] Premature cleanup in NSPopUpButtonCell -dealloc crashes app


From: Yavor Doganov
Subject: [bug #61727] Premature cleanup in NSPopUpButtonCell -dealloc crashes application
Date: Fri, 24 Dec 2021 02:06:59 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0

Follow-up Comment #3, bug #61727 (project gnustep):

I always suspect a bug in the application, especially if it's old code with
dead upstream as is the case.  I spent some time studying the code, trying to
fix some obvious bugs, etc.  It took me a while to come to the conclusion that
the crash is caused by that commit.  Running with NSZombieEnabled confirms the
theory from the code comment:


$ NSZombieEnabled=YES GTAMSAnalyzer
2021-12-24 08:58:13.907 GTAMSAnalyzer[57081:57081] NSDocumentClass Document
not found
2021-12-24 08:58:18.922 GTAMSAnalyzer[57081:57081] *** -[myProject
respondsToSelector:]: message sent to deallocated instance 0x557026edb7d0
2021-12-24 08:58:18.922 GTAMSAnalyzer[57081:57081] *** -[myProject
respondsToSelector:]: message sent to deallocated instance 0x557026edb7d0
2021-12-24 08:58:18.923 GTAMSAnalyzer[57081:57081] *** -[myProject
respondsToSelector:]: message sent to deallocated instance 0x557026edb7d0
2021-12-24 08:58:18.923 GTAMSAnalyzer[57081:57081] *** -[myProject
respondsToSelector:]: message sent to deallocated instance 0x557026edb7d0
2021-12-24 08:58:18.925 GTAMSAnalyzer[57081:57081] *** -[myProject
respondsToSelector:]: message sent to deallocated instance 0x557026edb7d0
2021-12-24 08:58:18.925 GTAMSAnalyzer[57081:57081] *** -[myProject
respondsToSelector:]: message sent to deallocated instance 0x557026edb7d0
2021-12-24 08:58:18.925 GTAMSAnalyzer[57081:57081] *** -[myProject
respondsToSelector:]: message sent to deallocated instance 0x557026edb7d0
2021-12-24 08:58:18.925 GTAMSAnalyzer[57081:57081] *** -[myProject
respondsToSelector:]: message sent to deallocated instance 0x557026edb7d0


Closing the project window deallocates it but it also updates the menus which
in turn try to access the target that no longer exists, exactly as the comment
says.  A workaround in the app would be to retain self in myProject -init but
that's a memory leak and not really a bug fix.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?61727>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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