hdf5r icon indicating copy to clipboard operation
hdf5r copied to clipboard

Issues closing file on using obj_copy_from

Open pcm32 opened this issue 4 years ago • 1 comments

A call from seurat-disk where it does:

dfile$obj_copy_from(
  src_loc = source,
  src_name = 'obs',
  dst_name = 'meta.data'
)

generates the following error:

Error in dfile$obj_copy_from(src_loc = source, src_name = "obs", dst_name = "meta.data") : 
  HDF5-API Errors:
    error #000: H5Ocopy.c in H5Ocopy(): line 233: unable to copy object
        class: HDF5
        major: Object header
        minor: Unable to copy object

    error #001: H5Ocopy.c in H5O__copy(): line 317: unable to copy object
        class: HDF5
        major: Object header
        minor: Unable to copy object

    error #002: H5Ocopy.c in H5O__copy_obj(): line 1221: unable to copy object
        class: HDF5
        major: Object header
        minor: Unable to copy object

    error #003: H5Ocopy.c in H5O__copy_header(): line 1165: unable to copy object
        class: HDF5
        major: Object header
        minor: Unable to copy object

    error #004: H5Ocopy.c in H5O__copy_header_real(): line 872: unable to perform 'post copy' operation on message
        class: HDF5
        major: Object header
        minor: Unable to initialize object

    error #005: H5Ostab.c in H5O__stab_post_copy_file(): line 403: iteration operator failed
        class: HD
Error in private$closeFun(id) : HDF5-API Errors:
    error #000: H5F.c in H5Fclose(): line 675: closing file ID failed
        class: HDF5
        major: File accessibilty
        minor: Unable to close file

    error #001: H5Fint.c in H5F__close(): line 1952: decrementing file ID failed
        class: HDF5
        major: File accessibilty
        minor: Unable to decrement reference count

    error #002: H5I.c in H5I_dec_app_ref(): line 1300: can't decrement ID ref count
        class: HDF5
        major: Object atom
        minor: Unable to decrement reference count

    error #003: H5Fint.c in H5F__close_cb(): line 2010: can't close file
        class: HDF5
        major: File accessibilty
        minor: Unable to close file

    error #004: H5Fint.c in H5F_try_close(): line 2181: problems closing file
        class: HDF5
        major: File accessibilty
        minor: Unable to close file

    error #005: H5Fint.c in H5F__dest(): line 1277: problems closing file
        class: HDF5
        major: File

Traceback says:

4: .Call("R_H5Fclose", id, PACKAGE = "hdf5r")
3: private$closeFun(id)
2: e$close()
1: (function (e) 
   {
       e$close()
   })(<environment>)

This happens with version 1.3.3 (and 1.3.2) of r-hdf5r and r version 4.0.3 on macOS, but multiple people seem to be having the issue, possibly in other platforms (see https://github.com/mojaveazure/seurat-disk/issues/47 or https://github.com/mojaveazure/seurat-disk/issues/30 as examples). Anything that could be changed in the way that the seurat-disk package is making this call to avoid this error https://github.com/mojaveazure/seurat-disk/blob/743d7397bd48c03575522881d3cded4796ab7006/R/Convert.R#L550? Thanks!

pcm32 avatar Mar 08 '21 00:03 pcm32

I am getting the same error.

alevax avatar Apr 06 '21 15:04 alevax