-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Freeze trying to read compound datasets with variable length strings #251
Comments
If the dataset is openly available I could check if this can be reproduced on linux and debug it further. |
Yes, I tried reading only one element, but that did not work either. Here is a minimum example file, containing only the compound dataset: https://drive.google.com/file/d/1CJeFNq84Z_lfThG1r75NsQKv2kv4Are8/view?usp=sharing About the stacktrace - since the program does not crash, I probably would need to manually obtain a stacktrace at some point? I set one at the end of the
|
It seems the strings as returned as nullpointers which causes issues (and should be fixed!). I think this specific issue can be fixed by providing the proper names to the members to match what is in the file with a rename, i.e. #[derive(H5Type, Debug, Clone, PartialEq)]
#[repr(C)]
pub struct Index {
#[hdf5(rename = "Start index")]
pub start_index: u32,
#[hdf5(rename = "Size")]
pub size: u32,
#[hdf5(rename = "Object ID")]
pub object_ID: hdf5::types::VarLenUnicode,
#[hdf5(rename = "Data ID")]
pub data_ID: hdf5::types::VarLenUnicode,
} |
It works - a thousand thanks for your fast help!! I was not aware of the rename helper attribute, I should have read the changelog.... |
We should do something about the freeze and the segfault, reopening as a reminder |
Has there been any work on this? I have the same issue, and because I'm loading an HDF5 file with an unknown schema I can't use the name trick proposed by @mulimoen |
All new work is being done in the fork #295, but nothing on this issue as far as I know. Feel free to open an issue in the forked repo with an MVP |
Just a note: After removing the lzf compression using |
Another note on this: when re-creating the file using |
Hi everybody,
I have problems trying to read compound datasets which also consist of strings with variable lengths. While I have no problems reading other types like floats or integers from a compound, my applications freezes completely when I try to read the strings. Interestingly, I can read normal string datasets, the problem only occurs for compound datasets with strings (using VarLenAscii/VarLenUnicode/VarLenArray).
I am using the h5-types crate with the "h5_alloc" feature enabled under Windows 10 with version 1.14.0 of the HDF library.
This is the relevant code I use for loading the dataset:
In the screenshot below is the structure of the dataset from HDFView, which I try to load:
I tried to hunt down the problem and it seems to be somewhere in the "read_into_buf" function, but I am stuck now. Did anybody encounter a similar issue or can point me in the right direction? Thanks in advance for any help!
The text was updated successfully, but these errors were encountered: