X-remote code leaks gdk windows

RESOLVED FIXED in mozilla1.6alpha

Status

()

Core
X-remote
P3
normal
RESOLVED FIXED
15 years ago
15 years ago

People

(Reporter: dbaron, Assigned: dbaron)

Tracking

({memory-leak})

Trunk
mozilla1.6alpha
x86
Linux
memory-leak
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [patch])

Attachments

(1 attachment)

(Assignee)

Description

15 years ago
The X-Remote code leaks GDK Windows because it doesn't destroy its window until
after the event loop has stopped running:

gdk_superwin_destroy
(/builds/trunk/mozilla/widget/src/gtksuperwin/gdksuperwin.cgtk_marshal_NONE__NONE
(/usr/lib/libgtk-1.2.so.0)
gtk_signal_set_funcs (/usr/lib/libgtk-1.2.so.0)
gtk_signal_emit (/usr/lib/libgtk-1.2.so.0)
gtk_object_destroy (/usr/lib/libgtk-1.2.so.0)
gtk_object_destroy (/usr/lib/libgtk-1.2.so.0)
gtk_widget_destroy (/usr/lib/libgtk-1.2.so.0)
nsWindow::DestroyNative()
(/builds/trunk/mozilla/widget/src/gtk/nsWindow.cpp:496nsWidget::Destroy()
(/builds/trunk/mozilla/widget/src/gtk/nsWidget.cpp:365)
nsWindow::Destroy() (/builds/trunk/mozilla/widget/src/gtk/nsWindow.cpp:407)
XRemoteService::DestroyProxyWindow()
(/builds/trunk/mozilla/xpfe/components/xremXRemoteService::Shutdown()
(/builds/trunk/mozilla/xpfe/components/xremote/src/XR./mozilla-bin+1475B
(./mozilla-bin)
main (./mozilla-bin)
__libc_start_main (/lib/tls/libc.so.6)

The two GDK windows that the superwin owns are leaked, but the leak goes away if
this code gets called while the event loop is still running.


I'll attach a patch that fixes the leak, although it's not ideal.  In
particular, I'm a little puzzled as to why adding the observer inside
CreateProxyWindow doesn't work.
(Assignee)

Updated

15 years ago
Status: NEW → ASSIGNED
Keywords: mlk
Priority: -- → P3
Whiteboard: [patch]
Target Milestone: --- → mozilla1.6alpha
(Assignee)

Updated

15 years ago
Attachment #129968 - Flags: superreview?(bryner)
Attachment #129968 - Flags: superreview?(bryner) → superreview+
(Assignee)

Comment 2

15 years ago
Fix checked in to trunk, 2003-09-17 16:46 -0700.
Status: ASSIGNED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.