[gmx-developers] Segfault in append mode with TNG_IO

Luthaf luthaf at luthaf.fr
Mon Aug 29 14:52:51 CEST 2016


I am trying to integrate the TNG file format in my chemistry IO library 
(http://chemfiles.github.io/), but I have an issue with the "append" mode.
When I do the following set of operation on a file which already 
contains trajectory block, I get a segfault:

     tng_trajectory_t handle;
tng_util_trajectory_open(filename, 'a', &handle);
tng_file_headers_read(handle, TNG_USE_HASH);
tng_last_program_name_set(handle, "chemfiles");
tng_file_headers_write(handle, TNG_USE_HASH);

Running the code in a debugger tell me that the segfault is 
and it looks like it is because this 
assumes I am writting a trajectory block, even if I am not.

The tests suite (tng_testing) runs fine on my computer. And if that can 
help, my code is available 
and I am using the example file distributed with the tng_io git repository.


More information about the gromacs.org_gmx-developers mailing list