2 messages in net.java.dev.jna.users[jna-users] Re: help needed for the f...
FromSent OnAttachments
Timothy WallJul 30, 2008 6:44 am 
Timothy WallJul 30, 2008 4:16 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[jna-users] Re: help needed for the first usage of JNAActions...
From:Timothy Wall (twal@dev.java.net)
Date:Jul 30, 2008 6:44:28 am
List:net.java.dev.jna.users

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.