Hi all,
I'm developing an application to play chess and I'm trying to integrate its GUI with Crafty 23.0. It is written in Java, and communication with the engine is handled through standard input/output pipes using the Winboard 2 protocol.
On Linux everything seems to be working fine so far. However, on Windows Crafty complains about some illegal moves which in fact are valid legal moves. Some examples are (Crafty is playing black):
1. e4 d5 2. exd5 (illegal move exd5?)
1. e4 c6 2. d4 d5 3. exd5 (illegal move exd5?)
1. e4 e5 2. Nf3 d6 3. d4 Nf6 4. dxe5 Nxe4 5. exd6 (illegal move exd6?)
These problems do not occur when I'm running Crafty's executable directly from the command line (cmd.exe), only when it's accessed as a subprocess of my Java application.
I managed to compile Crafty's source code on Windows using Eclipse/CDT and MinGW's GCC compiler with debug flags on, but when I try to attach to the Crafty subprocess gdb crashes and I get a Windows dialog message saying that crafty.exe has performed an illegal operation and needs to be shut down.
Other things I've tried without success:
- Explicitly setting the communication stream encoding to ASCII, UTF-8 or ISO 8859-1.
- Sending the move as e4xd5, e4d5 or Pxd5.
- Turning off Winboard protocol's san feature: Crafty complains with an error message.
Any idea or suggestion is welcome!
Cheers,
Alex