The example code, H5Ex_G_Traverse fails with a runtime crash when iterating through a file with nested group members. The crash appears to be the result of JNI code in the file h5lImp.c. There might be multiple issues, and this is the new JDK-1.10.1.
One cause of the crash appears to be the variable “visit_callback”, which is overwritten when recursion starts. When recursion completes, “visit_callback” will be pointing to the wrong callback method. In the case of H5Ex_G_Traverse, it will be pointing to an object that is no longer on the stack and presumably has no reference counts, so it may be garbage collected. There should probably be a more comprehensive iterator test added to the Java code.
Advice and feedback appreciated.