Bug#291130: marked as done (libgtk2.0-0: libgtk2 doesn't free memory from destroyed widgets)

Debian Bug Tracking System owner@bugs.debian.org
Tue, 18 Jan 2005 15:48:25 -0800


Your message dated Wed, 19 Jan 2005 00:41:20 +0100
with message-id <1106091681.10773.20.camel@localhost.localdomain>
and subject line Bug#291130: libgtk2.0-0: libgtk2 doesn't free memory from destroyed widgets
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 18 Jan 2005 22:37:59 +0000
>From davinci@escomposlinux.org Tue Jan 18 14:37:59 2005
Return-path: <davinci@escomposlinux.org>
Received: from 22.red-80-38-245.pooles.rima-tde.net (orodruin.escomposlinux.org) [80.38.245.22] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1Cr1z4-0007Rp-00; Tue, 18 Jan 2005 14:37:59 -0800
Received: by orodruin.escomposlinux.org (Postfix, from userid 1073)
	id 20A9E1F9F2; Tue, 18 Jan 2005 23:36:32 +0100 (CET)
Received: from lorien.net (137.red-213-37-227.user.auna.net [213.37.227.137])
	by orodruin.escomposlinux.org (Postfix) with ESMTP
	id 5CC301F9F7; Tue, 18 Jan 2005 23:36:15 +0100 (CET)
Received: from david by lorien.net with local (Exim 4.34)
	id 1Cr23z-0003GY-1x; Tue, 18 Jan 2005 23:43:03 +0100
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: DaVinci <davinci@escomposlinux.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: libgtk2.0-0: libgtk2 doesn't free memory from destroyed widgets
X-Mailer: reportbug 3.5
Date: Tue, 18 Jan 2005 23:43:02 +0100
Message-Id: <E1Cr23z-0003GY-1x@lorien.net>
Sender: DaVinci <davinci@escomposlinux.org>
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_PACKAGE,
	RCVD_IN_SBLXBL autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 

Package: libgtk2.0-0
Version: 2.4.14-2
Severity: important

 Hi.

 Look at this code:
 
-------
#include <gtk/gtk.h>

int main(int argc, char** argv){
	GtkWidget* window;
	gtk_init(&argc, &argv);

	while(TRUE){
		window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
		gtk_widget_show_all(window);
		gtk_object_destroy(GTK_OBJECT(window));
	}
	gtk_main();
	return 0;
}
-------

 Why libgtk2 doesn't free memory from destroyed window in each loop
 iteration? I think this problem is an important bug, so I label it. I
 have an application that creates and destroys windows constantly, and
 with this bug, it eats all memory and swap, slowing system until
 freeze.

 Greets.

 							David

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.7
Locale: LANG=es_ES.UTF-8@euro, LC_CTYPE=es_ES.UTF-8@euro (charmap=UTF-8)

Versions of packages libgtk2.0-0 depends on:
ii  libatk1.0-0              1.8.0-4         The ATK accessibility toolkit
ii  libc6                    2.3.2.ds1-20    GNU C Library: Shared libraries an
ii  libfontconfig1           2.2.3-4         generic font configuration library
ii  libfreetype6             2.1.7-2.3       FreeType 2 font engine, shared lib
ii  libglib2.0-0             2.6.1-2         The GLib library of C routines
ii  libgtk2.0-0              2.4.14-2        The GTK+ graphical user interface 
ii  libgtk2.0-bin            2.4.14-2        The programs for the GTK+ graphica
ii  libgtk2.0-common         2.4.14-2        Common files for the GTK+ graphica
ii  libjpeg62                6b-9            The Independent JPEG Group's JPEG 
ii  libpango1.0-0            1.6.0-3         Layout and rendering of internatio
ii  libpng12-0               1.2.8rel-1      PNG library - runtime
ii  libtiff4                 3.7.1-1         Tag Image File Format (TIFF) libra
ii  libx11-6                 4.3.0.dfsg.1-10 X Window System protocol client li
ii  libxcursor1              1.1.3-1         X cursor management library
ii  libxext6                 4.3.0.dfsg.1-10 X Window System miscellaneous exte
ii  libxft2                  2.1.2-6         FreeType-based font drawing librar
ii  libxi6                   4.3.0.dfsg.1-10 X Window System Input extension li
ii  libxrandr2               4.3.0.dfsg.1-10 X Window System Resize, Rotate and
ii  libxrender1              0.8.3-7         X Rendering Extension client libra
ii  xlibs                    4.3.0.dfsg.1-10 X Keyboard Extension (XKB) configu
ii  zlib1g                   1:1.2.2-4       compression library - runtime

-- no debconf information

---------------------------------------
Received: (at 291130-done) by bugs.debian.org; 18 Jan 2005 23:41:50 +0000
>From seb128@debian.org Tue Jan 18 15:41:49 2005
Return-path: <seb128@debian.org>
Received: from smtp7.wanadoo.fr [193.252.22.24] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1Cr2yq-00054y-00; Tue, 18 Jan 2005 15:41:49 -0800
Received: from me-wanadoo.net (localhost [127.0.0.1])
	by mwinf0703.wanadoo.fr (SMTP Server) with ESMTP id A6F8A1000088;
	Wed, 19 Jan 2005 00:41:17 +0100 (CET)
Received: from [192.168.0.2] (ANancy-151-1-28-86.w83-194.abo.wanadoo.fr [83.194.206.86])
	by mwinf0703.wanadoo.fr (SMTP Server) with ESMTP id 4CFC01000085;
	Wed, 19 Jan 2005 00:41:17 +0100 (CET)
X-ME-UUID: 20050118234117315.4CFC01000085@mwinf0703.wanadoo.fr
Subject: Re: Bug#291130: libgtk2.0-0: libgtk2 doesn't free memory from
	destroyed widgets
From: Sebastien Bacher <seb128@debian.org>
To: 291130-done@bugs.debian.org, DaVinci <davinci@escomposlinux.org>
In-Reply-To: <E1Cr23z-0003GY-1x@lorien.net>
References: <E1Cr23z-0003GY-1x@lorien.net>
Content-Type: text/plain; charset=ISO-8859-15
Date: Wed, 19 Jan 2005 00:41:20 +0100
Message-Id: <1106091681.10773.20.camel@localhost.localdomain>
Mime-Version: 1.0
X-Mailer: Evolution 2.1.3.2 
Content-Transfer-Encoding: quoted-printable
Delivered-To: 291130-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-4.8 required=4.0 tests=BAYES_00,FROM_ENDS_IN_NUMS,
	HAS_BUG_NUMBER autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 

Le mardi 18 janvier 2005 =E0 23:43 +0100, DaVinci a =E9crit :
> Package: libgtk2.0-0
> Version: 2.4.14-2
> Severity: important
>=20
>  Hi.
>=20
>  Look at this code:
> =20
> -------
> #include <gtk/gtk.h>
>=20
> int main(int argc, char** argv){
> 	GtkWidget* window;
> 	gtk_init(&argc, &argv);
>=20
> 	while(TRUE){
> 		window =3D gtk_window_new(GTK_WINDOW_TOPLEVEL);
> 		gtk_widget_show_all(window);
> 		gtk_object_destroy(GTK_OBJECT(window));
> 	}
> 	gtk_main();
> 	return 0;
> }
> -------
>=20
>  Why libgtk2 doesn't free memory from destroyed window in each loop
>  iteration? I think this problem is an important bug, so I label it. I
>  have an application that creates and destroys windows constantly, and
>  with this bug, it eats all memory and swap, slowing system until
>  freeze.

Hi,

You have an infinite loop placed before gtk_main(), add this in the loop
for example:

while (gtk_events_pending ())
  gtk_main_iteration ();


I'm closing this bug since that's not a bug in GTK.



Cheers,

Sebastien Bacher