On Jul 30, 2008, at 9:31 AM, Mike Sobolewski wrote:
Hello from TTU,
Today I have used for the first time JNA in our SORCER research
project.
A Jini service provider that uses C/C++ code works fine for multiple
sequential calls by a network requestor, but after a few minutes
being idle
I am getting the folowing error:
[java] terminate called after throwing an instance of
'std::runtime_error'
[java] what(): ERROR: UVLM master object does not exist
[java] Java Result: 134
In C++ code a master object is created by create() and used
later as follows :
public service(String configFilename) {
...
lib.create(configFilename);
lib.initialize();
lib.iterate();
lib.destroy();
...
}
Again the above method can be invoked many times and works fine,
however, after a few minutes the JVM being idle (no "service"
invocation)
quits with the error above.
Would you please explain what's wrong and advise on a relevant fix.
Thanks in advance for your help,
It's hard to say without knowing what your architecture expects, or
what your object lifecycles look like. I'd recommend obtaining a
stack dump for the offending code, either by attaching a debugger
before the fault or by further instrumenting your Java and/or native
code. One way to do so is to replace the C++ default termination
handler with something that enables you to get a stack dump.