Hi, I cannot figure out how to get H5Ewalk() to work. I get a good looking H5E_error2_t struct on the first entrance to my callback function but after I call H5Eget_msg() the strings are gone. The subsequent calls to the callback all have bad strings too. I'm guessing they are getting freed from the heap and overwritten with debug mode "deleted" values but is that what's supposed to happen?
I'm using hdf5-1.8.15-patch1 and MSVS10. Thanks, David #include <hdf5/hdf5.h> #include <stdio.h> herr_t callback(unsigned n, const H5E_error2_t *err_desc, void* client_data) { printf(err_desc->func_name); // prints the function name H5Eget_msg(err_desc->maj_num, NULL, NULL, 0); printf(err_desc->func_name); // prints garbage return 0; } int main(int argc, char* argv[]) { H5Fopen("missingfile", H5F_ACC_RDWR, H5P_DEFAULT); H5Ewalk(H5E_DEFAULT, H5E_WALK_UPWARD, callback, NULL); return 0; }
_______________________________________________ Hdf-forum is for HDF software users discussion. Hdf-forum@lists.hdfgroup.org http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org Twitter: https://twitter.com/hdf5