Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (578)
games submitted by our members
Games in WIP (499)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  [odejava] Strange behavior  (Read 2107 times)
0 Members and 1 Guest are viewing this topic.
Offline arne

Senior Member




money is the worst drug- we should not let it rule


« Posted 2005-04-10 12:16:34 »

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.

:: JOODE :: Xith3d :: OdeJava ::
Offline harryk

Senior Newbie




Stone golems rock!


« Reply #1 - Posted 2005-04-10 14:12:55 »

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 Smiley

Offline arne

Senior Member




money is the worst drug- we should not let it rule


« Reply #2 - Posted 2005-04-10 14:43:17 »

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.<clinit>(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 ?

:: JOODE :: Xith3d :: OdeJava ::
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline harryk

Senior Newbie




Stone golems rock!


« Reply #3 - Posted 2005-04-10 16:41:32 »

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.

Offline arne

Senior Member




money is the worst drug- we should not let it rule


« Reply #4 - Posted 2005-04-10 19:09:45 »

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. Sad

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

:: JOODE :: Xith3d :: OdeJava ::
Offline harryk

Senior Newbie




Stone golems rock!


« Reply #5 - Posted 2005-04-11 08:19:11 »

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 :/
Offline Optus

Junior Newbie




Java games rock!


« Reply #6 - Posted 2005-04-11 22:36:01 »

When installing ODEJava this tripped me up too.  I found the easiest fix was to just change that line from:
1  
PropertyConfigurator.configure(Odejava.class.getClassLoader().getResource("odejavalog4j.properties"));


to:
1  
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.
Offline arne

Senior Member




money is the worst drug- we should not let it rule


« Reply #7 - Posted 2005-04-13 13:56:10 »

Thanks A LOT !!!
This helped  Cheesy

Arne

:: JOODE :: Xith3d :: OdeJava ::
Offline arne

Senior Member




money is the worst drug- we should not let it rule


« Reply #8 - Posted 2005-04-13 17:52:35 »

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(TM) 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(TM) 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.<init>(Ljava/lang/String;Lorg/odejava/World;Lorg/odejava/PlaceableGeom;)V+48
j  org.odejava.Body.<init>(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.<init>(Ljava/lang/String;Lorg/odejava/World;Lorg/odejava/PlaceableGeom;)V+48
j  org.odejava.Body.<init>(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(TM) 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

:: JOODE :: Xith3d :: OdeJava ::
Offline arne

Senior Member




money is the worst drug- we should not let it rule


« Reply #9 - Posted 2005-04-19 15:02:53 »

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)

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

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


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

:: JOODE :: Xith3d :: OdeJava ::
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline arne

Senior Member




money is the worst drug- we should not let it rule


« Reply #10 - Posted 2005-04-19 15:34:45 »

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

:: JOODE :: Xith3d :: OdeJava ::
Offline arne

Senior Member




money is the worst drug- we should not let it rule


« Reply #11 - Posted 2005-04-19 19:40:30 »

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

:: JOODE :: Xith3d :: OdeJava ::
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (28 views)
2014-04-15 18:08:23

BurntPizza (26 views)
2014-04-15 03:46:01

UprightPath (41 views)
2014-04-14 17:39:50

UprightPath (23 views)
2014-04-14 17:35:47

Porlus (40 views)
2014-04-14 15:48:38

tom_mai78101 (62 views)
2014-04-10 04:04:31

BurntPizza (121 views)
2014-04-08 23:06:04

tom_mai78101 (221 views)
2014-04-05 13:34:39

trollwarrior1 (188 views)
2014-04-04 12:06:45

CJLetsGame (197 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!