I have another issue with HDFView. With my library I am able to create all kinds of attributes and h5dump reads all of them properly. HDFView can also open all attributes except the most complex one: A compound with some simple fields and three variable-length sequences. HDFView crashes with the following error:
hs_err_pid117345.log (148.3 KB)
The data I am trying to write as an attribute is a C# object called “DataspaceMessage”. So this is some kind of HDF5 inception where the attribute data itself is representing an internal HDF5 object message. Please do not get confused by this, it was just a good candidate to test my generic attribute writing algorithm. So please ignore the name “DataspaceMessage” and just treat it as an arbitrary compound type.
The output of h5dump of the same file is correct:
HDF5 "DataspaceMessage.h5" {
GROUP "/" {
ATTRIBUTE "DataspaceMessage" {
DATATYPE H5T_COMPOUND {
H5T_STD_U8LE "Rank";
H5T_ENUM {
H5T_STD_U8LE;
"None" 0;
"DimensionMaxSizes" 1;
"PermuationIndices" 2;
} "Flags";
H5T_ENUM {
H5T_STD_U8LE;
"Scalar" 0;
"Simple" 1;
"Null" 2;
} "Type";
H5T_VLEN { H5T_STD_U64LE} "DimensionSizes";
H5T_VLEN { H5T_STD_U64LE} "DimensionMaxSizes";
H5T_VLEN { H5T_STD_U64LE} "PermutationIndices";
H5T_STD_U8LE "Version";
}
DATASPACE SCALAR
DATA {
(0): {
1,
DimensionMaxSizes,
Simple,
(10, 20, 30),
(20, 40, 60),
(40, 80, 120),
1
}
}
}
}
}
The output of myHDF5 is partially OK but it is ignoring the variable-length data:
{
"name": "",
"path": "/",
"kind": "group",
"attributes": [
{
"name": "DataspaceMessage",
"shape": [],
"type": {
"class": "Compound",
"fields": {
"Rank": {
"class": "Integer (unsigned)",
"size": 8,
"endianness": "little-endian"
},
"Flags": {
"class": "Enumeration",
"mapping": {
"None": 0,
"DimensionMaxSizes": 1,
"PermuationIndices": 2
},
"base": {
"class": "Integer (unsigned)",
"size": 8,
"endianness": "little-endian"
}
},
"Type": {
"class": "Enumeration",
"mapping": {
"Scalar": 0,
"Simple": 1,
"Null": 2
},
"base": {
"class": "Integer (unsigned)",
"size": 8,
"endianness": "little-endian"
}
},
"DimensionSizes": {
"class": "Unknown"
},
"DimensionMaxSizes": {
"class": "Unknown"
},
"PermutationIndices": {
"class": "Unknown"
},
"Version": {
"class": "Integer (unsigned)",
"size": 8,
"endianness": "little-endian"
}
}
}
}
]
}
Data:
[1,1,1,{"0":3,"1":0,"2":0,"3":0,"4":216,"5":171,"6":13,"7":0},{"0":3,"1":0,"2":0,"3":0,"4":248,"5":171,"6":13,"7":0},{"0":3,"1":0,"2":0,"3":0,"4":24,"5":172,"6":13,"7":0},1]
I have attached a test file (DataspaceMessage.h5 (5 KB)) which contains the problematic attribute.
I have no idea what is going wrong in HDFView but I guess it is not able to handle the variable length sequence data. Is there a way to increase the HDFView log level via command line parameters, i.e. without recompiling the application?
Thank you
Vincent