JuliaIO / MAT.jl

Julia module for reading MATLAB files
MIT License
278 stars 76 forks source link

Breaking change in HDF5 0.15.7 #167

Closed alexjaffray closed 2 years ago

alexjaffray commented 2 years ago

Reading MAT files with MAT v0.10.1 using HDF5 v0.15.7 fails. The same task runs with HDF5 v0.15.6.

Please add a compatibility check for this. Hopefully it can be resolved soon.

HDF5-DIAG: Error detected in HDF5 (1.12.0) thread 0:

  #000: H5Dio.c line 192 in H5Dread(): can't read data
    major: Dataset
    minor: Read failed

  #001: H5VLcallback.c line 2080 in H5VL_dataset_read(): dataset read failed
    major: Virtual Object Layer
    minor: Read failed

  #002: H5VLcallback.c line 2046 in H5VL__dataset_read(): dataset read failed
    major: Virtual Object Layer
    minor: Read failed

  #003: H5VLnative_dataset.c line 167 in H5VL__native_dataset_read(): can't read data
    major: Dataset
    minor: Read failed

  #004: H5Dio.c line 567 in H5D__read(): can't read data
    major: Dataset
    minor: Read failed

  #005: H5Dchunk.c line 2594 in H5D__chunk_read(): unable to read raw data chunk
    major: Low-level I/O
    minor: Read failed

  #006: H5Dchunk.c line 3957 in H5D__chunk_lock(): data pipeline read failed
    major: Dataset
    minor: Filter operation failed

  #007: H5Z.c line 1336 in H5Z_pipeline(): filter returned failure during read
    major: Data filters
    minor: Read failed

  #008: H5Zdeflate.c line 123 in H5Z_filter_deflate(): inflate() failed
    major: Data filters
    minor: Unable to initialize object

ERROR: LoadError: Error reading dataset /GIRF_FT

Stacktrace:
  [1] error(::String, ::String)
    @ Base ./error.jl:42

  [2] h5d_read(dataset_id::HDF5.Dataset, mem_type_id::HDF5.Datatype, mem_space_id::HDF5.Dataspace, file_space_id::HDF5.Dataspace, xfer_plist_id::HDF5.Properties, buf::Matrix{ComplexF64})
    @ HDF5 ~/.julia/packages/HDF5/0iEnL/src/api.jl:394

  [3] generic_read(::HDF5.Dataset, ::HDF5.Datatype, ::Type{ComplexF64})
    @ HDF5 ~/.julia/packages/HDF5/0iEnL/src/HDF5.jl:1280

  [4] read(::HDF5.Dataset, ::Type{ComplexF64})
    @ HDF5 ~/.julia/packages/HDF5/0iEnL/src/HDF5.jl:1195

  [5] read_complex(dtype::HDF5.Datatype, dset::HDF5.Dataset, #unused#::Type{Float64})
    @ MAT.MAT_HDF5 ~/.julia/packages/MAT/f523T/src/MAT_HDF5.jl:126

  [6] m_read(dset::HDF5.Dataset)
    @ MAT.MAT_HDF5 ~/.julia/packages/MAT/f523T/src/MAT_HDF5.jl:179

  [7] read(f::MAT.MAT_HDF5.MatlabHDF5File, name::String)
    @ MAT.MAT_HDF5 ~/.julia/packages/MAT/f523T/src/MAT_HDF5.jl:261

  [8] read(f::MAT.MAT_HDF5.MatlabHDF5File)
    @ HDF5 ~/.julia/packages/HDF5/0iEnL/src/HDF5.jl:83

  [9] matread(filename::String)
    @ MAT ~/.julia/packages/MAT/f523T/src/MAT.jl:133
musm commented 2 years ago

Hmm strange. Our integration tests passed for MAT.jl https://github.com/JuliaIO/HDF5.jl/runs/4019177909?check_suite_focus=true

musm commented 2 years ago

Could you post a reproducer? Might be related to https://github.com/JuliaIO/HDF5.jl/pull/864/files

alexjaffray commented 2 years ago

I have realized it was something on my end, with where the HDF5 library was being found. I tried to reproduce the original issue and realized that I had a problem with some environment variables. I am sorry for wasting your time.

jfhsukromek commented 2 years ago

@alexjaffray I might be having the same issue. Could you please let me know how you handled this? Thanks!