[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #58814] Abort, core dump on exiting from graph
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #58814] Abort, core dump on exiting from graphics code |
Date: |
Thu, 23 Jul 2020 18:23:16 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 |
URL:
<https://savannah.gnu.org/bugs/?58814>
Summary: Abort, core dump on exiting from graphics code
Project: GNU Octave
Submitted by: None
Submitted on: Thu 23 Jul 2020 10:23:14 PM UTC
Category: Plotting
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Segfault, Bus Error, etc.
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Release: dev
Discussion Lock: Any
Operating System: GNU/Linux
_______________________________________________________
Details:
GNU Octave Version: 7.0.0 (hg id: 5b1143d1d74b)
This bug report is to report a repeatable segfault in certain conditions. This
is specific to invoking the file as "octave foo.m" from the bash prompt (or
from a shell script) and does not happen when invoking foo.m from within the
Octave command prompt. It looks like Octave exits before the graphics objects
are cleaned up.
Code:
% mytest.m
n = 6;
A = (rand(n,n,n) > 0.5);
# the following function can be in a standalone file too. the bug still
happens.
function voxel2 (pos, sz = [1 1 1], color = [0.8 0.8 0.8], alpha = 0.2)
verts = (dec2bin(0:7)=='1') .* sz + pos;
faces = [1 2 4 3; 5 6 8 7; 1 3 7 5; 2 4 8 6; 1 2 7 5; 3 4 8 7]; # the 6
faces of the cube in cyclic order
patch ("Faces",faces, "Vertices",verts, "facecolor",color,
"facealpha",alpha);
endfunction
for i = 1:10
# the bug does not happen if this loop executes 7 times or fewer. 8 times or
more it is repeatable.
# in production code, matrix A changes for each iteration but for showing
this bug it's been frozen
figure(i); hold on; axis equal; axis off; view(135,
atan(1/sqrt(2))*180/pi);
for p = 1:n
for q = 1:n
for r = 1:n
if (A(p,q,r))
voxel2 ([p q r]);
endif
endfor
endfor
endfor
# saveas (gcf, sprintf ("test%02d.png", i)); # this has been commented out
for speeding up bug test execution
endfor
# if calling this script as "octave mytest.m" then segfault / abort occurs
here during cleaning up and exiting
Observed output from the bash prompt, after drawing the figure windows:
$ octave mytest.m
warning: base_graphics_object::get_properties: invalid graphics object
terminate called after throwing an instance of 'std::bad_cast'
what(): std::bad_cast
fatal: caught signal Aborted -- stopping myself...
Aborted (core dumped)
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?58814>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #58814] Abort, core dump on exiting from graphics code,
anonymous <=
- [Octave-bug-tracker] [bug #58814] Abort, core dump on exiting from graphics code, Rik, 2020/07/23
- [Octave-bug-tracker] [bug #58814] Abort, core dump on exiting from graphics code, Rik, 2020/07/23
- [Octave-bug-tracker] [bug #58814] Abort, core dump on exiting from graphics code, Markus Mützel, 2020/07/24
- [Octave-bug-tracker] [bug #58814] Abort, core dump on exiting from graphics code, anonymous, 2020/07/24
- [Octave-bug-tracker] [bug #58814] Abort, core dump on exiting from graphics code, John W. Eaton, 2020/07/24
- [Octave-bug-tracker] [bug #58814] Abort, core dump on exiting from graphics code, Markus Mützel, 2020/07/25
- [Octave-bug-tracker] [bug #58814] Abort, core dump on exiting from graphics code, Markus Mützel, 2020/07/29