Can anyone suggest an avenue of thought for this problem?
I have a third party DLL (no source) which works fine when I call it via my own C++ code. However, as soon as I try and use JNI to call the same functions in the DLL I get the following exception;
Exception c0000005, at 48A83416
Access violation: attempting to read memory at address 00000004
Native function stack data: 0,3f49c0,20201,801a7,65637845,6f697470,3063206e,30303030
I've tried two methods of using JNI. The first is the use of a product called JNIWrapper, and that generates the above exception. However, if I use my own JNI code I get an hs_error_pid file generated saying very much the same thing.
Can anyone suggest a reason why a DLL would work fine when called via C++ but not when JNI gets involved? I'm currently use the following JVM arguments but any values I've tried here don't seem to help;
-Xcheck:jni -XX:ThreadStackSize=2m -Xss4m -Xms128m -Xmx1024m
I'm tempted to point the finger at the DLL and say that the problem is in their but I have no way to verify that and the fact that it works when called via C++ code seems to indicate to me that it's fine.
Does anyone have any ideas?
Many thanks.