Memory Exception in H5Oget_info_by_name

Hi all,

I'm getting a

Signal: SIGSEGV: memory access exception

in H5Oget_info_by_name when i used

H5Literate(lockID, H5_INDEX_NAME, H5_ITER_NATIVE, NULL, addGroup, (void *)

with the function

herr_t addGroup(hid_t loc_id, const char *name, const H5L_info_t *info,
void *operator_data)
    H5O_info_t infobufO;

     if (H5Lexists(loc_id, name, H5P_DEFAULT) > 0)
        if(H5Oexists_by_name(loc_id, name, H5P_DEFAULT) > 0)
           herr_t validO{H5Oget_info_by_name (loc_id, name, &infobufO,

for a specific case that was sent to me. Looking at the stack for,,,,,,,,,,,

I know that the Object in question is invalid because when i look at it via
HDFView i see a question mark as shown below.

But HDFView handles this without an exception....any idea how i might do
the same?