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 696814 - Crashes launching a Java application
Crashes launching a Java application
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
3.8.x
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2013-03-28 21:27 UTC by Bastien Nocera
Modified: 2013-03-29 13:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ui: Fix crash getting default font (1.41 KB, patch)
2013-03-29 08:12 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2013-03-28 21:27:15 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.

Thread 1 (Thread 0x7f5bbea02a00 (LWP 17886))

  • #0 gtk_style_context_get_valist
    at gtkstylecontext.c line 1443
  • #1 gtk_style_context_get
    at gtkstylecontext.c line 1478
  • #2 meta_ui_theme_get_frame_borders
  • #3 event_callback
    at core/display.c line 4638
  • #4 filter_func
    at ui/ui.c line 254
  • #5 gdk_event_apply_filters
    at gdkeventsource.c line 81
  • #6 gdk_event_source_translate_event
    at gdkeventsource.c line 195
  • #7 _gdk_x11_display_queue_events
    at gdkeventsource.c line 338
  • #8 gdk_display_get_event
    at gdkdisplay.c line 313
  • #9 gdk_event_source_dispatch
    at gdkeventsource.c line 360
  • #10 g_main_dispatch
    at gmain.c line 3054
  • #11 g_main_context_dispatch
    at gmain.c line 3630
  • #12 g_main_context_iterate
    at gmain.c line 3701
  • #13 g_main_loop_run
    at gmain.c line 3895
  • #14 meta_run
    at core/main.c line 556
  • #15 main

Comment 1 drago01 2013-03-28 22:51:11 UTC
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 ...
Comment 2 Benjamin Otte (Company) 2013-03-29 00:11:41 UTC
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)
Comment 3 Bastien Nocera 2013-03-29 08:12:08 UTC
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.
Comment 4 Bastien Nocera 2013-03-29 08:14:34 UTC
This fixes it for me.
Comment 5 Florian Müllner 2013-03-29 08:22:23 UTC
Review of attachment 240104 [details] [review]:

LGTM
Comment 6 Bastien Nocera 2013-03-29 13:11:05 UTC
Attachment 240104 [details] pushed as f1620ab - ui: Fix crash getting default font