bugGNU Octave - Bugs: bug #44862, Errors in script files don't...

 
 

bug #44862: Errors in script files don't generate tracebacks

Submitted by:  Martin Kunz <mkunz>
Submitted on:  Fri 17 Apr 2015 02:14:46 PM UTC  
 
Category: InterpreterSeverity: 5 - Blocker
Priority: 5 - NormalItem Group: Regression
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: 4.0.0Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

(Jump to the original submission Jump to the original submission)

Tue 02 Jun 2015 04:46:47 PM UTC, comment #7:

Retagging release from 4.0.0-rc3 to 4.0.0.

John W. Eaton <jwe>
Project Administrator
Sat 25 Apr 2015 05:46:10 PM UTC, comment #6:

Works for me. Closing report.

Rik <rik5>
Project Administrator
Sat 25 Apr 2015 04:47:32 PM UTC, comment #5:

I checked in the following additional changeset:

http://hg.savannah.gnu.org/hgweb/octave/rev/0aed244dbdb3

John W. Eaton <jwe>
Project Administrator
Sat 25 Apr 2015 05:01:25 AM UTC, comment #4:

Behavior seems fine with error(). warning(), however, still produces a backtrace even when there is a newline at the end of the warning message.

The following code in tst_warn.m

and then called with

I don't think that is intended.

Rik <rik5>
Project Administrator
Sat 25 Apr 2015 02:33:07 AM UTC, comment #3:

I checked in the following changeset:

http://hg.savannah.gnu.org/hgweb/octave/rev/a42de4173533

John W. Eaton <jwe>
Project Administrator
Sat 18 Apr 2015 01:52:57 AM UTC, comment #2:

The source of this change is the following changeset:

http://hg.savannah.gnu.org/hgweb/octave/rev/972abb60c30f

If I understand it right, it's that whatever logic was doing stack traces before was moved into error.cc, and it now only prints a stack trace if symbol_table::at_top_level() is false.

Mike Miller <mtmiller>
Project Administrator
Fri 17 Apr 2015 03:45:51 PM UTC, comment #1:

Confirmed. It's just a guess, but it looks like the internal variable that controls whether a stack trace is printed has accidentally defaulted to false.

Another way to see this regression is to have a single line script with the code

When the error to be printed does not end in a newline, then Octave should print a stack trace. This works in 3.8.2. Adding a newline will suppress the backtrace.

This suppression works in 3.8.2, but suppression seems always to be on in 4.0.0.

Rik <rik5>
Project Administrator
Fri 17 Apr 2015 02:14:46 PM UTC, original submission:

Octave 4.0.0-rc3 prints no traceback messages when an error occurs in a script file. Consider a simple testScript.m with the following content:

a=1;
a(2);

When I run this script with Octave 3.8.2 I get:

>> testScript
error: testScript: A(I): index out of bounds; value 2 out of bound 1
error: called from:
error: D:\scripting\octave\octaveScripts\testScript.m at line 2, column 1

However, Octave 4.0.0-rc3 prints:

>> testScript
error: testScript: A(I): index out of bounds; value 2 out of bound 1

and no traceback.

Executing the same two lines inside a function in Octave 4.0.0-rc3 produces an error WITH traceback.

While one can use the lasterror function (thanks to Mike Miller for pointing this out) to get all relevant info, I would strongly vote for restoring the behaviour of Octave 3.8 where errors in script files are printed with traceback per default.

I used http://alpha.gnu.org/gnu/octave/octave-4.0.0-rc3-installer.exe to get Octave.

Martin Kunz <mkunz>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by rik5
  • -unavailable- added by mkunz (Submitted the item)
  •  

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

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 02 Jun 2015 04:46:47 PM UTCjweRelease4.0.0-rc3=>4.0.0
    Sat 25 Apr 2015 05:46:10 PM UTCrik5StatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Sat 18 Apr 2015 01:52:57 AM UTCmtmillerOperating SystemMicrosoft Windows=>Any
    Fri 17 Apr 2015 03:49:14 PM UTCrik5Severity3 - Normal=>5 - Blocker
    Fri 17 Apr 2015 03:45:51 PM UTCrik5StatusNone=>Confirmed
      Carbon-Copy-=>Added jwe

    Back to the top


    Powered by Savane 3.1-cleanup1