bugGNU Octave - Bugs: bug #40980, Failure to load uint8 variables...

 
 

bug #40980: Failure to load uint8 variables from text files

Submitted by:  Rafael Laboissiere <rlaboiss>
Submitted on:  Fri 20 Dec 2013 01:04:04 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: Jordi Gutiérrez Hermoso <jordigh>
Originator Name: Open/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Sat 11 Jan 2014 12:27:17 AM UTC, comment #3:

I have pushed a slightly modified version of the patch here:

http://hg.savannah.gnu.org/hgweb/octave/rev/284e5c87f27b

This should soon become part of Octave 3.8.1

Jordi Gutiérrez Hermoso <jordigh>
Project AdministratorIn charge of this item.
Mon 23 Dec 2013 10:31:34 AM UTC, comment #2:

Thanks, Jordi, I tried the patch with RC2 and it works fine for the cases that I tested.

Since your patch changes the internal representation of variables in the saved text files, it can break in situations where the old behavior was expected. For instance, people that saved uint8 variables in text files in the past would be unable to read their files now. These should be corner cases, but a fallback solution could be provided for them.

Rafael Laboissiere <rlaboiss>
Sat 21 Dec 2013 11:58:57 PM UTC, comment #1:

I attach a proposed fix for this problem.

I'm not sure if this fix should go into the impending release, though. I think it's safe, but I am not sure.

(file #30061)

Jordi Gutiérrez Hermoso <jordigh>
Project AdministratorIn charge of this item.
Fri 20 Dec 2013 01:04:04 PM UTC, original submission:

The bug report reproduced below was submitted against the Debian package octave_3.6.4-4. This bug is also present in version 3.8.0-rc1. The URL of the bug report is http://bugs.debian.org/732659

-- Forwarded message from Kacper Gutowski <mwgamera@gmail.com> [2013-12-20 04:28]:

When a variable of class uint8 is saved in the default text format, it's actually written out in binary (one byte per element) instead of plain text like every other type. I don't know whether this is intended or not, but file containing such variable can be loaded only if said variable had no elements of values 9, 10, 11, 12, 13, or 32. These correspond to white characters in ASCII and apparently "load" gets confused by them.

Minimal example to reproduce the problem:

Rafael Laboissiere <rlaboiss>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #30061:  40980.diff added by jordigh (1KiB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jordigh (Updated the item)
  • -unavailable- added by rlaboiss (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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 11 Jan 2014 12:27:17 AM UTCjordighStatusPatch Submitted=>Fixed
      Open/ClosedOpen=>Closed
    Sat 21 Dec 2013 11:58:57 PM UTCjordighAttached File-=>Added 40980.diff, #30061
      StatusNone=>Patch Submitted
      Assigned toNone=>jordigh

    Back to the top


    Powered by Savane 3.1-cleanup1