bug-xboard
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-XBoard] Question on Winboard interface


From: Gijsbert Wiesenekker
Subject: [Bug-XBoard] Question on Winboard interface
Date: Mon, 15 Dec 2003 23:20:09 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007

Hi Tim,

I have recently added a Winboard/Xboard interface to my chess program, and I have run into a timing problem that seems to be caused by the fact that Winboard exits 'too soon' if you use the /exit option. I can illustrate the problem as follows. I have two versions of my chess program, Z1 and Z2:

Z1: sends move to Winboard
Z1: sees that it is won/lost/draw
Z1: sends claim to Winboard
Z1: waits for quit
Winboard: gets move from Z1
Winboard: passes move on to Z2
   Z2: gets move from Winboard
   Z2: sees that it is won/lost/draw
   Z2: sends claim to Winboard
   Z2: waits for quit
Winboard: gets claim from Z1.
Sends quit to Z1 and Z2, exits, en does not seem to listen to Z2 any more, because Z2 hangs in trying to send the claim to Winboard.

So if you do the following:

Z1: sends move to Winboard
Z1: sees that it is a draw by rep
Z1: WAIT HERE FOR 5 SECONDS
Z1: sends claim to Winboard
Z1: waits for quit
Winboard: gets move from Z1 (meanwhile Z1 is waiting for 5 seconds)
Winboard: sends move to Z2
   Z2: gets move from Winboard
   Z2: sees that it is won/lost/draw
   Z2: sends claim to Winboard
   Z2: waits for quit
Winboard: now gets claim from Z2 (Z2 answers before Z1 because Z1 is waiting for 5 seconds) Sends quit to Z1 and Z2, exits, and does not seem to listen to Z1 any more, because now Z1 hangs in trying to send the claim to Winboard.

Reading any pending messages from Winboard before sending the claim alleviates the problem:

Z1: sends move to Winboard
Z1: sees that it is a draw by rep
Z1: CHECK FOR ANY PENDING MESSAGES INCLUDING QUIT
Z1: sends claim to Winboard
Z1: waits for quit
Same for Z2.

But still the problem could occur between the step 3 and 4 (and indeed it already happened). If you do not use the /exit option the problem does not occur (both claims from both programs are processed by Winboard), so it looks like Winboard exits 'too soon'. Questions: has anyone else reported this timing problem? What would be the best way to deal with it?

Regards,
Gijsbert







reply via email to

[Prev in Thread] Current Thread [Next in Thread]