Bug 268494

Summary: gtk3 applications crashes in GNOME when oxygen-gtk3 used
Product: [Plasma] Oxygen Reporter: nucleo <nucleo>
Component: gtk2-engineAssignee: Hugo Pereira Da Costa <hugo.pereira.da.costa>
Status: CLOSED FIXED    
Severity: crash CC: b7.10110111, hugo.pereira.da.costa, web
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description nucleo 2011-03-14 18:49:56 UTC
If I set GNOME3 theme to oxygen-gtk with
'gsettings set org.gnome.desktop.interface gtk-theme oxygen-gtk'

then theme applied fine for running applications.
But every new started gtk3 application crashes:

$ gdb gedit
[?1034hGNU gdb (GDB) Fedora (7.2.50.20110218-24.fc15)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/gedit...Reading symbols from /usr/lib/debug/usr/bin/gedit.debug...done.
done.
(gdb) r
Starting program: /usr/bin/gedit 
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
gdk_screen_get_system_visual (screen=0x0) at gdkscreen.c:808
808	  return GDK_SCREEN_GET_CLASS(screen)->get_system_visual (screen);
Missing separate debuginfos, use: debuginfo-install atk-1.33.6-2.fc15.i686 cairo-1.10.2-3.fc15.i686 cairo-gobject-1.10.2-3.fc15.i686 expat-2.0.1-11.fc15.i686 fontconfig-2.8.0-3.fc15.i686 freetype-2.4.4-4.fc15.i686 gdk-pixbuf2-2.23.1-1.fc15.i686 glibc-2.13.90-3.i686 gobject-introspection-0.10.3-1.fc15.i686 gtksourceview3-2.91.8-1.fc15.i686 libICE-1.0.6-3.fc15.i686 libSM-1.2.0-2.fc15.i686 libX11-1.4.1-2.fc15.i686 libXau-1.0.6-2.fc15.i686 libXcomposite-0.4.3-2.fc15.i686 libXcursor-1.1.11-3.fc15.i686 libXdamage-1.1.3-2.fc15.i686 libXext-1.2.0-2.fc15.i686 libXfixes-4.0.5-2.fc15.i686 libXi-1.4.1-2.fc15.i686 libXinerama-1.1.1-2.fc15.i686 libXrandr-1.3.1-2.fc15.i686 libXrender-0.9.6-2.fc15.i686 libffi-3.0.9-2.fc15.i686 libgcc-4.6.0-0.12.fc15.i686 libpeas-0.7.3-1.fc15.i686 libpng-1.2.44-3.fc15.i686 libselinux-2.0.98-2.fc15.i686 libstdc++-4.6.0-0.12.fc15.i686 libuuid-2.19-3.fc15.i686 libxcb-1.7-2.fc15.i686 libxml2-2.7.8-5.fc15.i686 pango-1.28.3-2.fc15.i686 pixman-0.20.2-2.fc15.i686 zlib-1.2.5-3.fc15.i686
(gdb) bt
#0  gdk_screen_get_system_visual (screen=0x0) at gdkscreen.c:808
#1  0x0059c8be in gtk_widget_get_visual (widget=0x8138038) at gtkwidget.c:10230
#2  0x005b4ff2 in gtk_window_realize (widget=0x8138038) at gtkwindow.c:4907
#3  0x00d20dd4 in g_cclosure_marshal_VOID__VOID (closure=0x812fed0, return_value=0x0, n_param_values=1, param_values=0x813b3a8, invocation_hint=0xbfffe220, 
    marshal_data=0x5b4e50) at gmarshal.c:79
#4  0x00d0389e in g_type_class_meta_marshal (closure=0x812fed0, return_value=0x0, n_param_values=1, param_values=0x813b3a8, invocation_hint=0xbfffe220, 
    marshal_data=0x64) at gclosure.c:878
#5  0x00d04ff5 in g_closure_invoke (closure=0x812fed0, return_value=0x0, n_param_values=1, param_values=0x813b3a8, invocation_hint=0xbfffe220) at gclosure.c:767
#6  0x00d16af5 in signal_emit_unlocked_R (node=0x8130000, detail=0, instance=0x8138038, emission_return=0x0, instance_and_params=0x813b3a8) at gsignal.c:3182
#7  0x00d20412 in g_signal_emit_valist (instance=0x8138038, signal_id=22, detail=0, var_args=0xbfffe3dc "") at gsignal.c:2983
#8  0x00d20594 in g_signal_emit (instance=0x8138038, signal_id=22, detail=0) at gsignal.c:3040
#9  0x005a9f08 in gtk_widget_realize (widget=0x8138038) at gtkwidget.c:4394
#10 0x012a8fac in Oxygen::StyleHelper::StyleHelper (this=0x812a024) at /usr/src/debug/oxygen-gtk3-1.0.50/src/oxygenstylehelper.cpp:47
#11 0x01283daa in Style (this=0x8129e40) at /usr/src/debug/oxygen-gtk3-1.0.50/src/oxygenstyle.h:348
#12 Oxygen::Style::instance () at /usr/src/debug/oxygen-gtk3-1.0.50/src/oxygenstyle.cpp:45
#13 0x012b3725 in Oxygen::ThemingEngine::instanceInit (self=0x8125530) at /usr/src/debug/oxygen-gtk3-1.0.50/src/oxygenthemingengine.cpp:2188
#14 0x00d29feb in g_type_create_instance (type=135424344) at gtype.c:1889
#15 0x00d073bc in g_object_constructor (type=135424344, n_construct_properties=1, construct_params=0x8129c10) at gobject.c:1615
#16 0x00d0a159 in g_object_newv (object_type=135424344, n_parameters=0, parameters=0x0) at gobject.c:1479
#17 0x00d0b3c0 in g_object_new (object_type=135424344, first_property_name=0x0) at gobject.c:1308
#18 0x012b30d3 in create_engine () at /usr/src/debug/oxygen-gtk3-1.0.50/src/oxygentheme.cpp:77
#19 0x00536feb in gtk_theming_engine_load (name=0x8125d80 "oxygen-gtk") at gtkthemingengine.c:1008
#20 0x003c7d2c in css_provider_parse_value (css_provider=0x811a590, value_str=0x8125d80 "oxygen-gtk", value=0x81254c8, error=0xbfffecfc) at gtkcssprovider.c:2892
#21 0x003c8dad in parse_rule (error=0xbfffecfc, scanner=0x81258b0, css_provider=0x811a590) at gtkcssprovider.c:3473
#22 parse_stylesheet (css_provider=0x811a590, error=0xbfffedcc) at gtkcssprovider.c:3533
#23 0x003c936a in gtk_css_provider_load_from_path_internal (css_provider=0x811a590, path=<optimized out>, reset=1, error=0xbfffedcc) at gtkcssprovider.c:3708
#24 0x003c9b8a in gtk_css_provider_get_named (name=0x8124240 "oxygen-gtk", variant=0x0) at gtkcssprovider.c:4224
#25 0x004c8dec in settings_update_theme (settings=0x80fe990) at gtksettings.c:2720
#26 0x004c8fd7 in settings_init_style (settings=0x80fe990) at gtksettings.c:1427
#27 gtk_settings_get_for_screen (screen=0x810e040) at gtksettings.c:1461
#28 0x004723c5 in display_opened_cb (display_manager=0x80f4030, display=0x810b800) at gtkmodules.c:494
#29 0x00d219cb in g_cclosure_marshal_VOID__OBJECT (closure=0x80fe6d0, return_value=0x0, n_param_values=2, param_values=0x80fe940, invocation_hint=0xbffff010, 
    marshal_data=0x0) at gmarshal.c:638
#30 0x00d04ff5 in g_closure_invoke (closure=0x80fe6d0, return_value=0x0, n_param_values=2, param_values=0x80fe940, invocation_hint=0xbffff010) at gclosure.c:767
#31 0x00d17380 in signal_emit_unlocked_R (node=0x80f7608, detail=0, instance=0x80f4030, emission_return=0x0, instance_and_params=0x80fe940) at gsignal.c:3252
#32 0x00d20412 in g_signal_emit_valist (instance=0x80f4030, signal_id=2, detail=0, var_args=0xbffff24c "\377?") at gsignal.c:2983
#33 0x00d20727 in g_signal_emit_by_name (instance=0x80f4030, detailed_signal=0x7a52fb "display-opened") at gsignal.c:3077
#34 0x00788d91 in _gdk_x11_display_open (display_name=0x0) at gdkdisplay-x11.c:1419
#35 0x00786a57 in gdk_x11_display_manager_open_display (manager=0x80f4030, name=0x0) at gdkdisplaymanager-x11.c:55
#36 0x00766e18 in gdk_display_manager_open_display (manager=0x80f4030, name=0x0) at gdkdisplaymanager.c:362
#37 0x00766185 in gdk_display_open (display_name=0x0) at gdkdisplay.c:1720
#38 0x0075e2fd in gdk_display_open_default_libgtk_only () at gdk.c:341
#39 0x004535c4 in post_parse_hook (context=0x80faba8, group=0x80fc4d8, data=0x80fc1f8, error=0xbffff5cc) at gtkmain.c:904
#40 0x00dadf88 in g_option_context_parse (context=0x80faba8, argc=0xbffff660, argv=0xbffff664, error=0xbffff5cc) at goption.c:1951
#41 0x08069597 in gedit_command_line_parse (command_line=0x80fac30, argc=0xbffff660, argv=0xbffff664) at gedit-command-line.c:342
#42 0x08066a8a in main (argc=1, argv=0xbffff6f4) at gedit.c:262
(gdb) q

In gtk3 apps works fine in KDE if I set gtk3 theme in /etc/gtk-3.0/settings.ini to oxygen-gtk.
Comment 1 Hugo Pereira Da Costa 2011-03-16 15:04:47 UTC
Git commit b1dd2dd223262ed13afdb487240ebf458f62ec66 by Hugo Pereira Da Costa.
Committed on 16/03/2011 at 14:57.
Pushed by hpereiradacosta into branch '1.0'.

Fall back to Cairo image surface if no valid screen is found when calling
Oxygen::StyleHelper::initializeRefSurface
CCBUG: 268494

M  +37   -6    src/oxygenstylehelper.cpp     

http://commits.kde.org/oxygen-gtk/b1dd2dd223262ed13afdb487240ebf458f62ec66
Comment 2 Hugo Pereira Da Costa 2011-03-16 15:05:46 UTC
This should fix it, but please confirm, and close the bug if yes.
Comment 3 nucleo 2011-03-16 19:17:04 UTC
(In reply to comment #2)
> This should fix it, but please confirm, and close the bug if yes.

fixed