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 691031 - gnome-chess ignores args specified in engines.conf - completely breaks gnuchess (PATCH)
gnome-chess ignores args specified in engines.conf - completely breaks gnuche...
Status: RESOLVED FIXED
Product: gnome-chess
Classification: Applications
Component: General
git master
Other Linux
: Normal major
: ---
Assigned To: Jason Clinton
gnome-chess-maint
Depends on:
Blocks:
 
 
Reported: 2013-01-02 19:18 UTC by Michael Catanzaro
Modified: 2013-04-15 04:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (1.28 KB, patch)
2013-01-02 19:21 UTC, Michael Catanzaro
none Details | Review
allow gnome-chess to use gnuchess (1.28 KB, patch)
2013-02-21 17:48 UTC, Michael Catanzaro
none Details | Review
Patch: properly pass extra-args to gnuchess (or other external engines) (1.34 KB, patch)
2013-03-05 21:09 UTC, Hans de Goede
committed Details | Review

Description Michael Catanzaro 2013-01-02 19:18:35 UTC
We don't pass --xboard to the gnuchess process, which means it sends non-CECP messages to gnome-chess until we send it the 'xboard' command.  This means that its first messages will royally confuse gnome-chess, and the AI will never make its first move.  So gnome-chess is currently completely broken when using the gnuchess engine.

But if the AI somehow gets past that first move - say, by moving its piece for it, or by using the back and then forward buttons on the bottom of the screen, the game will continue to play fine.  (Pressing 'forward' when the last move in the game was played by you sends the 'go' CECP command, forcing the AI to send a different move.)

This argument is specified in engines.conf, so it used to work, but gnome-chess is now ignoring it.
Comment 1 Michael Catanzaro 2013-01-02 19:21:12 UTC
Created attachment 232557 [details] [review]
Proposed patch

Proposed patch
Comment 2 Michael Catanzaro 2013-01-30 04:20:49 UTC
It'd be great if this could be looked into, since gnome-chess is completely broken when using the gnuchess engine (tested with gnuchess v5.08) and my proposed patch is very short. Thanks :-)
Comment 3 Michael Catanzaro 2013-02-21 17:48:27 UTC
Created attachment 237074 [details] [review]
allow gnome-chess to use gnuchess

Fix a whitespace error in the patch
Comment 4 Michael Catanzaro 2013-02-21 17:55:58 UTC
Updated status to Blocker -- it's not reasonable to release gnome-chess again without gnuchess support. Tested on Fedora 17, Fedora 18 (gnuchess 5.08) and openSUSE 12.2 (gnuchess 6.0.1).

Also added a link to the downstream bug
Comment 5 Hans de Goede 2013-03-05 21:09:46 UTC
Created attachment 238163 [details] [review]
Patch: properly pass extra-args to gnuchess (or other external engines)

Thanks for the patch, I believe that vargs should still be NULL terminated after adding the args, so:
+        string[] argv = { binary, args };
In the patch should be:
+        string[] argv = { binary, args, null };

I'm attaching a new version with this fixed.

A note to the upstream gnome-games / glchess maintainers. I've added this patch to the Fedora packages of gnome-games as this bug is making glchess unusable in single player mode, please apply it upstream.
Comment 6 Michael Catanzaro 2013-03-05 23:34:43 UTC
Good catch Hans, thanks!
Comment 7 Michael Catanzaro 2013-04-02 15:53:53 UTC
Well I noticed today that GNOME Chess worked fine with GNU Chess in openSUSE 12.3.  So I did a bit more investigation, wrote a short report, and accidentally deleted it (apparently Google Drive's awesome autosave doesn't work unless you first save it manually). So here's the very short version of the report:

* GNOME Chess with GNU Chess was broken on openSUSE 12.2 due to a bug in GNU Chess 6.0.1, which is not our fault or concern.

* GNOME Chess with GNU Chess was broken on Fedora 18 due to this bug, as discussed above.

* You'll only hit this bug if you're using GNU Chess 5.08, as in Fedora 18.  Due to changes in GNU Chess's output, v5.07 (Ubuntu 12.04) and v6.0.2 (Ubuntu 12.10, openSUSE 12.3) aren't affected.

* We still need to integrate the patch, but I'm dropping the severity accordingly.
Comment 8 Jason Clinton 2013-04-15 03:53:45 UTC
Review of attachment 238163 [details] [review]:

LGTM