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 536965 - GtkPlug: crash on theme change ...
GtkPlug: crash on theme change ...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
2.13.x
Other Linux
: Normal critical
: ---
Assigned To: Federico Mena Quintero
gtk-bugs
: 540192 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-06-06 10:30 UTC by Michael Meeks
Modified: 2009-01-23 05:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gtk2-bnc355402-bgo536965-gtkplug-toplevel-list.diff (3.72 KB, patch)
2009-01-14 16:01 UTC, Federico Mena Quintero
committed Details | Review

Description Michael Meeks 2008-06-06 10:30:25 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.
Comment 1 Christian Persch 2008-06-06 17:14:57 UTC
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)
Comment 2 Cosimo Cecchi 2008-06-25 17:51:06 UTC
*** Bug 540192 has been marked as a duplicate of this bug. ***
Comment 3 Federico Mena Quintero 2009-01-14 16:01:45 UTC
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?
Comment 4 Matthias Clasen 2009-01-14 19:55:48 UTC
Looks sane to me.
Comment 5 Matthias Clasen 2009-01-23 05:57:44 UTC
        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.