GNOME Bugzilla – Bug 639584
initial emission of GtkWidget:style-set is not happening
Last modified: 2011-04-07 05:20:02 UTC
Version : 2.33.2-2.fc15 See Also https://bugzilla.redhat.com/show_bug.cgi?id=669859 $ gdb gucharmap (gdb) r Starting program: /usr/bin/gucharmap [Thread debugging using libthread_db enabled] [New Thread 0x7fffeb65e700 (LWP 29490)] ** ERROR:gucharmap-chartable.c:851:get_font_size_px: assertion failed: (priv->font_desc != NULL) Program received signal SIGABRT, Aborted. 0x00007ffff403c1b5 in raise () from /lib64/libc.so.6 Missing separate debuginfos, use: debuginfo-install atk-1.32.0-2.fc15.x86_64 cairo-1.10.2-1.fc15.x86_64 cairo-gobject-1.10.2-1.fc15.x86_64 expat-2.0.1-10.fc13.x86_64 fontconfig-2.8.0-2.fc14.x86_64 freetype-2.4.4-1.fc15.x86_64 gdk-pixbuf2-2.23.0-1.fc15.x86_64 glibc-2.12.90-21.fc15.x86_64 gtk-theme-engine-clearlooks-2.91.5-1.fc15.x86_64 libX11-1.4.0-1.fc15.x86_64 libXau-1.0.6-1.fc14.x86_64 libXcomposite-0.4.3-1.fc15.x86_64 libXcursor-1.1.11-1.fc15.x86_64 libXdamage-1.1.3-1.fc14.x86_64 libXext-1.2.0-1.fc15.x86_64 libXfixes-4.0.5-1.fc14.x86_64 libXi-1.4.0-1.fc15.x86_64 libXinerama-1.1.1-1.fc15.x86_64 libXrandr-1.3.1-1.fc15.x86_64 libXrender-0.9.6-1.fc14.x86_64 libgcc-4.5.1-6.fc15.x86_64 libpng-1.2.44-1.fc14.x86_64 libselinux-2.0.98-1.fc15.x86_64 libxcb-1.7-1.fc15.x86_64 pango-1.28.3-1.fc15.x86_64 pixman-0.20.0-1.fc15.x86_64 zlib-1.2.5-2.fc14.x86_64 (gdb) bt
+ Trace 225535
Not reproducible here using gucharmap and gtk+ from master.
Christian, I'm experiencing it in jhbuild sandbox. Something similar happened to me some time ago with gnome-terminal, when a font related gsettings key was not setted up properly, but now gnome-terminal works fine :/ Here is my stacktrace: ERROR:gucharmap-chartable.c:851:get_font_size_px: assertion failed: (priv->font_desc != NULL) Program received signal SIGABRT, Aborted. 0x00007ffff430eba5 in raise () from /lib/libc.so.6 (gdb) (gdb) t a a bt
+ Trace 226081
Thread 1 (Thread 0x7ffff7fc2920 (LWP 8639))
not sure, but maybe gnome-terminal was fixed by this commit http://git.gnome.org/browse/gnome-terminal/commit/?id=e1ba3eea28f62c7b9b16a35b2d625aaf925f4802 And gucharmap should still use gcong
Works here. The g-t bug is totally unrelated; gucharmap isn't using that gconf key.
"/apps/gucharmap/font" is empty -> gucharmap crashs See Also : https://bugzilla.redhat.com/show_bug.cgi?id=669859#c6 gucharmap-2.33.2-5.fc15.x86_64 gtk3-3.0.1-1.fc15.x86_64 glib2-2.28.1-1.fc15.x86_64
This is a gtk bug. On gtk2, the style-set signal was emitted for the GucharmapChartable widget before the first size negotiation, but on gtk3, there is no emission of style-set (nor style-updated) before the first size negotiation happens.
Ok, Carlos committed b7f772eb93e8615ebf14f5bdde33bc59dd0b11bf trying to fix this and I'm sure it somehow magically solves this current issue, but (1) the patch is completely bogus What the commit message says is in no way related to what the patch does and the patch changes quite a few things. (2) I'm not sure style-updated should be emitted "initially". As opposed to GtkStyle, the widget's style context is always valid, so you can apply all the features immediately instead of having to wait for a valid style from realized(). That said, we should still make sure to emit STYLE_SET once upon realize to keep backwards compat with GTK2.
commit fafee4e27645f2b9f819444ad8ce6fe1f67182b8 Author: Benjamin Otte <otte@redhat.com> Date: Sat Mar 26 23:34:45 2011 +0100 widget: Emit initial style-set signal in the same situations as GTK2 This ensures that widgets that aren't ported and rely on the style-set signal being emitted work as well as before. They should not rely on style-set being emitted however. Note that this function is a no-op if the initial style has been set already and is very cheap if it has not been set yet. It only becomes relevant if the resulting style actually gets used.