Hi,

On my APE server, I generate moves from an Artificial Intelligence. When my 
server has worked for one month, it sometimes loses track and my robots 
never play. Here is my simplified code:

function wait_for_new_move()
{

 var move_number = ask_for_robot_move()

 play_move_number(move_number);

}

function ask_for_robot_move();
{
 ... Artificial Intelligence...

return move_number;
}

Now, here is what happens when things go wrong: wait_for_new_move() is 
called as usual and then ask_for_robot_move() too. But then this function 
stops after some computations at some point and never returns and 
wait_for_new_move() also never executes what is behind ask_for_robot_move() 
call.

My logs shows that APE keeps working and deals with queued events straight 
after that.

I strongly suspect memory leaks to be the cause of that behaviour, but 
there is probably not much I can do until I patch APE (with Cliff's update, 
see https://groups.google.com/forum/?fromgroups=#!topic/ape-project/UJqh4rCvukc 
thread) and I need Mysql to work with this new version of APE to do that...

For the moment, I am trying to detect when this bug occurs and find a 
workaround. The workaround is easy. If the robot has not played within 3 
seconds, I can either rerun wait_for_new_move() or simply cancel the game.

My questions:

1) does that kind of silent crash ring a bell to anyone?

2) do you know of a way to simulate such a silent crash without writing 
code (a series of return NOTHING). A division by zero does nothing. 
Javascript code keeps being executed. Is there something stronger to really 
crash the function for good?

Thanks for you help.

Nicolas.

-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/

Reply via email to