GNOME Bugzilla – Bug 696814
Crashes launching a Java application
Last modified: 2013-03-29 13:11:10 UTC
gnome-shell-3.8.0-1.fc19.x86_64 mutter-3.8.0-1.fc19.x86_64 gtk3-3.8.0-1.fc19.x86_64 Everytime I launched JDownloader (I don't know precisely which version, as it updates itself, it's apparently not reproduceable with newer version), gnome-shell crashes and will crash until java is killed. It crashes in gtk3 trying to parse the arguments for gtk_style_context_get() when meta_prefs_get_titlebar_font() returns NULL (which means "use the system font"). 742 context = gtk_widget_get_pango_context (GTK_WIDGET (ui->frames));• 743 font_desc = meta_prefs_get_titlebar_font ();• 744 • 745 if (!font_desc)• 746 {• 747 style = gtk_style_context_new ();• 748 gtk_style_context_get (style, GTK_STATE_FLAG_NORMAL, "font", &free_font_desc, NULL);• 749 font_desc = (const PangoFontDescription *) free_font_desc;• 750 }• Core was generated by `/usr/bin/gnome-shell'. Program terminated with signal 11, Segmentation fault.
+ Trace 231694
Thread 1 (Thread 0x7f5bbea02a00 (LWP 17886))
Isn't that a gtk bug then? If NULL is supposed to be a valid value and gtk crashes anyway something is wrong at the gtk side ...
I think this is because GTK has forever required that you gtk_style_context_set_screen() and gtk_style_context_set_widget_path() before calling any functions on it. I mean, what font should it look up?! (Yes I know, the default font, but we never did that. Patches accepted etc)
Created attachment 240104 [details] [review] ui: Fix crash getting default font A correctly constructed GtkStyleContext must have its screen and widget paths set. Getting the frame font caused crashes on some systems because those were not correctly initialised.
This fixes it for me.
Review of attachment 240104 [details] [review]: LGTM
Attachment 240104 [details] pushed as f1620ab - ui: Fix crash getting default font