bugGNU Octave - Bugs: bug #51954, exit in Command Window hangs GUI

 
 

bug #51954: exit in Command Window hangs GUI

Submitted by:  Rik <rik5>
Submitted on:  Wed 06 Sep 2017 07:57:37 PM UTC  
 
Category: GUISeverity: 4 - Important
Priority: 5 - NormalItem Group: Regression
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Fri 08 Sep 2017 03:34:02 PM UTC, comment #10:

@Dan: your patch works fine for me so I committed it here (http://hg.savannah.gnu.org/hgweb/octave/rev/46dc1ba54f7f).

Rik <rik5>
Project Administrator
Thu 07 Sep 2017 05:16:41 PM UTC, comment #9:

Octave should be deleting these resources if it owns them. Before my style changes, there was no destructor for the variable editor. So I added one, thinking it was just an unintentional omission. But then you discovered that there was trouble, so I just commented out the actions as a quick fix. I will try to take a closer look at it soon.

John W. Eaton <jwe>
Project Administrator
Thu 07 Sep 2017 04:40:05 PM UTC, comment #8:

I'll let jwe apply it if it makes sense. When would the variable editor by destroyed? Is it only at program exit, in which case we probably don't care too much. Or does clicking the close button on an undocked Variable Editor window also destroy the object? In that case we could have memory leaks.

Rik <rik5>
Project Administrator
Thu 07 Sep 2017 03:22:42 AM UTC, comment #7:

After compiling the latest, I added back the line of code that deletes m_main. I don't see any errors when exiting. Patch attached.

(file #41751)

Dan Sebald <sebald>
Wed 06 Sep 2017 10:01:06 PM UTC, comment #6:

Regarding this comment:

The m_tool_bar and m_tab_widget look to be created with a non-NULL parent, i.e.,

QMainWindow is probably a container class, meaning that it takes responsibility of cleaning up all the objects that it holds. Calling delete on m_tool_bar and m_tab_widget means delete is most likely done twice, the second time being an error.

Whether delete needs to be called on m_main, isn't so clear. (Notice it has no parent passed into the constructor.) Should look if that is being cleaned up indirectly somehow.

Dan Sebald <sebald>
Wed 06 Sep 2017 08:57:01 PM UTC, comment #5:

Change works for me as well, closing report.

Rik <rik5>
Project Administrator
Wed 06 Sep 2017 08:52:06 PM UTC, comment #4:

Ok, thanks, this change works for me.

Mike Miller <mtmiller>
Project Administrator
Wed 06 Sep 2017 08:44:55 PM UTC, comment #3:

The func (void) syntax should work.

I was able to duplicate the problem but don't see it after making the following change:

http://hg.savannah.gnu.org/hgweb/octave/rev/b0e696ea6487

Some work is apparently needed with data ownership in the variable editor.

John W. Eaton <jwe>
Project Administrator
Wed 06 Sep 2017 08:07:46 PM UTC, comment #2:

I suspect that the Qt SIGNAL and SLOT definitions do not work with the "func (void)" syntax.

Mike Miller <mtmiller>
Project Administrator
Wed 06 Sep 2017 08:05:59 PM UTC, comment #1:

Using hg bisect, the first bad revision is

Adding jwe to the CC list.

Rik <rik5>
Project Administrator
Wed 06 Sep 2017 07:57:37 PM UTC, original submission:

Typing 'exit' in the Command Window, i.e. Octave thread, causes the GUI to become unresponsive. I have to eventually kill the process or kill the window using the window manager. This is pretty recent, hg id == e327adeae7a0. 100% CPU utilization while the GUI is sitting there.

Rik <rik5>
Project Administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by sebald (Posted a comment)
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by rik5
  • -unavailable- added by rik5 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 07 Sep 2017 03:22:42 AM UTCsebaldAttached File-=>Added octave-delete_variable-editor_m_main_window-djs2017sep06.patch, #41751
    Wed 06 Sep 2017 08:57:01 PM UTCrik5StatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Wed 06 Sep 2017 08:44:55 PM UTCjweStatusConfirmed=>Ready For Test
    Wed 06 Sep 2017 08:07:46 PM UTCmtmillerSeverity3 - Normal=>4 - Important
      StatusNone=>Confirmed
    Wed 06 Sep 2017 08:05:59 PM UTCrik5Carbon-Copy-=>Added jwe

    Back to the top


    Powered by Savane 3.1-cleanup1