bugGNU Octave - Bugs: bug #54187, fail to close a busy figure and...


bug #54187: fail to close a busy figure and crash octave

Submitted by:  None
Submitted on:  Tue 26 Jun 2018 03:19:43 AM UTC  
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  None Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  Open Release:  4.4.0
Operating 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)

Wed 11 Jul 2018 01:58:03 AM UTC, comment #6:

It seems that in Octave 4.4.0 graphics_toolkit qt, there might be something wrong with the menu "File > Close Figure Ctrl+W" (or the window "x" button).

If I run

in Octave 4.2.x, everything works well; all the menus can response in time.

But in Octave 4.4.0, everything works well (e.g. "File > Save", "Help > About Octave", as well as user-defined menus)
except for the "File > Close Figure" —— not only it cannot close the figure in time, but also it may crash Octave with Segfault later.

A workaround in 4.4.0 is to add a user-defined menu, such as

The additional menu "My File > My Close" works well; it can close the figure in time.
But, again, we must NOT click the original menu "File > Close Figure" which doesn't work and may crash Octave.

Sat 07 Jul 2018 02:09:12 AM UTC, comment #5:

In summary, I find that in Octave 4.4.0 with graphics_toolkit qt
clicking on a figure "x" button more than once before Octave returns to the command interpreter prompt
will make Octave exit with signal 11 (Segfault).

Fri 06 Jul 2018 09:08:54 PM UTC, comment #4:

I can't reproduce your suggestion with Octave from development branch. But i can crash it if i run

Then click on the figure "x" button. Then go to the command window and press Ctrl-C. Then octave exits with signal 11.

Hg200 <hg200>
Mon 02 Jul 2018 12:29:45 AM UTC, comment #3:

Only octave 4.4.0 with graphics_toolkit qt has this bug.

octave 4.4.0 with graphics_toolkit fltk does not have this bug.

octave 4.2.x with any graphics_toolkit does not have this bug.

Tue 26 Jun 2018 07:50:14 AM UTC, comment #2:

I tried another simpler example:
1) edit a function file tmp2.m (see below);
2) if run "tmp2", and press Ctrl+C, then nothing abnormal;
3) if run "tmp2", use mouse to close the figure ONCE (but the figure is not closed immediately in octave 4.4.0), and press Ctrl+C (until now the figure is closed in octave 4.4.0);
4) if run "tmp2", use mouse to close the figure TWICE, and press Ctrl+C, then the function "close" will report an error.
5) if run "tmp2", use mouse to close the figure THREE TIMES OR MORE, and press Ctrl+C, then the function "close" will report an error, and octave will crash with segfault.

Tue 26 Jun 2018 06:52:38 AM UTC, comment #1:

I find one difference between octave 4.2.x and 4.4.0 :

in octave 4.2.x, using mouse or shortcut key to close the figure does NOT call the function "close" (it only calls "closereq" and then "delete")

but in octave 4.4.0, this action will call the function "close" first (and then calls "closereq" and "delete").

Tue 26 Jun 2018 03:19:43 AM UTC, original submission:

When a figure is busy, closing it (e.g. click the "X" button, press Alt+F4, or Ctrl+W, etc.) does not work.
What's more, in this case, if some code tries to close it, then octave would crash with segfault.

This happens in octave 4.4.0; octave 4.2.x does not have this problem. Is this a regression ?

My environment is Debian GNU/Linux with LXDE desktop.

Here is an example how to reproduce this bug:
1) edit a function file tmp.m (see below);
2) start "octave" or "octave --gui";
3) run "tmp" at the octave prompt and we would see an image moving in a figure;
4) NOW use mouse or shortcut key to close this figure (but this would FAIL);
5) THEN press Ctrl+C at the octave prompt to interrupt "tmp", this would run the onCleanup code which tries to close the figure (but this would CRASH octave with segfault)



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

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by hg200 (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)

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

    Only project members can vote.




    No changes have been made to this item

    Back to the top

    Powered by Savane 3.3