[Pogamut-list] Bot state change to dead freezes code execution.

Piotr.Murach pogamut-forum at diana.ms.mff.cuni.cz
Thu Jul 22 11:09:15 CEST 2010


Re: Bot state change to dead freezes code execution.

Author: Piotr.Murach

Morning,

Ok, you're right there, there is error that comes first that triggers this 'avalanche' and in some ways I am not
suprised as it seems the famous Weaponry class and its listener fail - I had problems with this module from the beginning,
I have posted the stuff about translocator etc... Anyway, here is the snippet that may help as it significantly narrows
the possibilities (so I hope :-) )

(ThiefBot)     [INFO]    19:06:31.515    Agent state switched to: BotStateInited[Bot initialized.]
(ThiefBot)     [INFO]    19:06:31.515                                                                       In state KILLING.
(ThiefBot)     [SEVERE]  19:06:31.515                                                                       Fatal error in WorldView[2635]: Exception raising event InfoMessage[AddInventoryMsg] | Id = WorldObjectId[CTF-1on1-Joust.AssaultRifle] | Type = XWeapons.AssaultRifle | PickupType = ItemType[name = XWeapons.AssaultRiflePickup, category = WEAPON, group = ASSAULT_RIFLE] | 
(ThiefBot)     [SEVERE]  19:06:31.515                                                                    Fatal error happenned - component bus is stopping.
FatalErrorEvent[
    Component=UT2004SyncLockableWorldView
    Message=Exception raising event InfoMessage[AddInventoryMsg] | Id = WorldObjectId[CTF-1on1-Joust.AssaultRifle] | Type = XWeapons.AssaultRifle | PickupType = ItemType[name = XWeapons.AssaultRiflePickup, category = WEAPON, group = ASSAULT_RIFLE] | 
    Cause=java.lang.NullPointerException
    Cause stacktrace:
        cz.cuni.amis.pogamut.ut2004.agent.module.sensomotoric.Weaponry$Ammunition.getPriAmmoForWeapon(Weaponry.java:577)
        cz.cuni.amis.pogamut.ut2004.agent.module.sensomotoric.Weaponry$AddInventoryMsgListener.notify(Weaponry.java:812)
        cz.cuni.amis.pogamut.ut2004.agent.module.sensomotoric.Weaponry$AddInventoryMsgListener.notify(Weaponry.java:803)
        cz.cuni.amis.pogamut.base.communication.worldview.impl.AbstractWorldView$ListenerNotifier.notify(AbstractWorldView.java:98)
        cz.cuni.amis.pogamut.base.communication.worldview.impl.AbstractWorldView$ListenerNotifier.notify(AbstractWorldView.java:77)
        cz.cuni.amis.utils.listener.Listeners.notify(Listeners.java:252)
        cz.cuni.amis.utils.listener.ListenersMap.notify(ListenersMap.java:76)
        cz.cuni.amis.pogamut.base.communication.worldview.impl.AbstractWorldView.notifyLevelAListeners(AbstractWorldView.java:629)
        cz.cuni.amis.pogamut.base.communication.worldview.impl.AbstractWorldView.innerRaiseEvent(AbstractWorldView.java:700)
        cz.cuni.amis.pogamut.base.communication.worldview.impl.AbstractWorldView.raiseEvent(AbstractWorldView.java:604)
        cz.cuni.amis.pogamut.base.communication.worldview.impl.EventDrivenWorldView.raiseEvent(EventDrivenWorldView.java:102)
        cz.cuni.amis.pogamut.base.communication.worldview.impl.EventDrivenWorldView.innerNotify(EventDrivenWorldView.java:126)
        cz.cuni.amis.pogamut.base.communication.worldview.impl.EventDrivenWorldView.notify(EventDrivenWorldView.java:223)
        cz.cuni.amis.pogamut.base3d.worldview.impl.BatchAwareWorldView.notify(BatchAwareWorldView.java:83)
        cz.cuni.amis.pogamut.ut2004.communication.worldview.UT2004SyncLockableWorldView.notify(UT2004SyncLockableWorldView.java:221)
        cz.cuni.amis.pogamut.base.communication.mediator.impl.Mediator$Worker.run(Mediator.java:315)
        java.lang.Thread.run(Thread.java:619)
(ThiefBot)     [SEVERE]  19:06:31.515                                                                      Received fatal error from WorldView.

With my small debug statements it occured when the botInitialised method was called but then again if it is multithreaded
call then this might have happened earlier in bot prepare.

You know Jakub, could you tell me what is the best method/way to get the weaponry info and act on it, I mean
what would be your advice in terms of initialising and using weaponry? At the moment I am 
passing this.weaponry in botInitialised method to another object that encapsulates game, agentinfo and other crucial info 
as present in UT2004BotModuleController. This object is later passed around to other classes etc.

In the meantime I can think of at least two things i can do, one is to plug in Hunter bot instead of mine as it uses
weaponry and see if the error happens or eliminate the weaponry module from my bot and see if this helps.

I really would like to use this module as its use is many ways imperative in my experiments and I hope this can be sorted. 

Thanks a lot,

P.

-- 
Reply Link: <http://diana.ms.mff.cuni.cz/main/tiki-view_forum_thread.php?forumId=4&comments_reply_threadId=4&comments_parentId=293&post_reply=1#form>





More information about the Pogamut-list mailing list