[Bug] H5Literate requires index

Hello!

http://www.hdfgroup.org/HDF5/doc/RM/RM_H5L.html#Link-Iterate says:

index_type specifies the index to be used. If the links have not been indexed by the index type, they will first be sorted by that index then the iteration will begin; if the links have been so indexed, the sorting step will be unnecesary[1], so the iteration may begin more quickly.

[1] Original spelling retained.

However H5Literate fails to iterate in H5_INDEX_CRT_ORDER if the corresponding index is missing, as shown by the attached minimal example program (Pascal):

another group
group
yet another group
HDF5-DIAG: Error detected in HDF5 (1.8.12) thread 0:
   #000: ..\..\src\H5L.c line 1183 in H5Literate(): link iteration failed
     major: Symbol table
     minor: Iteration failed
   #001: ..\..\src\H5Gint.c line 844 in H5G_iterate(): error iterating over links
     major: Symbol table
     minor: Iteration failed
   #002: ..\..\src\H5Gobj.c line 704 in H5G__obj_iterate(): no creation order index to query
     major: Symbol table
     minor: Bad value

The documented behavior seems to be useful; it is proposed that the library is fixed to conform to the documentation.

Best wishes
and thank you for very useful software,
Andrey Paramonov

test.dpr (1.3 KB)

test.hdf (9.44 KB)

···

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.