Bug in xboard 4.4.4; banned for ICC rated play!

Discussion of chess software programming and technical issues.

Moderator: Ras

User avatar
hgm
Posts: 28483
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Bug found in xboard 4.5.2a PGN output

Post by hgm »

Yes, you are right. I introduced a bug in joining two comments. In XBoard 4.2.7 comments were stored with the moves stripped of their surrounding braces, and the braces were added when flushing the command to PGN. This would automatically join two consecutive comments into a single one, surrounded by a single pair of braces.

But unfortunately PGN variations and stuff between brackets [] were also parsed as comments, so that loading a game and then saving it would replace the () and [] in such constructs by {}. Which was unacceptable.

So I changed the system by storing the braces together with the comments, so that the original type of surrounding bracketing would be remembered. But that way consecutive comments were no longer automatically joined, so I added code in AppendComment to detect the case where the existing comment ended in '}', and the one to be appended started with '{' (or had to be dressed up with '{}', as indicated by a flag), and in that case eliminate the inner "}{" to join them (and reproduce old behavior). The bug was that in case the closing '}' of the comment-to-append was yet to be added on request of the flag, it forgot to do it.

I will fix it, and this fix can still go into 4.5.3, which we should release shortly. Thank you for spotting it.
User avatar
hgm
Posts: 28483
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Will re-attempt xboard 4.5.2a

Post by hgm »

sje wrote:There should be a single command line option to deactivate all sound output. Personally, I think that "no sound" should be the default, but I'll be happy just to be able to have all sound simply deactivated via command line option.
About the sounds: note that XBoard 4.5.x remembers its settings across sessions, so that once you switched off the sounds for the various events individually, (e.g. through the Options->Sounds menu dialog), they will stay off forever. Another way to switch off all sounds is set the -soundProgram to an empty string. This can also be done from the same menu dialog.

My policy is to distribute XBoard with as many new features enabled as possible, to make people aware that these features exist. (Virtualy no one reads the manual, GNU "What's New" pages or release notes, of course.) If they don't like them, they can then switch them off once and for all, but at least they are now aware the features exist.

A similar thing holds for the arrow. If you don't like it, just switch it off by unticking "Highlight moves with arrow" in the Options->General menu dialog, and it will stay off forever. The arrow highlighting is mainly intended for people that use a board theme without grid (setting the grid line width to zero,e.g.with -overrideLineGap 0), so that they cannot see the old-style highlighting at all.

Now that XBoard remembers its settings like WinBoard, the initial configuration hasn't all that much importance anymore.
User avatar
hgm
Posts: 28483
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Bug found in xboard 4.5.2a PGN output

Post by hgm »

OK, I pushed the fix to the hgm.nubati.net repository. It is the latest commit in the hgm4.5.2 branch, which will soon be released as 4.5.3 soon. (Unless you find more bugs, of course!)

http://hgm.nubati.net/cgi-bin/gitweb.cg ... s/hgm4.5.2
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: Will re-attempt xboard 4.5.2a

Post by sje »

hgm wrote:
sje wrote:There should be a single command line option to deactivate all sound output. Personally, I think that "no sound" should be the default, but I'll be happy just to be able to have all sound simply deactivated via command line option.
Another way to switch off all sounds is set the -soundProgram to an empty string. This can also be done from the same menu dialog.
The empty string set in the dialog doesn't work. Xboard just sends the sound data file name to be executed.
User avatar
hgm
Posts: 28483
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Will re-attempt xboard 4.5.2a

Post by hgm »

Hmm, I think we definitely should count that as a bug, although there actually is no documentation thatsays this should work. (The official way is to switch of the individual sounds.) But with an empty a command name, it just makes no sense to send the command anyway, knowing the shell will try to interpret the name of the sound file as the command...

I will add a test to abort the playing of sounds when the -soundProgram is empty.

[edit:] OK, done. But untested: sounds don't work at all anymore on my Linux machine. I guess this is one of these so far undiscovered surprise side-effects of upgrading to Ubuntu 10.04... :cry:
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: Will re-attempt xboard 4.5.2a

Post by sje »

I'm also seeing a diagnostic from FICS:

Code: Select all

gameend: Command not found
I don't think this happened with the prior incarnation of xboard and I haven't changed the xboard call parameters.
User avatar
hgm
Posts: 28483
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Will re-attempt xboard 4.5.2a

Post by hgm »

This is normal, all XBoard versions I know should do that. There is a gameend string that is sent to the ICS after a game ends in zippy mode. The idea is that you can alias it to something on the server, like a seek command for a new game, to keep the bot running fully automatic. There should also be command-line options to redefine the gameend string, but I don't know by heart what they are.
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: Will re-attempt xboard 4.5.2a

Post by sje »

hgm wrote:This is normal, all XBoard versions I know should do that. There is a gameend string that is sent to the ICS after a game ends in zippy mode. The idea is that you can alias it to something on the server, like a seek command for a new game, to keep the bot running fully automatic. There should also be command-line options to redefine the gameend string, but I don't know by heart what they are.
Well, here is the xboard call currently in use:

Code: Select all

/usr/local/bin/xboard \
        -autocomm \
        -autoflag \
        -fcp "./Symbolic -c xboard" \
        -fd $HOME/Arena/Symbolic \
        -hideThinkingFromHuman false \
        -ics \
        -icshost freechess.org \
        -icslogon $HOME/Arena/Symbolic/ficslogon \
        -sgf $HOME/Arena/Symbolic/fics.pgn \
        -size Medium \
        -thinking \
        -xalarm \
        -xanimate \
        -xbuttons \
        -xrm "*zippyGameEnd: seek 5\nseek 15\n" \
        -xzab \
        -xzadj \
        -zippyMaxGames 4 \
        -zp
I thought that the "zippyGameEnd" game end string output option was wholly responsible for handling the game end string output.
User avatar
hgm
Posts: 28483
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Will re-attempt xboard 4.5.2a

Post by hgm »

Well, isn't "gameend" the default value of -zippyGameEnd?
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: Will re-attempt xboard 4.5.2a

Post by sje »

hgm wrote:Well, isn't "gameend" the default value of -zippyGameEnd?
Default or not, it seems to me that any default should have been overridden by:

Code: Select all

        -xrm "*zippyGameEnd: seek 5\nseek 15\n" \
These seeks do show up correctly as far as I can tell.