octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #45366] Two objects not cleaning dynamically a


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #45366] Two objects not cleaning dynamically allocated widgets leading to crash at exit
Date: Sun, 21 Jun 2015 06:57:16 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:18.0) Gecko/20100101 Firefox/18.0 SeaMonkey/2.15

URL:
  <http://savannah.gnu.org/bugs/?45366>

                 Summary: Two objects not cleaning dynamically allocated
widgets leading to crash at exit
                 Project: GNU Octave
            Submitted by: sebald
            Submitted on: Sun 21 Jun 2015 06:57:15 AM GMT
                Category: GUI
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Crash
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: Any

    _______________________________________________________

Details:

In attempting to use the qApp aboutToQuit signal to save object settings I
continually experienced a SEGV (11) segment fault at exit.  (This fact is
probably led to the approach whereby the worker thread singleton-cleanup
mechanism is used to clean up some GUI object.  That holds off deletion until
the very last step.)  I eventually tracked down some bugs that are the source
of segfault:

1) terminal_dock_widget::~terminal_dock_widget destructor is not deleting the
dynamically-created QTerminal pointed to via 'terminal'.

2) QUnixTerminalImpl::~QUnixTerminalImpl destructor is not deleting the
dynamically created TerminalModel (m_terminal), KPty (m_kpty), and
TerminalView (m_terminalView).

The reason this causes a segmentation fault is that some of the objects left
undeleted are widgets that remain active in the event processing of the GUI
thread.  But at deletion during exit, their parents are gone and they may
continue to access things such as resource_manager and shortcut_manager. 
Objects have to delete the dynamic memory/objects they utilize, or hand those
objects over to a container class such as the layout classes.

I will submit a patch shortly that includes the bug fixes in a larger
reworking of the exit and cleanup code.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?45366>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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