D&D dice roller

ok, heres what I did to compile odejava-jni, most of this info is from /odejava/odejava-jni/src/readme.txt


  1. got "with-odejava-jni" branch of odejava-jni from cvs

cvs -d :pserver:guest@cvs.dev.java.net:/cvs checkout -r with-odejava-jni odejava/odejava-jni


2. got latest ode from subversion.

cd odejava/odejava-jni
svn co https://opende.svn.sourceforge.net/svnroot/opende/trunk opende


3. patch ode. Also at this point I copy libdrawstuff.a to /opende/drawstuff/src/ or it doesnt compile. I forget where i got libdrawstuff.a from so if you cant find it you can get it here http://www.xdmgames.com/libdrawstuff.a

cd opende
patch -p0 < ../src/ode.patch


4. configure and build ode

sh autogen.sh
./configure --with-trimesh=gimpact --enable-release
cd ode
make


5. comment out body of TRIMESH_LAST_TRANSFORMATION in odejava-jni/generated/c++/odejava.cxx line 2580-2585(see earlier post).
Build odejava-jni, also here I replaced OPCODE with GIMPACT and changed the JAVA_INCLUDE paths.

cd ../../
cd src
g++ -shared -fPIC -DHAVE_CONFIG_H -I../src/c -I../opende/include -O2 -fno-strict-aliasing -fomit-frame-pointer -ffast-math -Iinclude -IGIMPACT -IGIMPACT/include -I$JAVA_INCLUDE/usr/lib/jvm/java-6-sun/include/linux -I$JAVA_INCLUDE/usr/lib/jvm/java-6-sun/include -DdTRIMESH_ENABLED -c -o ../bin/odejava_wrap.o ../generated/c++/odejava.cxx
g++ -shared -fPIC -DHAVE_CONFIG_H -I../src/c -I../opende/include -O2 -fno-strict-aliasing -fomit-frame-pointer -ffast-math -Iinclude -IGIMPACT -IGIMPACT/include -I$JAVA_INCLUDE/usr/lib/jvm/java-6-sun/include/linux -I$JAVA_INCLUDE/usr/lib/jvm/java-6-sun/include -DdTRIMESH_ENABLED -c -o ../bin/odejava.o ../src/c/odejava.cpp


6. link to make shared lib

g++ -fPIC -shared `find ../opende/ode/src -name *.o` ../bin/odejava_wrap.o ../bin/odejava.o -o ../bin/libodejava.so


7. copy odejava-jni/bin/libodejava.so to jmephysics/impl/ode/lib/
whew! done.

and it works with simple collision but i get error

java: /home/mud2005/odejava/odejava-jni/opende/GIMPACT/src/gim_trimesh.cpp:183: void gim_trimesh_locks_work_data(GIM_TRIMESH*): Assertion `res==0' failed.

when using trimesh collisions as previously stated.
Im going to try and email the odejava people and see what they think about using gimpact.

edit: also there is section at the end of readme:

How to generate the sources for org.odejava.ode and odejava_wrap.cxx

do I need to do this step also?
edit again: found this in gimpact source:

For access to the trimesh data (vertices, triangle indices), you must call  ref gim_trimesh_locks_work_data , and  ref gim_trimesh_unlocks_work_data for finish the access.

I have a feeling odejava-jni just isnt configured to use gimpact yet.
mud2005 said:

Im going to try and email the odejava people and see what they think about using gimpact.

If you really mean odejava people, you can skip that. There don't seem to be many besides me :|
But maybe gimpact or ode folks know what the message means, and we can figure out why odejava / jME Physics causes it.

edit: also there is section at the end of readme:

How to generate the sources for org.odejava.ode and odejava_wrap.cxx

do I need to do this step also?

No, you only need it if you modified odejava.i

thanks again irrisor, ill try contacting gimpact folks  :expressionless:

A thing that just came to my mind: You can try commenting out the call to dGeomTriMeshDataSet(arg1,arg2,arg3); in odejava.cxx and try again - maybe this solves the problem (as the call is rubbish with the latest version of ODE, it was replaced).

A thing that just came to my mind: You can try commenting out the call to dGeomTriMeshDataSet(arg1,arg2,arg3); in odejava.cxx and try again - maybe this solves the problem (as the call is rubbish with the latest version of ODE, it was replaced).


well I commented out line 2600

 //dGeomTriMeshDataSet(arg1,arg2,arg3);

and it still gave same error
thanks for tryin  :|

I got this reply from gimpact guy:

ODE works by default with GIMPACT since version 0.8. Just check out the ODE SVN.



I don't know how odejava is implemented, but you'd better make sure that this package works with the correct ODE version.







excellent, that really helps a lot

thanks  :)  i'll try when i get home today

run from console to see all error msgs btw, eclipse/netbeans does not show the signal handler messages


winkman said:

I'm on linux here and have tried to give it more stack memory with -Xss128M but no luck so far

the lack of stack memory does not cause a crash on linux any more, instead it throws a Java exception.

I managed to get GIMPACT to work with jME Physics 2 :slight_smile:



It was not possible to update the trimesh data with gimpact but it was required to set it via ctor. I've submitted a patch for that. Additionally ODE was not properly initialized by ODEJava. We didn't notice that before as OPCODE and ODE itself do not really require the initialization.



You can try it yourself with current jME Physics 2 - only windows+linux binaries, currently, though.

I managed to get GIMPACT to work with jME Physics 2


SWEET!  :D nice work, I did a little testing and it looks good  8)

off to do more testing

Awesome work…I look forward to playing with it. :slight_smile:

I cant get jmephysics get to work properly since yesterday irrisor.



The interactive tests die away without a message after a short while.

I'm on linux here and have tried to give it more stack memory with -Xss128M but no luck so far ???

The interactive tests die away without a message after a short while.


I am also on linux and having same issue, tests usually run for me, but sometimes exit w/o exception. since recent changes

I'm using the current trunk of ODE now and a new developer added asserts at some places which don't not seem to be appropriate… I have built and uploaded new binaries where some of these are fixed.



edit: committed to jME Physics now, too

any news on this ?



i still keep getting:



/opt/jdk1.6.0_02/bin/java -Xms256M -Djava.library.path='/home/sam/projekte/JME/jme/lib:/home/sam/projekte/JME/jmephysics/impl/ode/lib' -cp /home/sam/projekte/JME/jme/lib/:/home/sam/projekte/JME/jme/target/:/home/sam/projekte/JME/jmephysics/impl/ode/lib/*:/home/sam/projekte/JME/jmephysics/build/classes com/jmetest/physics/TestBasicJoints

Segmentation fault (core dumped)



when running from console after a few seconds

hmm, works fine over here (Windows), will try on Linux the next couple of days…

To stop diverting this thread, let’s continue the problem discussion here.