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

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

[Octave-bug-tracker] [bug #54187] fail to close a busy figure and crash


From: anonymous
Subject: [Octave-bug-tracker] [bug #54187] fail to close a busy figure and crash octave
Date: Tue, 26 Jun 2018 03:50:15 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0

Follow-up Comment #2, bug #54187 (project octave):

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.


address@hidden:~$  cat tmp2.m 
function tmp2
  a = imread('octave-sombrero.png');
  h = imshow(a);
  while (ishandle(h))
    a = shift(a,1);
    set(h,'cdata',a);
    drawnow;
    pause(0.01);
  end
end

address@hidden:~$  octave -q
octave:1> tmp2 # do not click "X"                    
^C
octave:1> tmp2 # and click "X" once                 
^C
octave:1> tmp2 # and click "X" twice
^C
octave:1> error: close: first argument must be "all", a figure handle, or a
figure name
error: parse error
error: called from
    close at line 81 column 7
octave:1> tmp2 # and click "X" three times or more
^C
octave:1> error: close: first argument must be "all", a figure handle, or a
figure name
error: parse error
error: called from
    close at line 81 column 7
octave:1> fatal: caught signal Segmentation fault -- stopping myself...
Segmentation fault

address@hidden:~$ 


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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