[odejava] Strange behavior

Hi I’ve build a char with odejava (one with wheels, that are attached with joints, and other stuff), at the beginning it acts totally normal - it falls on the ground lies there some time not moving very much, but then it starts jumping up and does stuff of no reason, like if I would be adding some force to it. And then after some time it simply vanishes - the bodies return NaN,NaN,NaN for the position then.

Thanks for help
Arne

PS: I’m not able to use the latest cvs, because I don’t get it to compile - some packages for the xml stuff are missing.

If you are having trouble compiling the newest cvs-version, why not simply delete the xode-package? I assume you are not using the xml-stuff anyways, since you can’t compile it.

I think people are somewhat reluctant to answer questions regarding old versions, since it might be a bug that’s been fixed :slight_smile:

Ok I compiled it without xode - that worked - I tried to run it - that did not. This exception occured:

Exception in thread “main” java.lang.ExceptionInInitializerError
at loader.OdeLoader.main(OdeLoader.java:268)
Caused by: java.lang.NullPointerException
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:424)
at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:327)
at org.odejava.Odejava.(Odejava.java:85)
… 1 more

Odejava.java:85 is this:
PropertyConfigurator.configure(Odejava.class.getClassLoader().getResource(“odejavalog4j.properties”));

Obviously it can’t find the odejavalog4j.properties. Where do I have to put it ?

I’m using eclipse and I just added the log4j-jar to the project and it simply works. If you only wanna try to reproduce the bug you had with the previous version, try and comment out any log4j-code and run it. (Its not that much code to comment out)
Otherwise, I’m sure there are some better install-notes somewhere on odejava.org.

I’ve got the log4j.jar installed in my ext dir, so it’s used always - and hey! I don’t want to reproduce old bugs - I want to get the new cvs running!

On odejava.org there are no install-notes. Only one little comment of where to copy the jars under Mac OS X 10.3. And something of updating the natives. :frowning:

I still think it’s because it doesn’t find the odejavalog4j.properties - the log4j classes are found - see the stack trace !!

okey, well, have you tried the log4j-webpage? I have no experience in running it on MacOSX (and hardly any on win either), so I can’t help you :confused:

When installing ODEJava this tripped me up too. I found the easiest fix was to just change that line from:

PropertyConfigurator.configure(Odejava.class.getClassLoader().getResource("odejavalog4j.properties"));

to:

PropertyConfigurator.configure(new File(strPath).toURL());

The strPath variable can then either be the absolute path to the file e.g. “c:\dev\odejavaproj\odejavalog4j.properties”, or if the working directory is set up right, you can make a relative path. For me, I just put “odejavalog4j.properties” as strPath, and then put the properties file in my project directory.

Hope this helps.

Thanks A LOT !!!
This helped :smiley:

Arne

Ok, some examples worked - than I got to my real code and that did not !! When I create a new Body, I get this Error:
`

An unexpected error has been detected by HotSpot Virtual Machine:

EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x10057aaa, pid=1904, tid=2852

Java VM: Java HotSpot™ Client VM (1.5.0-b64 mixed mode)

Problematic frame:

C [odejava.dll+0x57aaa]

An error report file with more information is saved as hs_err_pid1904.log

If you would like to submit a bug report, please visit:

http://java.sun.com/webapps/bugreport/crash.jsp

hs_err_pid1904.log says this:

An unexpected error has been detected by HotSpot Virtual Machine:

EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x10057aaa, pid=1904, tid=2852

Java VM: Java HotSpot™ Client VM (1.5.0-b64 mixed mode)

Problematic frame:

C [odejava.dll+0x57aaa]

--------------- T H R E A D ---------------

Current thread (0x000360b0): JavaThread “main” [_thread_in_native, id=2852]

siginfo: ExceptionCode=0xc0000005, writing address 0x00000004

Registers:
EAX=0x009e0cd0, EBX=0x009e0650, ECX=0x00000000, EDX=0x0aed2dec
ESP=0x0007f914, EBP=0x0007f934, ESI=0x00000001, EDI=0x3dcccccd
EIP=0x10057aaa, EFLAGS=0x00010202

Top of Stack: (sp=0x0007f914)
0x0007f914: 00000000 00000004 06d4a5d8 0aed2cf8
0x0007f924: 00000010 009e0e14 00000020 00000000
0x0007f934: 0007f9a4 1005461e 009e0650 0aed2bd0
0x0007f944: 100545ef 00000004 10054183 00000004
0x0007f954: 00000001 100502b3 00000004 0aed0310
0x0007f964: 06d4a5d8 000360b0 00000000 0007f970
0x0007f974: 00b1826f 0003616c 0007f9ac 0aed0300
0x0007f984: 00000000 0007f988 00000000 0007f9b8

Instructions: (pc=0x10057aaa)
0x10057a9a: 04 eb 03 8b 5d 08 8b 4a 08 8b 7a 04 83 7d f8 00
0x10057aaa: 89 79 04 8b 4a 04 8b 7a 08 89 79 08 0f 84 94 00

Stack: [0x00040000,0x00080000), sp=0x0007f914, free space=254k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [odejava.dll+0x57aaa]
C [odejava.dll+0x5461e]
j org.odejava.ode.Ode.dBodyCreate(Lorg/odejava/ode/SWIGTYPE_p_dWorldID;)Lorg/odejava/ode/SWIGTYPE_p_dBodyID;+8
j org.odejava.Body.(Ljava/lang/String;Lorg/odejava/World;Lorg/odejava/PlaceableGeom;)V+48
j org.odejava.Body.(Ljava/lang/String;Lorg/odejava/World;)V+4
j loader.OdeLoader.loadJoints(Ljava/lang/String;)V+485
j loader.OdeLoader.main([Ljava/lang/String;)V+30
v ~StubRoutines::call_stub
V [jvm.dll+0x8168d]
V [jvm.dll+0xd4179]
V [jvm.dll+0x8155e]
V [jvm.dll+0x8844c]
C [java.exe+0x14c0]
C [java.exe+0x64cd]
C [kernel32.dll+0x214c7]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j org.odejava.ode.OdeJNI.dBodyCreate(J)J+0
j org.odejava.ode.Ode.dBodyCreate(Lorg/odejava/ode/SWIGTYPE_p_dWorldID;)Lorg/odejava/ode/SWIGTYPE_p_dBodyID;+8
j org.odejava.Body.(Ljava/lang/String;Lorg/odejava/World;Lorg/odejava/PlaceableGeom;)V+48
j org.odejava.Body.(Ljava/lang/String;Lorg/odejava/World;)V+4
j loader.OdeLoader.loadJoints(Ljava/lang/String;)V+485
j loader.OdeLoader.main([Ljava/lang/String;)V+30
v ~StubRoutines::call_stub

--------------- P R O C E S S ---------------

Java Threads: ( => current thread )
0x00ad1278 JavaThread “Low Memory Detector” daemon [_thread_blocked, id=2928]
0x00acfe50 JavaThread “CompilerThread0” daemon [_thread_blocked, id=2924]
0x00acf1d8 JavaThread “Signal Dispatcher” daemon [_thread_blocked, id=2920]
0x00ac65a0 JavaThread “Finalizer” daemon [_thread_blocked, id=2916]
0x00ac5110 JavaThread “Reference Handler” daemon [_thread_blocked, id=2912]
=>0x000360b0 JavaThread “main” [_thread_in_native, id=2852]

Other Threads:
0x0003f338 VMThread [id=2908]
0x00aebde8 WatcherThread [id=2956]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap
def new generation total 576K, used 118K [0x02b10000, 0x02bb0000, 0x02ff0000)
eden space 512K, 10% used [0x02b10000, 0x02b1dba0, 0x02b90000)
from space 64K, 99% used [0x02ba0000, 0x02bafff8, 0x02bb0000)
to space 64K, 0% used [0x02b90000, 0x02b90000, 0x02ba0000)
tenured generation total 1408K, used 170K [0x02ff0000, 0x03150000, 0x06b10000)
the space 1408K, 12% used [0x02ff0000, 0x0301aa60, 0x0301ac00, 0x03150000)
compacting perm gen total 8192K, used 2505K [0x06b10000, 0x07310000, 0x0ab10000)
the space 8192K, 30% used [0x06b10000, 0x06d82478, 0x06d82600, 0x07310000)
No shared spaces configured.

Dynamic libraries:
0x00400000 - 0x0040c000 C:\Programme\Java\jdk1.5.0\jre\bin\java.exe
0x77f40000 - 0x77fee000 C:\WINDOWS\System32\ntdll.dll
0x77e40000 - 0x77f38000 C:\WINDOWS\system32\kernel32.dll
0x77da0000 - 0x77e3c000 C:\WINDOWS\system32\ADVAPI32.dll
0x78000000 - 0x78087000 C:\WINDOWS\system32\RPCRT4.dll
0x77be0000 - 0x77c33000 C:\WINDOWS\system32\MSVCRT.dll
0x6d640000 - 0x6d7c5000 C:\Programme\Java\jdk1.5.0\jre\bin\client\jvm.dll
0x77d10000 - 0x77d9c000 C:\WINDOWS\system32\USER32.dll
0x7e180000 - 0x7e1c1000 C:\WINDOWS\system32\GDI32.dll
0x76af0000 - 0x76b1d000 C:\WINDOWS\System32\WINMM.dll
0x6d000000 - 0x6d043000 C:\WINDOWS\System32\xgusb.cpl
0x6d280000 - 0x6d288000 C:\Programme\Java\jdk1.5.0\jre\bin\hpi.dll
0x76bb0000 - 0x76bbb000 C:\WINDOWS\System32\PSAPI.DLL
0x6d610000 - 0x6d61c000 C:\Programme\Java\jdk1.5.0\jre\bin\verify.dll
0x6d300000 - 0x6d31d000 C:\Programme\Java\jdk1.5.0\jre\bin\java.dll
0x6d630000 - 0x6d63f000 C:\Programme\Java\jdk1.5.0\jre\bin\zip.dll
0x10000000 - 0x10070000 C:\Programme\Java\jdk1.5.0\jre\bin\odejava.dll

VM Arguments:
java_command: loader.OdeLoader

Environment Variables:
PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programme\ATI Technologies\ATI Control Panel;E:\3dsmax5\backburner2;C:\Programme\Gemeinsame Dateien\Autodesk Shared;C:\Programme\Java\jdk1.5.0\jre\bin;C:\Programme\Java\jdk1.5.0\bin;E:\Programme\GTK\2.0\bin
USERNAME=arne
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 6 Model 8 Stepping 1, AuthenticAMD

--------------- S Y S T E M ---------------

OS: Windows XP Build 2600 Service Pack 1

CPU:total 1 family 6, cmov, cx8, fxsr, mmx, sse

Memory: 4k page, physical 523760k(88964k free), swap 1279176k(926256k free)

vm_info: Java HotSpot™ Client VM (1.5.0-b64) for windows-x86, built on Sep 15 2004 03:00:31 by “java_re” with MS VC++ 6.0
`
Please note, that I was able to create a Body before the one that made this error without getting an error message.

Arne

Ok - I now downloaded the newest cvs again and now the problem doesn’t occur anymore, but this vanishing still occurs.

Here how it looks to me:

  • the chair falls
  • it has collided with the ground - only some wheels are spinning a bit
  • the wheels start spinning more
  • the chair jumps up
  • the chair starts spinning in mid air (spinns very fast)

http://www.wi-bw.tfh-wildau.de/~_amueller/chairSpinning.jpg

  • then it falls on the ground, slows down
  • and vanishes

If this helps you, here’s a description how I’ve built it:

http://www.wi-bw.tfh-wildau.de/~_amueller/chairStructured.jpg

This is strange isn’t it? I think the problem is because the forces punch themselves up and up because of the joint - construction and then after some time the forces are too high, so I get NaN values and the chair dissapears.

Hope you can help me

Arne

Ok - It works now I’ve just set the joints wrong (at least I thin I’ve set them wrong, because it works now)

mmh maybe it’s because of that error message i get now:

ODE Message 3: LCP internal error, s <= 0 (s=-7.3766e+002)

can it be, that it crashed when the error ocurred in earlier versions. It’s because I get this messages when my chair does things it shouldn’t - it still does, even if it’s better than before.

Arne