bugGNU Octave - Bugs: bug #56272, The keyboard function and...

 
 

bug #56272: The keyboard function and debug_on_error handling of functions in a file is wrong

Submitted by:  Robert Fries <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 Open/Closed:  Open
Release:  4.4.1 Operating System:  GNU/Linux

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 06 May 2019 04:24:24 AM UTC, original submission:  

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

Robert Fries <rwf1>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rwf1 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    No changes have been made to this item

    Back to the top


    Powered by Savane 3.5