GNOME Bugzilla – Bug 536965
GtkPlug: crash on theme change ...
Last modified: 2009-01-23 05:57:44 UTC
It seems the in-process plug/socket optimisation is falling foul of whatever firefox 3 is doing with GtkPlug / Sockets. It appears that the gtkwindow.c toplevel_list does not reflect toplevels accurately - as gtkplug re-parents itself in-process into a GtkSocket - but perhaps that is not the problem: possibly as GtkSocket destroys itself it is not cleaning up it's children properly (somehow). Another possibility is that firefox 3 switches GtkPlugs in and out of the "is_child" state (for some reason) - and the gtk_plug_set_is_child is not re-setting the parent window pointer to NULL as it moves back into that mode in _gtk_plug_remove_from_socket (not sure). Anyhow a more comprehensive set of traces & analysis is here: https://bugzilla.novell.com/show_bug.cgi?id=355402#c18 HTH.
https://bugzilla.novell.com/show_bug.cgi?id=355402#c18 taks about a prior critical warning, but doesn't say which one that was; in the dup I found these: (gecko:25613): Gdk-CRITICAL **: gdk_colormap_get_screen: assertion `GDK_IS_COLORMAP (cmap)' failed (gecko:25613): GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT (object)' failed (gecko:25613): Gdk-CRITICAL **: gdk_colormap_get_visual: assertion `GDK_IS_COLORMAP (colormap)' failed which would point to a https://bugzilla.mozilla.org/show_bug.cgi?id=359870 and anjuta bug 467698 where bug 467698 comment 31 ff has the solution. Otoh, in comment 14 on your downstream bug you talk about unexpectedly destroyed windows, which might implicate https://bugzilla.mozilla.org/show_bug.cgi?id=263160 (warning: almost unreadably long and doesn't have much useful debugging going on unfortunately)
*** Bug 540192 has been marked as a duplicate of this bug. ***
Created attachment 126426 [details] [review] gtk2-bnc355402-bgo536965-gtkplug-toplevel-list.diff This patch makes GtkPlug's window be in sync with the global list of toplevels when the plug is reparented. Could someone please give it a sanity check?
Looks sane to me.
Keep GtkPlug in sync with the global list of toplevels. Patch by Federico Mena Quintero * gtk/gtkwindow.h: * gtk/gtkwindow.c (_gtk_window_set_is_toplevel): New internal function used when a GtkPlug parents/unparents itself by an in-process GtkSocket. This keeps the plug's GTK_TOPLEVEL flag in sync with the global toplevel_list. * gtk/gtkplug.c (gtk_plug_set_is_child): Call _gtk_window_set_is_toplevel() to keep the toplevel list updated, instead of just setting/unsetting the GTK_TOPLEVEL flag.