Hi While i was trying odejava i found what I thik should be two bugs with GeomCone and GeomCylinder
If i change HighLevelApiExample.java at line 171 with
box = new Body(“box”,world, new GeomCone(1f, 1f));
i get
Odejava version 0.2.4
Exception in thread “main” java.lang.NullPointerException: Attempt to dereference null dGeomID
at org.odejava.ode.OdeJNI.dGeomGetPosition(Native Method)
at org.odejava.ode.Ode.dGeomGetPosition(Ode.java:174)
at org.odejava.geom.Geom.updateReferences(Geom.java:98)
at org.odejava.geom.GeomCone.(GeomCone.java:59)
at org.odejava.geom.GeomCone.(GeomCone.java:64)
at org.odejava.test.simple.HighLevelApiExample.initObjects(HighLevelApiExample.java:171)
at org.odejava.test.simple.HighLevelApiExample.(HighLevelApiExample.java:116)
at org.odejava.test.simple.HighLevelApiExample.main(HighLevelApiExample.java:86)
if i change it with
box = new Body(“box”,world, new GeomCylinder(1f, 1f));
i get a different behaviour (exception outside JVM):
Odejava version 0.2.4
free(): invalid pointer 0x4c93ce28!
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x48D0446
Function=[Unknown.]
Library=(N/A)
NOTE: We are unable to locate the function name symbol for the error
just occurred. Please refer to release documentation for possible
reason and solutions.
Current Java thread:
at org.odejava.collision.JavaCollision.spaceCollide(Native Method)
at org.odejava.collision.JavaCollision.collide(JavaCollision.java:124)
at org.odejava.test.simple.HighLevelApiExample.step(HighLevelApiExample.java:209)
at org.odejava.test.simple.HighLevelApiExample.simulate(HighLevelApiExample.java:187)
at org.odejava.test.simple.HighLevelApiExample.main(HighLevelApiExample.java:87)
Dynamic libraries:
08048000-0804e000 r-xp 00000000 03:04 1910649 /usr/lib/j2sdk1.4-sun/bin/java
0804e000-0804f000 rw-p 00005000 03:04 1910649 /usr/lib/j2sdk1.4-sun/bin/java
40000000-40016000 r-xp 00000000 03:04 2056454 /lib/ld-2.3.2.so
40016000-40017000 rw-p 00015000 03:04 2056454 /lib/ld-2.3.2.so
40018000-40020000 r-xp 00000000 03:04 800169 /usr/lib/j2sdk1.4-sun/jre/lib/i386/native_threads/libhpi.so
40020000-40021000 rw-p 00007000 03:04 800169 /usr/lib/j2sdk1.4-sun/jre/lib/i386/native_threads/libhpi.so
40021000-40028000 r-xp 00000000 03:04 2056558 /lib/libnss_compat-2.3.2.so
40028000-40029000 rw-p 00006000 03:04 2056558 /lib/libnss_compat-2.3.2.so
40029000-40036000 r-xp 00000000 03:04 2056704 /lib/libpthread-0.10.so
40036000-40038000 rw-p 0000c000 03:04 2056704 /lib/libpthread-0.10.so
4007a000-4007c000 r-xp 00000000 03:04 2056508 /lib/libdl-2.3.2.so
4007c000-4007d000 rw-p 00002000 03:04 2056508 /lib/libdl-2.3.2.so
4007e000-401a6000 r-xp 00000000 03:04 2056463 /lib/libc-2.3.2.so
401a6000-401ae000 rw-p 00127000 03:04 2056463 /lib/libc-2.3.2.so
401b1000-405ab000 r-xp 00000000 03:04 800174 /usr/lib/j2sdk1.4-sun/jre/lib/i386/client/libjvm.so
405ab000-405c7000 rw-p 003f9000 03:04 800174 /usr/lib/j2sdk1.4-sun/jre/lib/i386/client/libjvm.so
405d9000-405eb000 r-xp 00000000 03:04 2056557 /lib/libnsl-2.3.2.so
405eb000-405ec000 rw-p 00011000 03:04 2056557 /lib/libnsl-2.3.2.so
405ee000-4060f000 r-xp 00000000 03:04 2056509 /lib/libm-2.3.2.so
4060f000-40610000 rw-p 00020000 03:04 2056509 /lib/libm-2.3.2.so
40610000-40614000 rw-s 00000000 03:04 572466 /tmp/hsperfdata_migliava/4794
40614000-40617000 r–s 00000000 03:04 800205 /usr/lib/j2sdk1.4-sun/jre/lib/ext/dnsns.jar
40617000-4061e000 r-xp 00000000 03:04 2056354 /lib/libgcc_s.so.1
4061e000-4061f000 rw-p 00007000 03:04 2056354 /lib/libgcc_s.so.1
40621000-40629000 r-xp 00000000 03:04 2056678 /lib/libnss_nis-2.3.2.so
40629000-4062a000 rw-p 00007000 03:04 2056678 /lib/libnss_nis-2.3.2.so
4062a000-40632000 r-xp 00000000 03:04 2056588 /lib/libnss_files-2.3.2.so
40632000-40633000 rw-p 00008000 03:04 2056588 /lib/libnss_files-2.3.2.so
40633000-40643000 r-xp 00000000 03:04 800178 /usr/lib/j2sdk1.4-sun/jre/lib/i386/libverify.so
40643000-40645000 rw-p 0000f000 03:04 800178 /usr/lib/j2sdk1.4-sun/jre/lib/i386/libverify.so
40645000-40665000 r-xp 00000000 03:04 800179 /usr/lib/j2sdk1.4-sun/jre/lib/i386/libjava.so
40665000-40667000 rw-p 0001f000 03:04 800179 /usr/lib/j2sdk1.4-sun/jre/lib/i386/libjava.so
40667000-4067b000 r-xp 00000000 03:04 800181 /usr/lib/j2sdk1.4-sun/jre/lib/i386/libzip.so
4067b000-4067e000 rw-p 00013000 03:04 800181 /usr/lib/j2sdk1.4-sun/jre/lib/i386/libzip.so
4067e000-42016000 r–s 00000000 03:04 800916 /usr/lib/j2sdk1.4-sun/jre/lib/rt.jar
42060000-42076000 r–s 00000000 03:04 800208 /usr/lib/j2sdk1.4-sun/jre/lib/sunrsasign.jar
42076000-42151000 r–s 00000000 03:04 800913 /usr/lib/j2sdk1.4-sun/jre/lib/jsse.jar
42151000-42162000 r–s 00000000 03:04 800209 /usr/lib/j2sdk1.4-sun/jre/lib/jce.jar
42162000-426bb000 r–s 00000000 03:04 800914 /usr/lib/j2sdk1.4-sun/jre/lib/charsets.jar
44763000-44770000 r–s 00000000 03:04 800206 /usr/lib/j2sdk1.4-sun/jre/lib/ext/ldapsec.jar
4c7f0000-4c80c000 r–s 00000000 03:04 800204 /usr/lib/j2sdk1.4-sun/jre/lib/ext/sunjce_provider.jar
4c80c000-4c8c8000 r–s 00000000 03:04 800207 /usr/lib/j2sdk1.4-sun/jre/lib/ext/localedata.jar
4c8c8000-4c90f000 r–s 00000000 03:04 2220650 /home/migliava/eclipse/odejava/odejava/lib/vecmath.jar
4c90f000-4c987000 r-xp 00000000 03:04 1730858 /home/migliava/eclipse/odejava/odejava/lib/linux/libodejava.so
4c987000-4c988000 rw-p 00078000 03:04 1730858 /home/migliava/eclipse/odejava/odejava/lib/linux/libodejava.so
4c99b000-4ca39000 r-xp 00000000 03:04 685753 /usr/lib/libstdc++.so.5.0.5
4ca39000-4ca4f000 rw-p 0009d000 03:04 685753 /usr/lib/libstdc++.so.5.0.5
Heap at VM Abort:
Heap
def new generation total 576K, used 471K [0x44770000, 0x44810000, 0x44c50000)
eden space 512K, 92% used [0x44770000, 0x447e5f38, 0x447f0000)
from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000)
to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000)
tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000)
the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000)
compacting perm gen total 4096K, used 1367K [0x48770000, 0x48b70000, 0x4c770000)
the space 4096K, 33% used [0x48770000, 0x488c5cc0, 0x488c5e00, 0x48b70000)
Local Time = Sat Apr 17 16:15:39 2004
Elapsed Time = 0
The exception above was detected in native code outside the VM
Java VM: Java HotSpot™ Client VM (1.4.2_03-b02 mixed mode)
An error report file has been saved as hs_err_pid4794.log.
Please refer to the file for further information.
Sometimes i wonder why cones and cylinders aren’t very popular ;-))