[ODE] Unhandled exceptions in ODE using JAVA and C++
Bert Heesakkers
ajheesak at students.cs.uu.nl
Wed May 25 19:37:21 MST 2005
Hello,
I have a problem using the ODE engine...
Currently I am working on a project at school in which students write java
classes that control a ball rolling on a track in a 3D virtual world. Idea
is to teach students how to program smart algortihms.
Using SWIG (www.swig.org) an inerface is build between the C++ part of the
project and the JAVA part. The SWIG tool basically writes a number of JNI
calls for you, based on C++ class files. A few weeks ago we ran into a
problem which I traced back to heap and stack allocation errors caused by
the use of "alloc" and "malloc" (see MSDN article Q225099). I managed to
solve this using a call to "_set_sbh_threshold(0)". But our luck was
shortlived.
We are experiencing general exception errors when we try to add new
geometries to our spaces. Usually adding a first geometry works fine, but
adding more geometries, using calls like:
dGeomId sphere = dCreateSphere( space, radius );
result in an unhandled exception. Rewriting the call to:
dCreateSphere( space, radius );
does not result in an error.
We tried increasing heapsize in the Java Virtual Machine which does not
solve the problem, but only shift it to somewhere later in our code. I am
starting to think something goes awry with reserving memory in the JVM,
but I have no idea how to solve this.
Running similar code on a machine running windows XP or windows 2000 in a
normal console or windows application (that is, without the SWIG/JNI
interfaces) works fine.
Is there anyone who has had similar problems, or is there anyone who has
an idea how to solve this?
Or should we revert to a Java implementation of the ODE engine like
Odejava? Please help.
Thanks in advance....
Bert Heesakkers.
More information about the ODE
mailing list