I converted an application from BDB to LMDB (using Java/JNI) and now I'm getting this error when doing an mdb_cursor_get with SET.

In debugging, at that point mp is empty:
mp = 0x0000000015ddb000 {mp_p={p_pgno=0 p_next=0x0000000000000000 } mp_pad=0 mp_flags=0 ...}

The code where this happens is called many times before without issue, so I'm at a lost to explain what is going on.

I'm including the debug output from the session. If anybody can point me in the right direction, I will do whatever tests or debugging is needed.

BTW, lines numbers might be a bit off as I needed to make minor changes to run under MS VS

at line 329, added code for lack of support for __func__:

#ifdef _MSC_VER //MS C++ doesn't support __func__
# define DPRINTF0(fmt, ...) \
    fprintf(stderr, "%s:%d " fmt "\n", __FUNCTION__, __LINE__, __VA_ARGS__)
# define DPRINTF0(fmt, ...) \
    fprintf(stderr, "%s:%d " fmt "\n", __func__, __LINE__, __VA_ARGS__)