Hi,
We did manage to interact with a C DLL. We started to get our responses
correct, data was returning OK and so on.
But then something changed in one of our machines. It was imperative to
remove a software which, of course, there was no doubt it will not damage
anything, but it in fact did made a lot of damage. The once functioning
solution started to produce non consistent and wrong results. The problem
was so strange because it was still working fine in other machines but not
that. Then we start to investigate if the problem. First of all, we should
be able reproduced it in other machines, but it could not in most of times.
It drove us crazy.
We were using the latest stable version of JNA, but then we saw you (JNA
developement team) had a problem about writing values into memory with inner
structures that could be solved in a newer version, then we started to use
tag 3.0.9 and we still had the same not constant error results.
Four people start to investigate if the problem could no be related to
ANSI/UNICODE or alignment stuff in Visual studio, but no conclusion could be
trusted because for each new theory there was a new bunch of non constant
successes and error results.
Then we noticed a pattern related to java version. During tests, some simply
crashes with certain java versions. We noticed, that problem was even more
catastrofic when the machine have classpath and java home which points to a
diferent version of the java available in the windows path.
After 3 days the solution (aparently) came, we must be sure about which java
version will be available during the execution and it positively does not
deliver trustable result with this java version:
java version "1.6.0_11"
Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
Java HotSpot(TM) Client VM (build 11.0-b16, mixed mode, sharing)
We run a 1000 tests (it really was one thousand test, not a fake number) for
comparing result with all java virtual machines we have available in our
company and some beyond 1.6.0_11 delivered non constant results as well.
We are really interested about problems related to java version you guys may
be having.
Please, if we are wrong about our assumption regarding java version, please
let us know.
Please comment.
Thanks in advance
Roberto M. Cavalcante