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 516413 - Theme thumbnailer causes UI to stop drawing when encountering an error
Theme thumbnailer causes UI to stop drawing when encountering an error
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: [obsolete] Appearance
2.20.x
Other All
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-02-14 10:49 UTC by Chris Lord
Modified: 2008-02-25 17:45 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
Patch to fix error-handling (423 bytes, patch)
2008-02-14 10:51 UTC, Chris Lord
reviewed Details | Review

Description Chris Lord 2008-02-14 10:49:00 UTC
Please describe the problem:
If the thumbnailer encounters an error while thumbnailing a GTK theme, it spins and uses 100% CPU, which blocks the screen update idle handler.

Steps to reproduce:
1. Install a dodgy GTK theme (have a look around gnome-look for these, or inject your own error :))
2. Open up the appearance applet
3. Watch it stop drawing once the thumbnailer reaches the dodgy theme


Actual results:
The appearance applet still responds, but uses 100% CPU and stops refreshing the screen

Expected results:
I'd expect it to skip over the dodgy theme (maybe disallow selecting of it)

Does this happen every time?
Yes, if you have a dodgy theme installed

Other information:
Will attach patch that (possibly) fixes the issue
Comment 1 Chris Lord 2008-02-14 10:51:10 UTC
Created attachment 105219 [details] [review]
Patch to fix error-handling

This patch *may* fix the issue, but needs confirmation.
Comment 2 Jens Granseuer 2008-02-14 17:40:09 UTC
Confirmation would be much easier to come by if you didn't just point in the general direction of gnome-look for a dodgy theme that show this problem...
Comment 3 Chris Lord 2008-02-14 17:55:10 UTC
Open up the code for clearlooks, find a commonly used function and add a g_assert (TRUE), perhaps? I'll try this myself when I get some time to do so, Mr. Granseuer.
Comment 4 Jens Granseuer 2008-02-14 18:14:35 UTC
Fine then, Mr Lord.
Comment 5 Thomas Wood 2008-02-24 23:41:46 UTC
I think the issue is not in the child (the thumbnailer), but in the parent (the capplet). When the child crashes unexpectedly, message_from_child() will be called with condition set to G_IO_HUP (as this is requested in the g_io_add_watch). However, the message_from_child() does not check for G_IO_HUP, and immediately tries to read from the child. This issue can be fixed by adding a simple check at the beginning of message_from_child() that returns FALSE if condition is set to G_IO_HUP.

Unless anyone has any further thoughts, I will commit this tomorrow.
Comment 6 Thomas Wood 2008-02-25 17:45:23 UTC
I've commited the change that fixes this bug, although I am not sure what state the capplet is left in after the thumbnailer crashes. However, at least the capplet remains usable.