rajrakeshdr / pychess

Automatically exported from code.google.com/p/pychess
GNU General Public License v3.0
0 stars 0 forks source link

2. game always killed, if using any analizer #276

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Play a human vs. computer game against any engine using any analizer (or
inverted analizer).
Close it.
Start a second game.
The black engine will die with "Hang up" error after white first move.

Original issue reported on code.google.com by gbtami on 22 Dec 2007 at 9:29

GoogleCodeExporter commented 9 years ago
Sorry. I cannot reproduce this one. Played one game with gnu/gnu analyzers 
against
fics. I aborted the game before moving and next game worked fine.
I also played a match against gnuchess (which I finished) and afterwards 
everything
worked fine.

Could you reproduce this also after, e.g. a reboot?

Original comment by pych...@gmail.com on 23 Dec 2007 at 12:47

GoogleCodeExporter commented 9 years ago
Yes.

Original comment by gbtami on 23 Dec 2007 at 1:14

Attachments:

GoogleCodeExporter commented 9 years ago
Another log, playing against glaurung, analizers are glaurung too,
the second game starts with a KeyError: 'Ponder'

Original comment by gbtami on 23 Dec 2007 at 4:14

Attachments:

GoogleCodeExporter commented 9 years ago
Hm, the KeyError might have to do with the early arrupt, that might have 
corrupted
your engines.xml file.

I really don't understand how an error like this one can suddently appear.
And this is for all Philidor releases? And for all engines?

Original comment by lobais on 23 Dec 2007 at 11:37

GoogleCodeExporter commented 9 years ago
Hmm. I boot-ed to my older UHU-Linux 2.0, and there is _no_ error here!
The package versions on this distrib are:
ii  kernel         2.6.17.6-18.1  Linux kernel
ii  gtk2           2.10.14-0.3    GTK+ (Gimp Tool Kit) grafikus függvénytár
ii  cairo           1.4.10-1.1      Kétdimenziós grafikus függvénytár
ii  pygtk          2.10.4-2.1     GTK kiegészítés a Python programnyelvhez
ii  pycairo         1.4.0-1.2       Cairo kiegészítés a Python 
programnyelvhez

On Ubuntu Gutsy and UHU 2.1 there is newer kernel (2.6.22/2.6.23) and both has 
newer
gtk2 etc.(2.12 series). Seems this can be the root of this issue.

Original comment by gbtami on 26 Dec 2007 at 8:25

GoogleCodeExporter commented 9 years ago
Just forgot another one. On UHU 2.0 there is Python 2.4.4, and on Gutsy and UHU 
2.1
there is 2.5.1

Original comment by gbtami on 26 Dec 2007 at 8:28

GoogleCodeExporter commented 9 years ago
Seems this is a Python related bug.
On Ubuntu Gutsy i'v installed python 2.4.4 next to the default 2.5.1, so all 
other
software are identical.
Starting pychess with /usr/bin/python2.4 there is no bug, starting with 2.5 
there is.

Original comment by gbtami on 27 Dec 2007 at 1:15

GoogleCodeExporter commented 9 years ago
Cleaning up self.errors in subprocess.py SubProcessesPool class fixes the issue.
Anyhow, i can't understand how/why Python 2.4 gives different fd values for 
second
game, and 2.5 gives the same ones. What do you think?

    def addDescriptor (self, fd, defname, warnwords):
        self.buffers[fd] = ""
        self.names[fd] = defname
        if fd in self.error:
            del self.error[fd]
        self.warnwords[fd] = warnwords
        self.newDataCondition[fd] = Condition()
        self.poll.register(fd, POLLIN | POLLPRI | POLLERR | POLLHUP | POLLNVAL)

Original comment by gbtami on 28 Dec 2007 at 8:38

GoogleCodeExporter commented 9 years ago
Nice one! Have you commited it yet?

I don't know why it reuses the fd's, probably for performance improvements.

Original comment by lobais on 28 Dec 2007 at 9:32

GoogleCodeExporter commented 9 years ago
Fixed in svn rev 806

Original comment by gbtami on 29 Dec 2007 at 8:45