GNOME Bugzilla – Bug 637531
Crash in MetaTilePreview (due to GtkStyle / GtkStyleContext)
Last modified: 2011-01-06 00:11:20 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)
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)
*** This bug has been marked as a duplicate of bug 637520 ***
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.)
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.
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.
FIY, I've pushed a fix to have ::style-set emitted frequently again
Doesn't seem to have too much point with the GTK+ changes