Skip to content

NDFileHDF5 write failure with Stream2 + BS-LZ4 (Decompress=0) #76

@domitto

Description

@domitto

I’m opening this issue to track the problem with Stream2 when using BS-LZ4 and Decompress=0.

I’m able to reproduce the failure consistently. When starting a capture with Stream2 + BS-LZ4 (single threshold), NDFileHDF5 immediately reports:

NDPluginFile::doCapture: ERROR, must collect an array to get dimensions first
NDFileHDF5Dataset::writeFile ERROR Unable to write pre-compressed data - mismatched chunk definition
NDFileHDF5::writeFile ERROR: could not write to dataset. Aborting
NDPluginFile::writeFileBase Error writing file, status=3

If I press Start Capture again, the IOC crashes with:

terminate called after throwing an instance of 'std::bad_alloc'
what():  std::bad_alloc

Compression filters (bitshuffle/LZ4) are installed, and HDF5_PLUGIN_PATH is set correctly, so it appears to be related to how Stream2 delivers the compressed data.

@MarkRivers mentioned that Stream2 may not work with pre-compressed data because plugins expect the full [NX, NY, NTHRESHOLDS] block to be compressed as a single chunk, while Dectris sends each threshold image separately.

I’ll test the regular Stream interface tomorrow as a workaround and report back with results.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions