Bug 440686

Summary: Cannot start glchess
Product: [Fedora] Fedora Reporter: Ralf Kleineisel <ralf>
Component: gnome-gamesAssignee: Ray Strode [halfline] <rstrode>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: hdegoede
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-04-21 06:47:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ralf Kleineisel 2008-04-04 14:19:03 UTC
Description of problem:
glchess chrashes upon startup

Version-Release number of selected component (if applicable):
GNOME glchess 2.22.0
gnome-games-2.22.0-1.fc9.i386

How reproducible:
Every time.

Steps to Reproduce:
1. type "glchess" in a shell
2.
3.
  
Actual results:
$glchess
Loading configuration from /home/unrz96/.gnome2/glchess/config.xml
Traceback (most recent call last):
  File "/usr/bin/glchess", line 61, in <module>
    start_game()
  File "/usr/lib/python2.5/site-packages/glchess/glchess.py", line 21, in start_game
    app = main.Application()
  File "/usr/lib/python2.5/site-packages/glchess/main.py", line 427, in __init__
    self.ui = UI(self)
  File "/usr/lib/python2.5/site-packages/glchess/main.py", line 322, in __init__
    self.networkDialog = dialog.controller =
self.controller.addNetworkDialog(dialog)
  File "/usr/lib/python2.5/site-packages/glchess/gtkui/gtkui.py", line 435, in
addNetworkDialog
    dialog = network.GtkNetworkGameDialog(self, feedback, self.__playerModel)
  File "/usr/lib/python2.5/site-packages/glchess/gtkui/network.py", line 114, in
__init__
    self.__loadThrobber()
  File "/usr/lib/python2.5/site-packages/glchess/gtkui/network.py", line 344, in
__loadThrobber
    icon = theme.load_icon('process-idle', size, 0)
gobject.GError: Icon 'process-idle' not present in theme

Expected results:


Additional info:

Comment 1 Hans de Goede 2008-04-14 15:00:36 UTC
I've just tried this and it seems to work fine, are there any special settings
you are using, like a non default gtk-theme, maybe you are playing a network
game instead of a local game, or ...?

Perhaps you can also try reproducing this after running a yum update to update
everything to the latest version in rawhide.


Comment 2 Ralf Kleineisel 2008-04-15 11:33:14 UTC
I'm running KDE. I don't know which package contains the "process-idle" icon,
but the dependencies should tell.

Comment 3 Hans de Goede 2008-04-15 12:07:22 UTC
(In reply to comment #2)
> I'm running KDE. I don't know which package contains the "process-idle" icon,
> but the dependencies should tell.

Ah yes that might explain, there only is a process-idle icon in the gnome and
oxygen themes, what icon theme are you using?


Comment 4 Ralf Kleineisel 2008-04-15 13:00:01 UTC
I'm using "Crystal SVG" icon theme (crystalsvg-icon-theme-4.0.3-3.fc9.i386).

Comment 5 Hans de Goede 2008-04-15 19:37:31 UTC
Can you try copying /usr/share/icons/gnome/32x32/animations/process-idle.png to
/usr/share/icons/hicolor/32x32/animations/

That should probably fix this.

Ray, would including a copy of the gnome
/usr/share/icons/gnome/32x32/animations/process-idle.png in
/usr/share/icons/hicolor/32x32/animations/ in gnome-games be an acceptable fix
for this?


Comment 6 Ralf Kleineisel 2008-04-16 07:05:55 UTC
I tried this but it didn't help.

I tested using several other icon themes (Bluecurve, Oxygen, GNOME) but all show
the same problem.

I tried to copy it to /usr/share/icons/crystalsvg/32x32/apps/ (there is no
folder "animations" there), but it didn't help either.

Do I have to register the icon somewhere? I simply changed the theme in "System
Settings" and clicked "Apply".

Comment 7 Hans de Goede 2008-04-16 07:14:31 UTC
Hmm,

The copying not working is my bad, you need to do the following for a gnome/gtk
app to pick that up (as root):
cp /usr/share/icons/gnome/32x32/animations/process-idle.png \
   /usr/share/icons/hicolor/32x32/animations/
touch /usr/share/icons/hicolor
gtk-update-icon-cache /usr/share/icons/hicolor

But changing the theme to gnome should have worked, anyways can you try the
above please?


Comment 8 Ralf Kleineisel 2008-04-16 07:22:13 UTC
I did that and it didn't find the icon "process-working". Did the same for that
and now it works.

Comment 9 Hans de Goede 2008-04-16 08:24:42 UTC
(In reply to comment #8)
> I did that and it didn't find the icon "process-working". Did the same for that
> and now it works.

Thanks!

Ray would doing this in the gnome-games package be an acceptable fix (for now)?

Ralf could you be so kind as to report this upstream (including the now known
workaround):
http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-games


Comment 10 Ray Strode [halfline] 2008-04-16 14:10:17 UTC
It's not really a fix, but a workaround.

The right fix is probably some combination of 1) using an icon name that's
standardized by the icon naming spec 2) fixing the game to not crash when it
can't find an icon, but instead falling back to an ugly icon.

I don't really mind the proposed workaround. My only concerns are that it may

a) conflict with hicolor if those names ever gets standardized
b) this is the type of change that tends to get made downstream and forgotten about.

a is easy to fix if it happens, but I'd like to avoid b if possible.  I wonder
if there are standard icons that would be suitable...

Comment 11 Hans de Goede 2008-04-16 16:37:29 UTC
Quoting from:
http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html#names

Table 3. Standard Animation Icons
Name	Description
process-working	This is the standard spinner animation for web browsers and file
managers to show that the location is loading. This image should be a
multi-frame PNG with the frames as the size that the directory containing the
image, is specified to be in. The first frame of the animation should be used
for the resting state of the animation.

So the process-working icon missing is a bug of the "Crystal SVG" icon theme,
the looking for a process-idle icon is a bug in glchess, it should use the first
frame of the process-working icon. But if thats hard to achieve in gtk, I guess
that the standard should be fixed to have an process-idle icon added, which
contains only the first frame of the process-working icon.


Comment 12 Ray Strode [halfline] 2008-04-16 18:05:02 UTC
So it looks like glchess already tries to cover the icon-not-there case, but
expects load_icon to return None instead of throwing an exception.

We should fix that and then move this bug (or a clone of it) to the crystal-svg
icon theme.

Comment 13 Ray Strode [halfline] 2008-04-16 18:39:09 UTC
So I've commited a patch that I think should fix it.

It should be showing up in gnome-games-2.22.1.1-2.fc9 which is building here:

http://koji.fedoraproject.org/koji/taskinfo?taskID=569132

Would you guys mind trying it?  If it works, i'll push it upstream and request
rel-eng to tag the package.

Comment 14 Ralf Kleineisel 2008-04-17 07:51:54 UTC
After upgrading to gnome-games-2.22.1.1-2.fc9 I get this error:

Traceback (most recent call last):
  File "/usr/bin/glchess", line 61, in <module>
    start_game()
  File "/usr/lib/python2.5/site-packages/glchess/glchess.py", line 21, in start_game
    app = main.Application()
  File "/usr/lib/python2.5/site-packages/glchess/main.py", line 427, in __init__
    self.ui = UI(self)
  File "/usr/lib/python2.5/site-packages/glchess/main.py", line 322, in __init__
    self.networkDialog = dialog.controller =
self.controller.addNetworkDialog(dialog)
  File "/usr/lib/python2.5/site-packages/glchess/gtkui/gtkui.py", line 435, in
addNetworkDialog
    dialog = network.GtkNetworkGameDialog(self, feedback, self.__playerModel)
  File "/usr/lib/python2.5/site-packages/glchess/gtkui/network.py", line 114, in
__init__
    self.__loadThrobber()
  File "/usr/lib/python2.5/site-packages/glchess/gtkui/network.py", line 369, in
__loadThrobber
    self._throbberframes.append(theme.load_icon('image-missing', size, 0))
AttributeError: GtkNetworkGameDialog instance has no attribute '_throbberframes'

Comment 15 Ray Strode [halfline] 2008-04-17 14:04:11 UTC
woops, sorry about that.  the "F" in frames is supposed to be capitalized.

Comment 16 Ray Strode [halfline] 2008-04-17 14:06:07 UTC
This is getting built now:

http://koji.fedoraproject.org/koji/taskinfo?taskID=570613

Comment 17 Ralf Kleineisel 2008-04-18 07:06:48 UTC
After upgrading to gnome-games-2.22.1.1-3.fc9.i386.rpm I get this:

Traceback (most recent call last):
  File "/usr/bin/glchess", line 61, in <module>
    start_game()
  File "/usr/lib/python2.5/site-packages/glchess/glchess.py", line 21, in start_game
    app = main.Application()
  File "/usr/lib/python2.5/site-packages/glchess/main.py", line 427, in __init__
    self.ui = UI(self)
  File "/usr/lib/python2.5/site-packages/glchess/main.py", line 322, in __init__
    self.networkDialog = dialog.controller =
self.controller.addNetworkDialog(dialog)
  File "/usr/lib/python2.5/site-packages/glchess/gtkui/gtkui.py", line 435, in
addNetworkDialog
    dialog = network.GtkNetworkGameDialog(self, feedback, self.__playerModel)
  File "/usr/lib/python2.5/site-packages/glchess/gtkui/network.py", line 114, in
__init__
    self.__loadThrobber()
  File "/usr/lib/python2.5/site-packages/glchess/gtkui/network.py", line 369, in
__loadThrobber
    self._throbberFrames.append(theme.load_icon('image-missing', size, 0))
gobject.GError: Icon 'image-missing' not present in theme

Comment 18 Hans de Goede 2008-04-18 07:17:35 UTC
(In reply to comment #17)
> After upgrading to gnome-games-2.22.1.1-3.fc9.i386.rpm I get this:

<snip>
 
> gobject.GError: Icon 'image-missing' not present in theme

Erm, your icon theme is _really_ broken if image-missing which is part of the
standard icons any theme should contain, is missing too, see:
http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html

Also its kind of hard to fix the code to recover from missing images if even the
icon for image-missing is missing from the theme, so there is nothing to
fallback too.

Ray, maybe we should add image-missing to the standard hicolor-icon-theme ?

Ralf, can you try this and then try the latest glchess rpm again? :
cp /usr/share/icons/gnome/32x32/status/image-missing.png \
   /usr/share/icons/hicolor/32x32/status/
touch /usr/share/icons/hicolor
gtk-update-icon-cache /usr/share/icons/hicolor


Comment 19 Ralf Kleineisel 2008-04-18 07:43:04 UTC
Yes, this fixes the problem.

I will file a bug for crystalsvg-icon-theme.

Comment 20 Ray Strode [halfline] 2008-04-18 14:00:34 UTC
we should just use gtk-missing-image instead since it's compiled into gtk if not
found in the icon theme i guess.

Comment 21 Ray Strode [halfline] 2008-04-18 14:04:39 UTC
Hi Ralf,

I've got one more package for you to try if you don't mind removing your cp
workaround and testing.

http://koji.fedoraproject.org/koji/taskinfo?taskID=572212

Comment 22 Ralf Kleineisel 2008-04-21 06:47:16 UTC
gnome-games-2.22.1.1-4.fc9.i386.rpm solves the problem for me.

Comment 23 Hans de Goede 2008-04-21 07:13:59 UTC
Have you filed a bug for crystalsvg-icon-theme about the missing process-working
and image-missing (actually probably image-foo) icons?

You may want to advice them to also add a process-idle icon whihc is just the
first frame of process-working as some apps seem te rely on that being present
too, but having a process-idle is not required by the icon naming spec.