Qball's Weblog
GtkMozembed gone bonkers
Since my upgrade to dapper, my C programs that use gtkmozembed, and my python programs don’t work anymore.
If I run the program in gdb, I see that it goes wrong in the function gtk_moz_embed_new().
Today, after I found out that a simple C program that only embeds the view in a windows doesn’t crash, I noticed the following funny thing:
(arker, from newton confirmed this)
The program (both my c plugins for gmpc, as the python programs) doesn’t crash directly as you call gtk_moz_embed_new (what you expect from the gdb backtrace), but crashes only if you add it the gtkmozembed widget (or the container(s) it’s in) to a visible window.
The odd part is, why does gdb report it crashing in gtk_moz_embed_new? I don’t call that function, so does the widget self tries to recreate a new version of itself?
In my simple C program I cannot reproduce this error, but very little happens between the moment I create the widget, and it’ added to the visible window.
I’ve tried running the program through valgrind and let it crash,
There i see this:
<br />
==27626== Invalid read of size 4<br />
==27626== at 0x5275FE1: (within /usr/lib/firefox/libgtkembedmoz.so)<br />
==27626== by 0x52739E8: (within /usr/lib/firefox/libgtkembedmoz.so)<br />
==27626== by 0x4700422: g_cclosure_marshal_VOID__VOID (in /usr/lib/libgobject-2.0.so.0.1000.1)<br />
==27626== by 0x46F416E: (within /usr/lib/libgobject-2.0.so.0.1000.1)<br />
==27626== by 0x46F479E: g_closure_invoke (in /usr/lib/libgobject-2.0.so.0.1000.1)<br />
==27626== by 0x47035CB: (within /usr/lib/libgobject-2.0.so.0.1000.1)<br />
==27626== by 0x4704B18: g_signal_emit_valist (in /usr/lib/libgobject-2.0.so.0.1000.1)<br />
==27626== by 0x4704E88: g_signal_emit (in /usr/lib/libgobject-2.0.so.0.1000.1)<br />
==27626== by 0x424FD20: gtk_widget_realize (in /usr/lib/libgtk-x11-2.0.so.0.800.14)<br />
==27626== by 0x424FEDE: gtk_widget_map (in /usr/lib/libgtk-x11-2.0.so.0.800.14)<br />
==27626== by 0x40E0486: (within /usr/lib/libgtk-x11-2.0.so.0.800.14)<br />
==27626== by 0x4129CC4: (within /usr/lib/libgtk-x11-2.0.so.0.800.14)<br />
==27626== Address 0x0 is not stack'd, malloc'd or (recently) free'd<br />
==27626==<br />
==27626== Process terminating with default action of signal 11 (SIGSEGV)<br />
==27626== Access not within mapped region at address 0x0<br />
==27626== at 0x5275FE1: (within /usr/lib/firefox/libgtkembedmoz.so)<br />
==27626== by 0x52739E8: (within /usr/lib/firefox/libgtkembedmoz.so)<br />
==27626== by 0x4700422: g_cclosure_marshal_VOID__VOID (in /usr/lib/libgobject-2.0.so.0.1000.1)<br />
==27626== by 0x46F416E: (within /usr/lib/libgobject-2.0.so.0.1000.1)<br />
==27626== by 0x46F479E: g_closure_invoke (in /usr/lib/libgobject-2.0.so.0.1000.1)<br />
==27626== by 0x47035CB: (within /usr/lib/libgobject-2.0.so.0.1000.1)<br />
==27626== by 0x4704B18: g_signal_emit_valist (in /usr/lib/libgobject-2.0.so.0.1000.1)<br />
==27626== by 0x4704E88: g_signal_emit (in /usr/lib/libgobject-2.0.so.0.1000.1)<br />
==27626== by 0x424FD20: gtk_widget_realize (in /usr/lib/libgtk-x11-2.0.so.0.800.14)<br />
==27626== by 0x424FEDE: gtk_widget_map (in /usr/lib/libgtk-x11-2.0.so.0.800.14)<br />
==27626== by 0x40E0486: (within /usr/lib/libgtk-x11-2.0.so.0.800.14)<br />
==27626== by 0x4129CC4: (within /usr/lib/libgtk-x11-2.0.so.0.800.14)<br />
What exactly going wrong is a big mistery for me, and I am not quiet sure how to get more debug information, but I can tell you, it’s an annoying bug.