GNOME Bugzilla – Bug 691186
Gtk+ 3.6.3 crashes when opening printing dialog: segfault in pango_font_description_hash()
Last modified: 2013-01-07 00:05:33 UTC
(As reported downstream at https://bugs.gentoo.org/show_bug.cgi?id=450370) With gtk+-3.6.3, opening the printing dialog in gedit or evince causes a segfault in the program in pango_font_description_hash(); in addition, sometimes all of gnome-shell crashes at the same time too. This is a regression compared to gtk+-3.6.2 As far as I can tell, this failure was introduced by commit c3508c9fa3854a158c16da4b50e4cbcc321333b9 ("stylecontext: Always recompute font"). Reverting c3508c9fa3854a158c16da4b50e4cbcc321333b9 fixes the crashes for me.
Backtrace from gtk+-3.6.3 + gedit-3.6.2 when opening the printing dialog: Program received signal SIGSEGV, Segmentation fault. pango_font_description_hash (desc=0xdbd900) at fonts.c:786 786 hash = case_insensitive_hash (desc->family_name);
+ Trace 231338
Thread 1 (Thread 0x7fffef198940 (LWP 12662))
Transmission crashes as well: https://bugzilla.redhat.com/show_bug.cgi?id=892359
And evolution-3.6.2 is affected too (crashes when opening a contact): https://bugs.gentoo.org/show_bug.cgi?id=450476
Created attachment 232886 [details] [review] stylecontext: Make font hack not crash It's a lot uglier now, but it shouldn't crash anymore. We must update the font description for animations, but we can't free it on query, because some paths call gtk_style_context_get_font() twice in a row without stopping the use of the first call. So us just creating a new font description all the time and unreffing the old one is not a good idea. So we just mere the new one into the old one.