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

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

[Octave-bug-tracker] [bug #52666] Segfault when closing a figure inside


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #52666] Segfault when closing a figure inside a "deletefcn" callback
Date: Thu, 14 Dec 2017 21:43:30 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Follow-up Comment #7, bug #52666 (project octave):

Well, it doesn't look like an infinite recursion, but there appears to be at
least one double delete.  I added the following:


diff --git a/libinterp/corefcn/graphics.cc b/libinterp/corefcn/graphics.cc
--- a/libinterp/corefcn/graphics.cc
+++ b/libinterp/corefcn/graphics.cc
@@ -2661,6 +2661,7 @@ gh_manager::do_free (const graphics_hand
 
       octave_value val = bp.get_deletefcn ();
 
+std::cerr << "Ex deletefcn: " << &bp << "\n";
       bp.execute_deletefcn ();
 


and here is the output:


octave:1> fcn = @(h) close (ancestor (h, "figure"));
octave:2> hl = line ("deletefcn", fcn);
octave:3> delete (hl)
Ex deletefcn: 0x7f7a5c8aa5a0
Ex deletefcn: 0x7f7a5c8aa5a0
Ex deletefcn: 0x7f7a5c7ae0b0
Ex deletefcn: 0x7f7a5c8516a0
Ex deletefcn: 0x7f7a5c824690
Ex deletefcn: 0x7f7a5c81da90
Ex deletefcn: 0x7f7a5c8113d0
Ex deletefcn: 0x7f7a5c776a70
^C^CPress Control-C again to abort.
^Cfatal: caught signal Interrupt -- stopping myself...
attempting to save variables to 'octave-workspace'...
save to 'octave-workspace' complete
terminate called after throwing an instance of 'octave::exit_exception'
Aborted


At the very beginning the same object 0x7f7a5c8aa5a0 has its deletefcn run
twice.  Just figure out how that can be happening, I guess.  (This is all
single threaded int terms of setting that "beingdeleted" to true, correct?)

    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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