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

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

[Octave-bug-tracker] [bug #56272] The keyboard function and debug_on_err


From: Robert Fries
Subject: [Octave-bug-tracker] [bug #56272] The keyboard function and debug_on_error handling of functions in a file is wrong
Date: Mon, 6 May 2019 00:24:25 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0

URL:
  <https://savannah.gnu.org/bugs/?56272>

                 Summary: The keyboard function and debug_on_error handling of
functions in a file is wrong
                 Project: GNU Octave
            Submitted by: rwf1
            Submitted on: Mon 06 May 2019 04:24:24 AM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Regression
                  Status: None
             Assigned to: None
         Originator Name: rwf1
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.4.1
        Operating System: GNU/Linux

    _______________________________________________________

Details:

To see this problem put this code into a file

1;
function iOut=FuncInner(iIn)
  if (iIn==1)
    fprintf(stderr,"Calling keyboard\n");
    keyboard("Inner> ");
  end
  if (iIn==2)
    fprintf(stderr,"Calling error\n");
    error("iIn is 2");
  end
  iOut=iIn;
end
function jOut=FuncOuter(jIn)
  jOut=FuncInner(jIn);
end

Then source the file to load the functions.
Two problems can be seen.  First run

FuncOuter(1)

The expected result is to be put into the debugger

octave:2> FuncOuter(1)
Calling keyboard
stopped in FuncInner at line 5
Inner>

The behaviour with the problem is

octave:2> FuncOuter(1)
Calling keyboard
error: FuncInner: no such file, ''
error: called from
    FuncInner at line 5 column 5
    FuncOuter at line 14 column 7
octave:2>

The second problem is the handling of an error call when debug_on_error is set
to 1.  The expected behaviour is to be put into the debugger.

octave:3> debug_on_error(1)
octave:4> FuncOuter(2)
Calling error
error: iIn is 2
error: called from
    FuncInner at line 9 column 5
    FuncOuter at line 14 column 7
stopped in FuncInner at line 9
debug>

The behaviour with the problem is

octave:2> debug_on_error(1)
octave:3> FuncOuter(2)
Calling error
error: iIn is 2
error: called from
    FuncInner at line 9 column 5
    FuncOuter at line 14 column 7
error: error: no such file, ''
error: called from
    FuncInner at line 9 column 5
    FuncOuter at line 14 column 7
octave:3>

The correct results are seen in Fedora 28 which has release 4-2-2.  The
problem is present in Fedora 30 which has release 4-4-1.  A bisect shows that
the problem starts with changeset 
25034:6e4121c39957




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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