The Dispatch java class stores pointers in the variable 'm_pDispatch' as a 32bit java int type. This value is cast to an IDispatch pointer in the C++ JNI part of the Dispatch class.
If the value of the java int variable exceeds the 2^31 limit the value of the java int type gets negative. When being casted to an IDispatch pointer on the C++ native side, this pointer gets an invalid value - for example '0xFFFFFFFF83B20917'. When this address is accessed the VM crashes with an EXCEPTION_ACCESS_VIOLATION.
This bug occurs randomly and only on 64 bit systems with a lot of memory which makes it hard to track down.
The attached files contain a JVM crash log of such a crash and new versions of the files which contained buggy code. I was not able to do a complete code-review of jacob. So maybe the bug can also be found elsewhere.