After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 675434 - glchess never makes a move, loses on time, doesn't exit properly
glchess never makes a move, loses on time, doesn't exit properly
Status: RESOLVED FIXED
Product: gnome-games-superseded
Classification: Deprecated
Component: glchess
3.2.x
Other Linux
: Normal major
: ---
Assigned To: GNOME Games maintainers
GNOME Games maintainers
: 685732 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-05-04 08:46 UTC by Brian
Modified: 2012-10-08 20:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
glchess: fix phalanx/gnuchess output interpretation. (1.78 KB, patch)
2012-05-18 20:19 UTC, Dominique Leuenberger
committed Details | Review

Description Brian 2012-05-04 08:46:01 UTC
glchess settings - human white, gnuchess black, difficulty easy, game duration 5 minutes. Looking at the chessboard, it appears that glchess spends its whole five minutes considering its moves, and then loses on time without making a move. 

Running G_MESSAGES_DEBUG=all glchess provides the output appended, and the move is apparently selected almost instantaneously, but it's never made on the board. 

Once glchess has lost on time, closing the program leaves a copy of gnuchess running - it's taking almost the entire CPU of one core on my PhenomX4, that residual program has run for half an hour without exiting, it has to be aborted by killing the process in the system monitor. 

<Cut and paste of the output as above>

** (glchess:5907): DEBUG: chess-engine.vala:146: Writing line to engine: 'xboard'
** (glchess:5907): DEBUG: chess-engine.vala:146: Writing line to engine: 'easy'
** (glchess:5907): DEBUG: chess-engine.vala:146: Writing line to engine: 'depth 1'
** (glchess:5907): DEBUG: chess-engine-cecp.vala:41: Read from engine: 'GNU Chess 6.0.2'
** (glchess:5907): DEBUG: chess-engine-cecp.vala:41: Read from engine: 'Copyright (C) 2012 Free Software Foundation, Inc.'
** (glchess:5907): DEBUG: chess-engine-cecp.vala:41: Read from engine: 'License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>'
** (glchess:5907): DEBUG: chess-engine-cecp.vala:41: Read from engine: 'This is free software: you are free to change and redistribute it.'
** (glchess:5907): DEBUG: chess-engine-cecp.vala:41: Read from engine: 'There is NO WARRANTY, to the extent permitted by law.'
** (glchess:5907): DEBUG: chess-engine-cecp.vala:41: Read from engine: 'White (1) : TimeLimit[0] = 0'
** (glchess:5907): DEBUG: chess-engine-cecp.vala:41: Read from engine: 'TimeLimit[1] = 0'
** (glchess:5907): DEBUG: chess-engine-cecp.vala:41: Read from engine: 'TimeLimit[0] = 0'
** (glchess:5907): DEBUG: chess-engine-cecp.vala:41: Read from engine: 'TimeLimit[1] = 0'
** (glchess:5907): DEBUG: chess-engine-cecp.vala:41: Read from engine: 'TimeLimit[0] = 0'
** (glchess:5907): DEBUG: chess-engine-cecp.vala:41: Read from engine: 'TimeLimit[1] = 0'
** (glchess:5907): DEBUG: chess-engine-cecp.vala:41: Read from engine: 'Search to a depth of 1'
** (glchess:5907): DEBUG: chess-engine.vala:146: Writing line to engine: 'force'
** (glchess:5907): DEBUG: chess-engine.vala:146: Writing line to engine: 'd2d4'
** (glchess:5907): DEBUG: chess-engine-cecp.vala:41: Read from engine: 'TimeLimit[0] = 0'
** (glchess:5907): DEBUG: chess-engine-cecp.vala:41: Read from engine: 'TimeLimit[1] = 0'
** (glchess:5907): DEBUG: chess-engine-cecp.vala:41: Read from engine: 'TimeLimit[0] = 0'
** (glchess:5907): DEBUG: chess-engine-cecp.vala:41: Read from engine: 'TimeLimit[1] = 0'
** (glchess:5907): DEBUG: chess-engine-cecp.vala:41: Read from engine: '1. d2d4'
** (glchess:5907): DEBUG: chess-engine.vala:146: Writing line to engine: 'go'
** (glchess:5907): DEBUG: chess-engine-cecp.vala:41: Read from engine: 'TimeLimit[0] = 0'
** (glchess:5907): DEBUG: chess-engine-cecp.vala:41: Read from engine: 'TimeLimit[1] = 0'
** (glchess:5907): DEBUG: chess-engine-cecp.vala:41: Read from engine: '1. ... b8c6'
** (glchess:5907): DEBUG: chess-engine-cecp.vala:41: Read from engine: 'My move is : b8c6'



<my note - this 'My move' line comes up after a couple of seconds at most, but the move is never actually made. >
Comment 1 Dominique Leuenberger 2012-05-18 20:19:39 UTC
Created attachment 214399 [details] [review]
glchess: fix phalanx/gnuchess output interpretation.

The patch fixes glchess for me with gnuchess and also with phalanx.

for gnuchess: The 'My move is' string has a space between the text and colon (for me, and also for the reporter in this bug). Thus adding this option to the list of prefixes.

for phalanx, I had some more issues (both are really minor, so I combine them in one patch):
- Phalanx gives me the move to be done in Pd2-d4, but we only checked for Pd2d4 or Pd2xd4, if we beat an opponent piece.
Additionally, I phalanx seems to return white spaces at the end, which also made us fail (thus the strip()).

With this simple patch attached (on current git master) I can play glchess (finally) with gnucess and with phalanx backend engine).
Comment 2 Robert Ancell 2012-05-18 20:48:25 UTC
Review of attachment 214399 [details] [review]:

Thanks Dominique!
Comment 3 Robert Ancell 2012-05-18 20:53:01 UTC
Fixed in 3.5.1 and 3.4.3, thanks for the work!
Comment 4 Robert Ancell 2012-05-18 20:56:56 UTC
*** Bug 665610 has been marked as a duplicate of this bug. ***
Comment 5 Thomas Andersen 2012-05-20 16:14:51 UTC
Can we mark this as fixed Robert?
Comment 6 Dominique Leuenberger 2012-05-21 19:24:19 UTC
(In reply to comment #0)
> Once glchess has lost on time, closing the program leaves a copy of gnuchess
> running - it's taking almost the entire CPU of one core on my PhenomX4, that
> residual program has run for half an hour without exiting, it has to be aborted
> by killing the process in the system monitor. 

This part of the original bug is not addressed yet...
Comment 7 Robert Ancell 2012-05-21 22:43:19 UTC
Dominique, I've opened bug #676529 for this separate issue.
Comment 8 Robert Ancell 2012-10-08 20:48:02 UTC
*** Bug 685732 has been marked as a duplicate of this bug. ***