Page 1 of 1

Exception in thread "Timer-3" java.lang.NullPointerException

PostPosted: Sun Aug 04, 2013 1:22 am
by Diego Cerdán
Hi guys,

while playing level 18, the Server started behaving weird. I paste the output from the Server bellow. If it happends again I will do a second post so you have more information.

My agent dealed with the situation sending for a LOAD_LEVEL command and could continue playing. ;-)

Cheers,
Diego


Code: Select all
Shooting Completed
 wait 15 seconds to record the score...
the game state is :     LEVEL_SELECTION
the game state is :     LEVEL_SELECTION
the game state is :     LEVEL_SELECTION
the game state is :     LEVEL_SELECTION
the game state is :     LEVEL_SELECTION
the game state is :     LEVEL_SELECTION
the game state is :     LEVEL_SELECTION
the game state is :     LEVEL_SELECTION
the game state is :     LEVEL_SELECTION
########################### release chrome window
true
Exception in thread "Timer-3" java.lang.NullPointerException
        at gui.ControlPanel.returnAvailableSlot(ControlPanel.java:214)
        at server.Agent.terminate(Agent.java:735)
        at server.AgentThread.terminateAgent(AgentThread.java:52)
        at server.ServerTimerTask.run(ServerTimerTask.java:18)
        at java.util.TimerThread.mainLoop(Timer.java:555)
        at java.util.TimerThread.run(Timer.java:505)
the game state is :     LEVEL_SELECTION
########################### release chrome window
true
Exception in thread "Timer-4" java.lang.NullPointerException
        at gui.ControlPanel.returnAvailableSlot(ControlPanel.java:214)
        at server.Agent.terminate(Agent.java:735)
        at server.AgentThread.terminateAgent(AgentThread.java:52)
        at server.ServerTimerTask.run(ServerTimerTask.java:18)
        at java.util.TimerThread.mainLoop(Timer.java:555)
        at java.util.TimerThread.run(Timer.java:505)
the game state is :     LEVEL_SELECTION
the game state is :     LEVEL_SELECTION
########################### release chrome window
true
Exception in thread "Timer-2" java.lang.NullPointerException
        at gui.ControlPanel.returnAvailableSlot(ControlPanel.java:214)
        at server.Agent.terminate(Agent.java:735)
        at server.AgentThread.terminateAgent(AgentThread.java:52)
        at server.ServerTimerTask.run(ServerTimerTask.java:18)
        at java.util.TimerThread.mainLoop(Timer.java:555)
        at java.util.TimerThread.run(Timer.java:505)
the game state is :     LEVEL_SELECTION
 Client 15673 Message: getState
the game state is :     LEVEL_SELECTION
 Client 15673 Message: loadLevel
Client 15673 is requesting to load level 18

Re: Exception in thread "Timer-3" java.lang.NullPointerExcep

PostPosted: Sun Aug 04, 2013 2:17 am
by Gary
Hello Diego
Thank you for pointing out this

It seems that the terminating procedure was interrupted otherwise the server would go to the level selection page when time was up. I never encountered this situation and would like to know more details. E.g. Did you run several agents with the same id ?

Smile
Gary

Re: Exception in thread "Timer-3" java.lang.NullPointerExcep

PostPosted: Sun Aug 04, 2013 2:23 am
by Diego Cerdán
I was just running one agent to solve the 21 levels of Poached Eggs. It happend in the middle of level 18.

EDIT: I'm using Server version 1.23.

Re: Exception in thread "Timer-3" java.lang.NullPointerExcep

PostPosted: Sun Aug 04, 2013 2:34 am
by Gary
it seems that you have at least three agent threads registered at the server side. I will wait for your "second post" and at the meanwhile will double check the terminating procedure.

Re: Exception in thread "Timer-3" java.lang.NullPointerExcep

PostPosted: Sun Aug 04, 2013 2:35 am
by Jochen
Did you set a time limit? What was your command to start the server?

Jochen

Re: Exception in thread "Timer-3" java.lang.NullPointerExcep

PostPosted: Sun Aug 04, 2013 2:37 am
by Diego Cerdán
I did not set any time limit, so default whould be 60 minutes.

I executed the server like this: java -jar Server.jar