Hello,

 

I'm running into a few issues with H5iterate I'm unable to explain.

 

1) I set an error handler with  H5Eset_auto1, and set a breakpoint there. As
I traverse my file I eventually hit the breakpoint. But if I remove the
error handler, no error message is printed. If I call H5Eprint from within
my registered function in H5Iterate I get a message that my function H5Gopen
is trying to open something that is not a group.

 

2) My iterating function has the following code:

 

H5G_stat_t statbuf;

hid_t next;

 

H5Gget_objinfo (loc_id,name,0,&statbuf);

if(statbuf.type == H5G_GROUP || statbuf.type == H5G_UDLINK) {

   next = H5Gopen (loc_id,name,H5P_DEFAULT);  ! here is where the error
handler gets called!

}

 

I have used this in dozens of files, but suddenly ran into this problem.
Using HDFViewer the file looks like all my other files.

 

3) I searched through the examples, and if I use instead the construct in
the example to recursively traverse a file then the error is gone:

 

H5O_info_t  infobuf;

 

if(infobuf.type == H5O_TYPE_GROUP) {

   next = H5Gopen (loc_id,name,H5P_DEFAULT);  ! no problem here

}

 

Is there anything wrong with my construct in item (2) above? Aren't these
equivalent?

 

Thanks.

 

-Arthur

_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

Reply via email to