GNOME Bugzilla – Bug 675434
glchess never makes a move, loses on time, doesn't exit properly
Last modified: 2012-10-08 20:48:02 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. >
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).
Review of attachment 214399 [details] [review]: Thanks Dominique!
Fixed in 3.5.1 and 3.4.3, thanks for the work!
*** Bug 665610 has been marked as a duplicate of this bug. ***
Can we mark this as fixed Robert?
(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...
Dominique, I've opened bug #676529 for this separate issue.
*** Bug 685732 has been marked as a duplicate of this bug. ***