strange error in non native mode

Post Reply
Jey123456
Posts: 7
Joined: Thu May 29, 2008 9:03 pm

strange error in non native mode

Post by Jey123456 »

i get this when debugging my bot in non native mode

2-Jun-2008 1:19:43 AM ojvm.machine.ControlUnit makeAndThrow
INFO: new exception: java.lang.VerifyError, msg: Can't convert Boolean to Int
failure to think: ojvm.data.JavaException null
ojvm.data.JavaException
at ojvm.operations.Exceptions.makeAndThrow(Exceptions.java:40)
at ojvm.machine.ControlUnit.makeAndThrow(ControlUnit.java:216)
at ojvm.operations.BytecodeInterpreter.visit_ifne(BytecodeInterpreter.java:1454)
at ojvm.loading.instructions.Ins_ifne.accept(Ins_ifne.java:27)
at ojvm.machine.ControlUnit.run(ControlUnit.java:169)
at org.hacker.engine.war.HackVMWarSpinalCord.build(HackVMWarSpinalCord.java:219)
at org.hacker.engine.war.Faction.cityThink(Faction.java:167)
at org.hacker.engine.war.Faction.think(Faction.java:111)
at org.hacker.engine.war.WarModel.step(WarModel.java:77)
at org.hacker.engine.GameUI.stepToIt(GameUI.java:175)
at org.hacker.engine.GameUI$6.run(GameUI.java:108)


Its not preventing my bot to behave correctly in any way, and im not getting any conversion (int to bool) error while in native.


I dont think its a serious error, but still i think you should look at it. This bot is the one i currently use so feel free to look if you do get the message too.
________
W108
Last edited by Jey123456 on Wed Feb 02, 2011 11:34 pm, edited 1 time in total.
User avatar
adum
Posts: 392
Joined: Thu Apr 19, 2007 12:49 pm
Contact:

Post by adum »

hey, i think i've seen this bug before too. i believe it's to do with the static initializers. try giving your booleans a default value to get rid of it like:

boolean b = false;

adum
Jey123456
Posts: 7
Joined: Thu May 29, 2008 9:03 pm

Post by Jey123456 »

ok, ty ill try this. And i noticed my ai crash randomly in some fight lol. Im trying to debug it, but i never been able to reproduce it yet locally ><.
________
herbal shop
Last edited by Jey123456 on Wed Feb 02, 2011 11:35 pm, edited 1 time in total.
Jey123456
Posts: 7
Joined: Thu May 29, 2008 9:03 pm

Post by Jey123456 »

ah, lol, i think i figured where this "crash" come from, did you ever test the 100000 instruction limit ? my bot can easily go over this (about 3.5k instruction on one bot some time) it supposed to cycle thrue all bot bot so if they dont receive cycle in one tick, they should receive it in the next one. This is only a theory tho. Since well, vs the common ai, i cant get a game with enough bot before my ai win ><
________
Reliant
Last edited by Jey123456 on Wed Feb 02, 2011 11:35 pm, edited 1 time in total.
Jey123456
Posts: 7
Joined: Thu May 29, 2008 9:03 pm

Post by Jey123456 »

hehe, i figured why my bot were "crashing" and about the error msg, it was indeed because a boolean wasnt initialised tho, it wasnt static, but its gone now. =D
________
weed vaporizer
Last edited by Jey123456 on Wed Feb 02, 2011 11:35 pm, edited 1 time in total.
User avatar
adum
Posts: 392
Joined: Thu Apr 19, 2007 12:49 pm
Contact:

Post by adum »

the 100k instruction limit should be pretty well tested by now. a lot of bots run over this one =)

i'm probably going to switch the hackjvm to one more solid eventually...

adum
Jey123456
Posts: 7
Joined: Thu May 29, 2008 9:03 pm

Post by Jey123456 »

yea, its alright, i finally succeeded in reproducing and fixing the problem that was causing this. Propelling me in 6th place =D.
________
drug testing
Post Reply