[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: |
John W. Eaton |
Subject: |
[Octave-bug-tracker] [bug #58814] Abort, core dump on exiting from graphics code |
Date: |
Thu, 13 Aug 2020 12:53:53 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0 |
Follow-up Comment #9, bug #58814 (project octave):
I'm having some trouble now to reliably cause the crash.
Noticing that the crash was happening when Octave was exiting and still
drawing objects, I thought that maybe the problem could be more clearly
exposed by adding some delay when drawing some graphics objects. So I tried
the following changes:
diff --git a/libinterp/corefcn/gl-render.cc b/libinterp/corefcn/gl-render.cc
--- a/libinterp/corefcn/gl-render.cc
+++ b/libinterp/corefcn/gl-render.cc
@@ -43,6 +43,7 @@
#include "interpreter-private.h"
#include "oct-opengl.h"
#include "text-renderer.h"
+#include "utils.h"
namespace octave
{
@@ -729,11 +730,20 @@ namespace octave
else if (go.isa ("axes"))
draw_axes (dynamic_cast<const axes::properties&> (props));
else if (go.isa ("line"))
- draw_line (dynamic_cast<const line::properties&> (props));
+ {
+ draw_line (dynamic_cast<const line::properties&> (props));
+ sleep (0.04);
+ }
else if (go.isa ("surface"))
- draw_surface (dynamic_cast<const surface::properties&> (props));
+ {
+ draw_surface (dynamic_cast<const surface::properties&> (props));
+ sleep (0.04);
+ }
else if (go.isa ("patch"))
- draw_patch (dynamic_cast<const patch::properties&> (props));
+ {
+ draw_patch (dynamic_cast<const patch::properties&> (props));
+ sleep (0.04);
+ }
else if (go.isa ("light"))
draw_light (dynamic_cast<const light::properties&> (props));
else if (go.isa ("hggroup"))
but it's not clear that had a significant effect, except to make plotting
*really* slow.
While investigating, I noticed that creating an object of the following class
would also cause Octave to crash on exit:
classdef foocls < handle
methods
function delete (obj)
fprintf (stderr, "foocls: foo-i-hithere\n");
sombrero ();
end
end
end
To avoid that crash, I reordered some of the actions in the
interpreter::shutdown function. Could someone who is able to reproduce the
failure please try the attached patch and report whether it also avoids the
problem reported here?
If not, then could you also try the following change, applied in addition to
the attached patch?
diff --git a/libinterp/corefcn/interpreter.cc
b/libinterp/corefcn/interpreter.cc
--- a/libinterp/corefcn/interpreter.cc
+++ b/libinterp/corefcn/interpreter.cc
@@ -867,6 +867,12 @@ namespace octave
OCTAVE_SAFE_CALL (m_gh_manager->close_all_figures, ());
+ // Allow graphics operations and callbacks to execute. Can this job
+ // be done in a way that ensures everything is executed without
+ // waiting for any extra time?
+
+ OCTAVE_SAFE_CALL (sleep, (0.5, true));
+
// What is supposed to happen if a figure has a closerequestfcn or
// deletefcn callback registered that creates other figures or
// variables? What if those variables are classdef objects with
(file #49663)
_______________________________________________________
Additional Item Attachment:
File name: interp-shutdown-reorder-diffs.txt Size:2 KB
<https://file.savannah.gnu.org/file/interp-shutdown-reorder-diffs.txt?file_id=49663>
_______________________________________________________
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, 2020/08/09
- [Octave-bug-tracker] [bug #58814] Abort, core dump on exiting from graphics code,
John W. Eaton <=
- [Octave-bug-tracker] [bug #58814] Abort, core dump on exiting from graphics code, Hg200, 2020/08/13
- [Octave-bug-tracker] [bug #58814] Abort, core dump on exiting from graphics code, Rik, 2020/08/13
- [Octave-bug-tracker] [bug #58814] Abort, core dump on exiting from graphics code, John W. Eaton, 2020/08/13
- [Octave-bug-tracker] [bug #58814] Abort, core dump on exiting from graphics code, anonymous, 2020/08/13
- [Octave-bug-tracker] [bug #58814] Abort, core dump on exiting from graphics code, John W. Eaton, 2020/08/13
- [Octave-bug-tracker] [bug #58814] Abort, core dump on exiting from graphics code, Hg200, 2020/08/13
- [Octave-bug-tracker] [bug #58814] Abort, core dump on exiting from graphics code, Rik, 2020/08/13
- [Octave-bug-tracker] [bug #58814] Abort, core dump on exiting from graphics code, anonymous, 2020/08/13
- [Octave-bug-tracker] [bug #58814] Abort, core dump on exiting from graphics code, anonymous, 2020/08/13
- [Octave-bug-tracker] [bug #58814] Abort, core dump on exiting from graphics code, Hg200, 2020/08/13