Webots Array Passing Error in Java

"donaldnairn2004" <[email protected]> Sat, 21 Feb 2004 14:59:41 -0000
Newsgroups gmane.comp.cybernetics.webot.contest
Message-ID <[email protected]>
Hi all,

I think I've found a small bug in the webots interface, there seems to
be a problem with the way Webots handles array passing, I have no idea
of the root cause of
the problem other than every method I personally have defined for my
own robot which
passes an array of ints, floats, etc has caused the following exception

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x4CEE6933
Function=servo_set_position+0x27
Library=/home/s0094293/mlsc/prac1/webots/lib/libController.so

Current Java thread:
        at com.cyberbotics.webots.Controller.servo_set_position(Native
Method)
        at MacPhee.standup_faceup(MacPhee.java:331)
        at MacPheeAttack.recover_backward_fall(MacPheeAttack.java:332)
        at Judoka0.bendLeftKnee(Judoka0.java:469)
        at Judoka0.main(Judoka0.java:653)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at
com.cyberbotics.webots.ControllerLauncher.main(ControllerLauncher.java:104)

Dynamic libraries:
08048000-0804e000 r-xp 00000000 03:01 507812    
/usr/lib/jvm/java-1.4.2-sun-1.4.2.03/jre/bin/java
0804e000-0804f000 rw-p 00005000 03:01 507812    
/usr/lib/jvm/java-1.4.2-sun-1.4.2.03/jre/bin/java
40000000-40015000 r-xp 00000000 03:01 1488042    /lib/ld-2.3.2.so
40015000-40016000 rw-p 00014000 03:01 1488042    /lib/ld-2.3.2.so
40017000-4001f000 r-xp 00000000 03:01 2846642   
/usr/lib/jvm/java-1.4.2-sun-1.4.2.03/jre/lib/i386/native_threads/libhpi.so
4001f000-40020000 rw-p 00007000 03:01 2846642   
/usr/lib/jvm/java-1.4.2-sun-1.4.2.03/jre/lib/i386/native_threads/libhpi.so
40020000-40024000 rw-s 00000000 03:01 2846470   
/tmp/hsperfdata_s0094293/367
40024000-40034000 r-xp 00000000 03:01 148584    
/usr/lib/jvm/java-1.4.2-sun-1.4.2.03/jre/lib/i386/libverify.so
40034000-40036000 rw-p 0000f000 03:01 148584    
/usr/lib/jvm/java-1.4.2-sun-1.4.2.03/jre/lib/i386/libverify.so
40036000-40041000 r-xp 00000000 03:01 4071661   
/lib/tls/libpthread-0.34.so
40041000-40042000 rw-p 0000a000 03:01 4071661   
/lib/tls/libpthread-0.34.so
40044000-40047000 r-xp 00000000 03:01 1488055    /lib/libdl-2.3.2.so
40047000-40048000 rw-p 00002000 03:01 1488055    /lib/libdl-2.3.2.so
40049000-40443000 r-xp 00000000 03:01 3893172   
/usr/lib/jvm/java-1.4.2-sun-1.4.2.03/jre/lib/i386/client/libjvm.so
40443000-4045f000 rw-p 003f9000 03:01 3893172   
/usr/lib/jvm/java-1.4.2-sun-1.4.2.03/jre/lib/i386/client/libjvm.so
40471000-40483000 r-xp 00000000 03:01 1488059    /lib/libnsl-2.3.2.so
40483000-40484000 rw-p 00011000 03:01 1488059    /lib/libnsl-2.3.2.so
40486000-404a7000 r-xp 00000000 03:01 4071659    /lib/tls/libm-2.3.2.so
404a7000-404a8000 rw-p 00020000 03:01 4071659    /lib/tls/libm-2.3.2.so
404a8000-404c8000 r-xp 00000000 03:01 148572    
/usr/lib/jvm/java-1.4.2-sun-1.4.2.03/jre/lib/i386/libjava.so
404c8000-404ca000 rw-p 0001f000 03:01 148572    
/usr/lib/jvm/java-1.4.2-sun-1.4.2.03/jre/lib/i386/libjava.so
404ca000-404de000 r-xp 00000000 03:01 148585    
/usr/lib/jvm/java-1.4.2-sun-1.4.2.03/jre/lib/i386/libzip.so
404de000-404e1000 rw-p 00013000 03:01 148585    
/usr/lib/jvm/java-1.4.2-sun-1.4.2.03/jre/lib/i386/libzip.so
404e1000-41e79000 r--s 00000000 03:01 737267    
/usr/lib/jvm/java-1.4.2-sun-1.4.2.03/jre/lib/rt.jar
41ec3000-41ed9000 r--s 00000000 03:01 737268    
/usr/lib/jvm/java-1.4.2-sun-1.4.2.03/jre/lib/sunrsasign.jar
41ed9000-41fb4000 r--s 00000000 03:01 737261    
/usr/lib/jvm/java-1.4.2-sun-1.4.2.03/jre/lib/jsse.jar
41fb4000-41fc5000 r--s 00000000 03:01 737260    
/usr/lib/jvm/java-1.4.2-sun-1.4.2.03/jre/lib/jce.jar
41fed000-41fee000 r--p 004d8000 03:01 3450291   
/usr/lib/locale/locale-archive
41fee000-41ff1000 r--s 00000000 03:01 2307026   
/usr/lib/jvm/java-1.4.2-sun-1.4.2.03/jre/lib/ext/dnsns.jar
41ff1000-41ffe000 r--s 00000000 03:01 2307027   
/usr/lib/jvm/java-1.4.2-sun-1.4.2.03/jre/lib/ext/ldapsec.jar
41ffe000-41fff000 r--s 00000000 00:0f 802228    
/amd/nfs/phoenix/disk/ptn010/s0094293/mlsc/prac1/webots/lib/Controller.jar
42000000-4212f000 r-xp 00000000 03:01 4071657    /lib/tls/libc-2.3.2.so
4212f000-42132000 rw-p 0012f000 03:01 4071657    /lib/tls/libc-2.3.2.so
42134000-4268d000 r--s 00000000 03:01 737234    
/usr/lib/jvm/java-1.4.2-sun-1.4.2.03/jre/lib/charsets.jar
4470d000-4470f000 rw-s e01ff000 03:01 2387757    /dev/dri/card0
4c913000-4cb13000 r--p 00000000 03:01 3450291   
/usr/lib/locale/locale-archive
4cb13000-4cbec000 r--p 001e0000 03:01 3450291   
/usr/lib/locale/locale-archive
4cdf0000-4ceac000 r--s 00000000 03:01 2307028   
/usr/lib/jvm/java-1.4.2-sun-1.4.2.03/jre/lib/ext/localedata.jar
4ceac000-4cec8000 r--s 00000000 03:01 2307029   
/usr/lib/jvm/java-1.4.2-sun-1.4.2.03/jre/lib/ext/sunjce_provider.jar
4cec8000-4cecc000 r-xp 00000000 00:0f 802229    
/amd/nfs/phoenix/disk/ptn010/s0094293/mlsc/prac1/webots/lib/libJavaController.so
4cecc000-4cecd000 rw-p 00003000 00:0f 802229    
/amd/nfs/phoenix/disk/ptn010/s0094293/mlsc/prac1/webots/lib/libJavaController.so
4cecd000-4cf0c000 r-xp 00000000 00:0f 802230    
/amd/nfs/phoenix/disk/ptn010/s0094293/mlsc/prac1/webots/lib/libController.so
4cf0c000-4cf0f000 rw-p 0003e000 00:0f 802230    
/amd/nfs/phoenix/disk/ptn010/s0094293/mlsc/prac1/webots/lib/libController.so
4cf2e000-4cf3a000 r-xp 00000000 03:01 1749675    /usr/lib/libz.so.1.1.4
4cf3a000-4cf3c000 rw-p 0000b000 03:01 1749675    /usr/lib/libz.so.1.1.4
4cf3c000-4cf59000 r-xp 00000000 03:01 1749706   
/usr/lib/libjpeg.so.62.0.0
4cf59000-4cf5a000 rw-p 0001d000 03:01 1749706   
/usr/lib/libjpeg.so.62.0.0
4cf5a000-4cfd5000 r-xp 00000000 03:01 1210060   
/usr/X11R6/lib/libGLU.so.1.3
4cfd5000-4cfd7000 rw-p 0007a000 03:01 1210060   
/usr/X11R6/lib/libGLU.so.1.3
4cfd7000-4d042000 r-xp 00000000 03:01 1210179   
/usr/X11R6/lib/libGL.so.1.2
4d042000-4d047000 rw-p 0006b000 03:01 1210179   
/usr/X11R6/lib/libGL.so.1.2
4d04a000-4d06e000 r-xp 00000000 03:01 1749687   
/usr/lib/libglib-1.2.so.0.0.10
4d06e000-4d06f000 rw-p 00024000 03:01 1749687   
/usr/lib/libglib-1.2.so.0.0.10
4d06f000-4d118000 r-xp 00000000 03:01 1749685   
/usr/lib/libstdc++.so.5.0.3
4d118000-4d11d000 rw-p 000a9000 03:01 1749685   
/usr/lib/libstdc++.so.5.0.3
4d122000-4d129000 r-xp 00000000 03:01 1488095   
/lib/libgcc_s-3.2.2-20030225.so.1
4d129000-4d12a000 rw-p 00007000 03:01 1488095   
/lib/libgcc_s-3.2.2-20030225.so.1
4d12a000-4d137000 r-xp 00000000 03:01 1210142   
/usr/X11R6/lib/libXext.so.6.4
4d137000-4d138000 rw-p 0000c000 03:01 1210142   
/usr/X11R6/lib/libXext.so.6.4
4d138000-4d214000 r-xp 00000000 03:01 1210132   
/usr/X11R6/lib/libX11.so.6.2
4d214000-4d217000 rw-p 000db000 03:01 1210132   
/usr/X11R6/lib/libX11.so.6.2
4d217000-4d38c000 r-xp 00000000 03:01 2388361   
/usr/X11R6/lib/modules/dri/i830_dri.so
4d38c000-4d38f000 rw-p 00174000 03:01 2388361   
/usr/X11R6/lib/modules/dri/i830_dri.so
4d39a000-4db9a000 rw-s e8000000 03:01 2387757    /dev/dri/card0
4db9a000-4e39a000 rw-s ef000000 03:01 2387757    /dev/dri/card0
4e39a000-4eb9a000 rw-s ee800000 03:01 2387757    /dev/dri/card0
4eb9a000-4f05a000 rw-s ee238000 03:01 2387757    /dev/dri/card0

Heap at VM Abort:
Heap
 def new generation   total 576K, used 347K [0x44710000, 0x447b0000,
0x44bf0000)
  eden space 512K,  55% used [0x44710000, 0x44756c58, 0x44790000)
  from space 64K, 100% used [0x447a0000, 0x447b0000, 0x447b0000)
  to   space 64K,   0% used [0x44790000, 0x44790000, 0x447a0000)
 tenured generation   total 1408K, used 61K [0x44bf0000, 0x44d50000,
0x48710000)
   the space 1408K,   4% used [0x44bf0000, 0x44bff440, 0x44bff600,
0x44d50000)
 compacting perm gen  total 4096K, used 1420K [0x48710000, 0x48b10000,
0x4c710000)
   the space 4096K,  34% used [0x48710000, 0x48873070, 0x48873200,
0x48b10000)

Local Time = Sat Feb 21 14:48:47 2004
Elapsed Time = 5
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.2_03-b02 mixed mode)
#
# An error report file has been saved as hs_err_pid367.log.
# Please refer to the file for further information.
#


which is caused by the line of code

servo_set_position(joint[LEFT_SHOULDER_1],counter[0]);

Has anyone else encountered this problem and is there a soln to it
other than not
passing array as arguments in your own methods or doing :

int increment;
servo_set_position(joint[LEFT_SHOULDER_1],increment);

with the code above



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/pU_rlB/TM
---------------------------------------------------------------------~->

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/webots-contest/

<*> To unsubscribe from this group, send an email to:
     [email protected]

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/