Gtk Plug bug ...
- From: Michael Meeks <michael helixcode com>
- To: Owen Taylor <otaylor redhat com>
- Cc: Federico Mena Quintero <federico helixcode com>,gtk-devel-list gnome org
- Subject: Gtk Plug bug ...
- Date: Thu, 10 Aug 2000 18:22:25 -0400 (EDT)
Hi,
I managed to repeat this bug, and Federico and myself generated
a patch which involves re-ordering the plug unrealize do this:
{
GtkPlug *plug;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_PLUG (widget));
plug = GTK_PLUG (widget);
if (GTK_WIDGET_CLASS (parent_class)->unrealize)
(* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
if (plug->socket_window != NULL) {
gdk_window_set_user_data (plug->socket_window, NULL);
gdk_window_unref (plug->socket_window);
plug->socket_window = NULL;
}
}
Since elsewhere we do:
widget->window = gdk_window_new (plug->socket_window,
&attributes, attributes_mask);
And the parent_class unrealize destroys widget->window.
Anyhow; the purify log looks like this:
Started sample-control-factory ( 2 errors, 0 leaked bytes)
Purify instrumented sample-control-factory (pid 5687 at Thu Aug 10
17:39:35 2000)
FMR: Free memory read
This is occurring while in:
gdk_window_internal_destroy [gdkwindow.c:591]
if (private->parent)
{
GdkWindowPrivate *parent_private =
(GdkWindowPrivate *)private->parent;
=> if (parent_private->children)
parent_private->children = g_list_remove
(parent_private->children, window);
}
gdk_window_destroy [gdkwindow.c:685]
gtk_widget_real_unrealize [gtkwidget.c:4550]
bonobo_plug_unrealize [bonobo-plug.c:78]
gtk_marshal_NONE__NONE [gtkmarshal.c:344]
gtk_signal_real_emit [gtksignal.c:1440]
gtk_signal_emit [gtksignal.c:552]
gtk_widget_unrealize [gtkwidget.c:1700]
gtk_widget_shutdown [gtkwidget.c:4384]
gtk_window_shutdown [gtkwindow.c:656]
Reading 4 bytes from 0x1198b8 in the heap.
Address 0x1198b8 is 48 bytes into a freed block at 0x119888 of 52
bytes.
This block was allocated from:
malloc [rtlib.o]
g_malloc [gmem.c:177]
gdk_window_foreign_new [gdkwindow.c:519]
bonobo_plug_construct [bonobo-plug.c:45]
bonobo_plug_new [bonobo-plug.c:56]
impl_Bonobo_Control_set_window [bonobo-control.c:283]
_ORBIT_skel_Bonobo_Control_set_window [Bonobo-skels.c:3758]
ORBit_POA_handle_request [orbit_poa.c:507]
ORBit_handle_incoming_request [server.c:89]
ORBit_handle_incoming_message [server.c:159]
There have been 0 frees since this block was freed from:
free [rtlib.o]
g_free [gmem.c:411]
gdk_window_unref [gdkwindow.c:740]
bonobo_plug_unrealize [bonobo-plug.c:73]
if (plug->socket_window != NULL)
{
gdk_window_set_user_data
(plug->socket_window, NULL);
=> gdk_window_unref (plug->socket_window);
plug->socket_window = NULL;
}
gtk_marshal_NONE__NONE [gtkmarshal.c:344]
gtk_signal_real_emit [gtksignal.c:1440]
gtk_signal_emit [gtksignal.c:552]
gtk_widget_unrealize [gtkwidget.c:1700]
gtk_widget_shutdown [gtkwidget.c:4384]
gtk_window_shutdown [gtkwindow.c:656]
FMW: Free memory write
HTH,
Michael.
--
mmeeks@gnu.org <><, Pseudo Engineer, itinerant idiot
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]