GNOME Bugzilla – Bug 696475
Hang when Phalanx attempts to promote a piece
Last modified: 2013-04-15 04:35:25 UTC
Created attachment 239658 [details] pgn to make the AI try to promote. Just move the King up a rank. Phalanx can't promote pieces. When it tries to promote, the game "hangs" forever. (This of course is not a real UI hang, but the AI will never move again.) ** (glchess:5195): DEBUG: chess-engine.vala:155: Writing line to engine: 'go' ** (glchess:5195): DEBUG: chess-engine-cecp.vala:41: Read from engine: 'my move is Pd2xc1Q ' ** (glchess:5195): DEBUG: chess-engine-cecp.vala:49: Engine moves Pd2xc1Q ** (glchess:5195): DEBUG: chess-game.vala:1150: Move Pd2xc1Q has unexpected characters ** (glchess:5195): DEBUG: chess-engine-cecp.vala:41: Read from engine: '5. ... d2c1q' The problem is that gnome-chess is expecting a lowercase letter for the promotion type, and the uppercase Q is throwing it off. I'll attach a patch to fix this, and also update the testcases to be a bit more robust for promotions. (One of the test cases promotes to a Knight instead of a Queen, and will fail until Bug #691050 is resolved.)
Created attachment 239659 [details] [review] Let Phalanx promote Suggested patch
Comment on attachment 239659 [details] [review] Let Phalanx promote LGTM
The following fix has been pushed: d190d8b Fix AI hang when Phalanx attempts to promote
Created attachment 241545 [details] [review] Fix AI hang when Phalanx attempts to promote Also, add two promotion tests