importsfromgooglecode / pychess

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

engines.xml engine not in engineNest.backup doesn't get re-added when its md5sum changes #616

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. add a custom engine to engines.xml that doesn't have an entry in the 
engineNest.backup XML string, run pychess, and exit pychess
2. install a different version of said engine that has a different md5sum for 
the installed binary
3. start pychess

What is the expected output? What do you see instead?
"00:04:56 Default Warning: Engine 'Ildtiadar' is no longer suported"
 (and the engine is not available despite being located at the given path)

A proposed patch which fixes this is attached.

Original issue reported on code.google.com by mattgatto on 20 Nov 2010 at 5:59

Attachments:

GoogleCodeExporter commented 9 years ago
I just tried this patch.

It avoids that not suported error and lists the engine again, but when I want 
to pick it, this happens:

bash-4.1$ PYTHONPATH=lib/ ./pychess
/home/jonas/.themes/Dust/gtk-2.0/gtkrc:84: Murrine configuration option 
"gradients" is no longer supported and will be ignored.
** Message: pygobject_register_sinkfunc is deprecated (GstObject)
/home/jonas/d/pychess/lib/pychess/System/uistuff.py:444: GtkWarning: 
GtkSpinButton: setting an adjustment with non-zero page size is deprecated
  self.glade = gtk.glade.XML(addDataPrefix("glade/%s" % filename))
Exception in thread Thread-5:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 530, in __bootstrap_inner
    self.run()
  File "/home/jonas/d/pychess/lib/pychess/System/GtkWorker.py", line 171, in run
    self.result = self.func(self)
  File "/home/jonas/d/pychess/lib/pychess/widgets/ionest.py", line 39, in <lambda>
    workfunc(w, gamemodel, player0tup, player1tup, loaddata))
  File "/home/jonas/d/pychess/lib/pychess/widgets/ionest.py", line 83, in workfunc
    if engine is None: engine = anaengines[0]
IndexError: list index out of range

Original comment by jonas.thiem@gmail.com on 31 Dec 2010 at 9:49

GoogleCodeExporter commented 9 years ago
I removed ~/.config/pychess/engines.xml completely, then I readded the line: 
<engine binname="Ildtiadar" protocol="cecp" protover="2" />

Then I restarted pychess (with above patch applied) and everything worked again 
(for whatever reason).

Now I recompiled my engine again, changing some little things, and while 
pychess starts and lists it, the list is well... see for yourself:
http://eloxoph.com/archive/brokenlist.png

Terminal output:
bash-4.1$ PYTHONPATH=lib/ ./pychess
/home/jonas/.themes/Dust/gtk-2.0/gtkrc:84: Murrine configuration option 
"gradients" is no longer supported and will be ignored.
** Message: pygobject_register_sinkfunc is deprecated (GstObject)
/home/jonas/d/pychess/lib/pychess/System/uistuff.py:444: GtkWarning: 
GtkSpinButton: setting an adjustment with non-zero page size is deprecated
  self.glade = gtk.glade.XML(addDataPrefix("glade/%s" % filename))
10:55:35 Default Warning: Engine 'Ildtiadar' has not been tested and verified 
to work with PyChess

/home/jonas/d/pychess/lib/pychess/Players/engineNest.py:352: FutureWarning: The 
behavior of this method will change in future versions.  Use specific 
'len(elem)' or 'elem is not None' test instead.
  if not engine2:
10:55:35 Default Warning: Engine Ildtiadar failed discovery: 
10:55:35 ('Ildtiadar', '10:12:35.476') Warning: Chan closed for 'nopost'
10:55:35 ('Ildtiadar', '10:12:35.476') Warning: Chan closed for '\n'

Original comment by jonas.thiem@gmail.com on 31 Dec 2010 at 9:59

GoogleCodeExporter commented 9 years ago
I am unable to find stable conditions for the messed-up list bug to appear:

http://eloxoph.com/archive/brokenlist.png

And also I think I have already seen this before I applied the 
pychess-enginenest.aptch.

Therefore I believe the pychess-enginenest.patch fixes this issue (since it 
works now for me in most cases, I haven't seen the messed up list for quite a 
while and I guess it might be related to some broken state of my engines.xml), 
but another bug that causes the list breakage remains (but probably unrelated 
to that patch).

Original comment by jonas.thiem@gmail.com on 3 Jan 2011 at 8:27

GoogleCodeExporter commented 9 years ago
Yeah I've noticed the behavior exhibited in the brokenlist.png before (I think 
I even tried - unsuccessfully - to debug it too) and it's not related to the 
patch. I will apply this and the patch from issue 610 if there's no release 
related objections.

Original comment by mattgatto on 27 Feb 2011 at 11:05

GoogleCodeExporter commented 9 years ago
Fixed in revision 10808b826e.

Original comment by mattgatto on 3 Mar 2011 at 10:00