Hello!
According to http://www.hdfgroup.org/HDF5/doc/H5.user/Errors.html, H5Ewalk_cb example, one should use H5Eget_major/H5Eget_minor procedures to retrieve error information during custom stack traversal. However http://www.hdfgroup.org/HDF5/doc/RM/RM_H5E.html#Error-GetMajor says "This function has been deprecated"; I believe one needs to use H5Eget_msg instead.
I've tried to implement custom error stack traversal. In attachment is a minimal example test.dpr which can be compiled with FreePascal. Whaen I run the program I get corrupted values in err_desc^.desc:
Major: File accessibilty
Minor: Unable to open file
ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■
▌v-#▲:slight_smile:↑ minor: Unable to open file
ne 343 in H5FD_sec2_open(): unable to open file: name = 'non-existent.hdf', errn
o = 2, error message = 'No such file or directory', flags = 0, o_flags = 0
Ён║лллллллл line 1585 in ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю
■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■☺▌v-#▲☻↑ minor: Unab
le to open file
ne 343 in H5FD_sec2_open(): unable to open file: name = 'non-existent.hdf', errn
o = 2, error message = 'No such file or directory', flags = 0, o_flags = 0
Ён║лллллллл: ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■ю■☺▌v-#▲☻↑ minor: Unable t
o open file
ne 343 in H5FD_sec2_open(): unable to open file: name = 'non-existent.hdf', errn
o = 2, error message = 'No such file or directory', flags = 0, o_flags = 0
Ён║лллллллл
However if I comment out the following lines, err_desc^.desc stays valid:
//H5Eget_msg(err_desc^.maj_num, @Typ, @Buf, Length(Buf));
//WriteLn(Format('Major: %s', [String(Buf)]));
//H5Eget_msg(err_desc^.min_num, @Typ, @Buf, Length(Buf));
//WriteLn(Format('Minor: %s', [String(Buf)]));
yields
..\..\src\H5F.c line 1585 in H5Fopen: unable to open file
It seems that H5Eget_msg is the culprit.
Please CC paramon@acdlabs.ru if answering this message.
I'm ready to provide any additional info,
Andrey Paramonov
test.dpr (1.83 KB)
···
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.