Skip to content

Crash when copying a group with references to another file #3429

Open
@roosre

Description

@roosre

Describe the bug
HDF5 crashes when copy "/composite_cae/Meshes/M1/Element_Types" of the linked file at the end of this report. The crash occurs with hdf5 1.12 and 1.14 when using the c++ API, h5py or the hdf5 tools.

  • with hdf5 tools:

"C:\Program Files\HDF_Group\HDF5\1.14.1\bin\h5copy.exe" -v -f ref -i "D:\tmp\input_mech.h5" -s "/composite_cae/" -o "D:\tmp\output.h5" -d "/copy"

  • with h5py
import h5py
source_h5 = h5py.File(r'D:\tmp\input_mech.h5','r')
composit_cae_group = source_h5.get("/composite_cae/")

target_h5 = h5py.File(r'D:\tmp\target.h5','w')
target_h5.copy(source=composit_cae_group, dest=target_h5, name="/copy", shallow=False, expand_soft=False, expand_external=False, expand_refs=True, without_attrs=False)

The crash occurs also when using c++ H5OCopy.

Expected behavior
The group is copied to the file and the references are updated correctly

Platform (please complete the following information)

  • HDF5 version: 1.12 and 1.14
  • OS and version: Windows 11
  • Compiler and version: VS C++17
  • Build system (e.g. CMake, Autotools) and version: premake5
  • Any configure options you specified:
  • MPI library and version (parallel HDF5): serial

Additional context
The crash disappears if the mesh (number of elements and nodes) is smaller.

Attachements
Linked file

Metadata

Metadata

Assignees

Labels

Component - C LibraryCore C library issues (usually in the src directory)Component - ToolsCommand-line tools like h5dump, includes high-level toolsPriority - 1. HighThese are important issues that should be resolved in the next release

Type

Projects

Status

Backlog

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions