bugGNU Octave - Bugs: bug #43575, load( fileDat ); reports no error...

 
 

bug #43575: load( fileDat ); reports no error when fileDat is malformed.

Submitter:  None
Submitted:  Tue 11 Nov 2014 10:48:25 AM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Fixed Assigned to:  None
Originator Name:  Jens Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.8.2
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 06 Dec 2014 03:46:33 PM UTC, comment #2: 

I fixed this by issuing an error if the file format cannot be determined.  It's not quite the same error message as before, but it will produce an error which will be enough for your try/catch code.  I checked the change in on the stable branch here (http://hg.savannah.gnu.org/hgweb/octave/rev/616f2b22787b).  If there is a 3.8.3 bug fix release it will be a part of that.  Otherwise it will be released in the 4.0 version of Octave.  If you need the fix immediately you can always build from Mercurial sources.

Rik <rik5>
Group administrator
Wed 12 Nov 2014 03:53:36 PM UTC, comment #1: 

The regression happened between releases 3.6.4 and 3.8.0 and is present in all versions going forward including the development branch.  Marking bug as Confirmed.

Rik <rik5>
Group administrator
Tue 11 Nov 2014 10:48:25 AM UTC, original submission:  

In one of our scripts, we were caught by the same bug as discussed here (but I could not find it reported):

http://octave.1599824.n4.nabble.com/loading-matrix-no-error-but-undefined-variable-td4662859.html

We use load in a try-catch construct in a loop, relying on load to report errors properly.

Also for interactive usage, it must be confusing to miss proper error reporting.

Buggy (since error situation not reported):


# echo 1 2 > testfile
# echo 3 >> testfile
# octave-3.8.2 --silent
octave:1> load( 'testfile' );
octave:2>


Known workaround: load( '-ascii', 'testfile' );

Expected (error situation correctly reported):


# echo 1 2 > testfile
# echo 3 >> testfile
# octave-3.2.4 --silent
octave:1> load( 'testfile' );
error: load: testfile: inconsistent number of columns near line 2
error: load: unable to extract matrix size from file `testfile'
octave:1>


Anonymous

 

(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 rik5 (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-12-06 rik5 Open/ClosedOpen Closed
    2014-12-06 rik5 StatusConfirmed Fixed
    2014-11-12 rik5 StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code