bugGNU Octave - Bugs: bug #32756, Ignore unknown datatypes in HDF5...


bug #32756: Ignore unknown datatypes in HDF5 files but load remainder of file correctly

Submitter:  Daniel Davis <ddesics>
Submitted:  Sat 12 Mar 2011 03:20:03 PM UTC
Category:  Libraries Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Feature Request
Status:  Fixed Assigned to:  None
Originator Name:  Daniel Davis Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:


Tue 04 Jun 2019 02:44:36 AM UTC, comment #2: 

Well, this wins for one of the longest open bug reports to be resolved.  I added a commit message and checked the change in under Daniel's name on the development branch in this changeset (https://hg.savannah.gnu.org/hgweb/octave/rev/9e5c1d343a2c).

Marking as fixed and closing report.

Rik <rik5>
Project Administrator
Mon 04 Jul 2016 02:02:40 AM UTC, comment #1: 

I have tested this patch, and reviewed the code.  It all looks good to me.

I'm attaching a changeset based on the patch.

(file #37698)

Lachlan Andrew <lachlan>
Sat 12 Mar 2011 03:20:03 PM UTC, original submission:  

Currently, when octave encounters an unknown datatype in an HDF5 file, it fails to load the file.

For an example, try loading the attached bug.h5 with

load bug.h5

The file fails to load.

A patch is attached which fixes this, so that octave will emit a warning stating that it can't identify the data type and is skipping the specified variable.  Octave will then proceed to load the portions of the file which it can identify.

Copying the hdf5_make_range_type function from ov-range.cc is an ad-hoc hack and something better can certainly be done, but I didn't dig into octave's code to see how best to access the function from ls-hdf5.cc

I eventually intend to try to pull something together to let octave read structured data types from hdf5 files, but this is a temporary fix that will allow octave to read more non-octave created hdf5 files until that time, without affecting octave created files.

The file test.h5 is a test to verify that I did not break octave's loading of ranges, since I changed that section of code.  It should load a variable named val which has a vector going from 1 to 15 in increments of 1.

Daniel Davis <ddesics>


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

Attach Files:

Attached Files
file #22908:  bug.h5 added by ddesics (157KiB - application/octet-stream - Bug testing file and patch.)
file #22909:  hdf5-patch added by ddesics (2KiB - application/octet-stream - Bug testing file and patch.)
file #22910:  test.h5 added by ddesics (5KiB - application/octet-stream - Bug testing file and patch.)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by lachlan (Updated the item)
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by ddesics (Submitted the item)

    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 project members can vote.





    Follow 10 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-06-04 rik5 Item GroupPerformance Feature Request
        StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2016-07-04 lachlan Attached File- Added bug_32756_hdf5_continue.cset, #37698
        Release3.4.0 dev
    2011-09-30 rik5 CategoryNone Libraries
    2011-09-30 rik5 StatusNone Patch Submitted
    2011-03-12 ddesics Attached File- Added bug.h5, #22908
        Attached File- Added hdf5-patch, #22909
        Attached File- Added test.h5, #22910

    Back to the top

    Powered by Savane 3.9