hacker.org Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
Can't create an array in HackJVM?

 
Reply to topic    hacker.org Forum Index » Wormageddon View previous topic
View next topic
Can't create an array in HackJVM?
Author Message
jl17027



Joined: 10 May 2007
Posts: 2
Location: Grantham, Pennsylvania, US

Post Can't create an array in HackJVM? Reply with quote
When I try to create an object array in HackJVM, it crashes with the following exception:
Code:
Exception in thread "AWT-EventQueue-0" java.lang.Error: Bug
        at ojvm.operations.BytecodeInterpreter.visit_anewarray(BytecodeInterpreter.java:2174)
        at ojvm.loading.instructions.Ins_anewarray.accept(Ins_anewarray.java:31)
        at ojvm.machine.ControlUnit.run(ControlUnit.java:167)
        at org.hacker.worm.HackVMWormSpinalCord.think(HackVMWormSpinalCord.java:119)
        at org.hacker.worm.WormBot.think(WormBot.java:21)
        at org.hacker.worm.WormModel.moveBot(WormModel.java:84)
...


I've boiled it down to a simple test case. Here's what the code looks like:
Code:
package testbot;
public class Testbot {
    public int think(int dx, int dy, int[][] board, int x, int y, int dir, int[][] enemies)
    {
        //this crashes
        Object [] tmp2 = new Object[1];

        return dir;
    }
}


Of course, it runs fine when I check "run natively".
Any ideas? Does this use a bytecode that is unimplemented in HackJVM?
Sun Dec 30, 2007 2:08 pm View user's profile Send private message
adum



Joined: 19 Apr 2007
Posts: 390

Post Reply with quote
sorry, i've fixed this bug in the latest hackjvm for Bitbath, but haven't uploaded it to the wormageddon sdk. i'll try to do that today.

thanks,
adum
Sun Dec 30, 2007 5:37 pm View user's profile Send private message Visit poster's website
adum



Joined: 19 Apr 2007
Posts: 390

Post Reply with quote
okay, i've uploaded a new SDK, version 285. this should work now.

cheers,
adum
Sun Dec 30, 2007 8:50 pm View user's profile Send private message Visit poster's website
jl17027



Joined: 10 May 2007
Posts: 2
Location: Grantham, Pennsylvania, US

Post Reply with quote
Thanks for the quick fix! I'll let you know if the new one still gives me problems...
Mon Dec 31, 2007 1:42 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    hacker.org Forum Index » Wormageddon All times are GMT
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.