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

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

[Octave-bug-tracker] [bug #57234] 'dbquit' in graphics system callback f


From: Rik
Subject: [Octave-bug-tracker] [bug #57234] 'dbquit' in graphics system callback function can cause segfault
Date: Fri, 15 Nov 2019 18:03:33 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko

Update of bug #57234 (project octave):

                  Status:               Need Info => Confirmed              
                 Summary: Use of debugger in callbacks => 'dbquit' in graphics
system callback function can cause segfault

    _______________________________________________________

Follow-up Comment #3:

Confirmed.  I've attached an augmented test file called tst_cberr.m shown
below.


function tst_cberr ()
  F = figure ();
  uicontrol (F, 'String', 'Button', 'Callback', @clbk1);
endfunction


function clbk1 (h, e)
  x = pi;
  clbk2 (h, e);
endfunction

function clbk2 (h, e)
  throw_an_error ();
endfunction


To reproduce, start Octave and then


debug_on_error (1)
tst_cberr
## Click on button in figure window
dbstack
dbquit


The dbstack command works for me and shows the chain of clbk1 and clbk2.

The dbquit command produces


terminate called after throwing an instance of 'octave::quit_debug_exception'
fatal: caught signal Aborted -- stopping myself...
Abort (core dumped)


Interestingly, if instead of dbquit, I use dbnext, I get


execution error in graphics callback function


debug> dbwhere
at top level
debug> dbnext
error: dbstep: can only be called in debug mode
octave:4> 


The debugger is in a strange state where it is at the top-level, but the
"debug>" prompt is still displayed.  Executing another "dbnext" is required to
leave this pseudo-debug mode and return to the real Octave prompt.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?57234>

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




reply via email to

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