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 637531 - Crash in MetaTilePreview (due to GtkStyle / GtkStyleContext)
Crash in MetaTilePreview (due to GtkStyle / GtkStyleContext)
Status: RESOLVED WONTFIX
Product: mutter
Classification: Core
Component: general
unspecified
Other Linux
: Normal critical
: ---
Assigned To: mutter-maint
mutter-maint
Depends on: 637520
Blocks:
 
 
Reported: 2010-12-18 20:37 UTC by Giovanni Campagna
Modified: 2011-01-06 00:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Connect to style-updated not style-set (1.62 KB, patch)
2010-12-20 18:47 UTC, Owen Taylor
none Details | Review

Description Giovanni Campagna 2010-12-18 20:37:39 UTC
In src/ui/tile-preview.c, on_preview_window_style_set uses GtkRC to retrieve styling. Since GtkRC is now mostly useless, it fallbacks to creating an empty GtkStyle, but does not pass a "context" property to it, meaning that the following gtk_style_get segfaults.

(I can attach a backtrace if needed, but I think the cause is that)
Comment 1 Florian Müllner 2010-12-18 20:46:56 UTC
Yes. I have patches to port mutter to GtkStyleContext, but was planning on holding them back until GtkIconView is ported as well (I expect needing more changes then).

I don't think it is acceptable to crash when deprecated API is used, so this is ultimately a GTK+ issue (see bug 637520)
Comment 2 Emmanuele Bassi (:ebassi) 2010-12-20 16:21:02 UTC

*** This bug has been marked as a duplicate of bug 637520 ***
Comment 3 Owen Taylor 2010-12-20 18:45:51 UTC
Some semi-mutter specific issues as well as things we can fix in GTK+ (mutter is counting on style-set being reliably emitted and it is never emitted any more.)
Comment 4 Owen Taylor 2010-12-20 18:47:11 UTC
Created attachment 176776 [details] [review]
Connect to style-updated not style-set

::style-set is no longer emitted in GTK+ 3.0; connect to ::style-updated
again. Since ::style-updated is emitted only on change, we need to
always call the callback once at the beginning.
Comment 5 Owen Taylor 2010-12-20 18:48:19 UTC
Patch should be sufficient to fix the crash, though with a warning. Will attach a patch that fixes up gtk_rc_get_style_by_paths() to the other bug.
Comment 6 Carlos Garnacho 2010-12-21 00:44:53 UTC
FIY, I've pushed a fix to have ::style-set emitted frequently again
Comment 7 Owen Taylor 2011-01-06 00:11:20 UTC
Doesn't seem to have too much point with the GTK+ changes