memory leak in python process

Bug #190894 reported by Pascal Sachs
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gDesklets
Fix Committed
Medium
MarioGonzalez

Bug Description

The python process which refers to the gdesklets uses constantly more memory. My active widgets are at that time: GoodWeather, Binary Clock, QuickStart Bar and Countdown. I assume, that the memory leaks comes from c-bindings, because python provides a garbage collector. So it would be great if someone could reproduce and locate that leak, because it makes gdesklets unusable.
I use gdesklets 0.35.3 on Ubuntu 7.10.

Revision history for this message
MarioGonzalez (gonzalemario) wrote :

Can someone confirm this? Pascal Sachs, have you tried the new release (0.36)? If not, please have a try and tell us if the bug is still happening.

Revision history for this message
Pascal Sachs (psachs) wrote : Re: [Bug 190894] Re: memory leak in python process

Hi

I tried it with 0.36. I now have another configuration because not all
of the widgets are still available, but there is some improvement. The
constant memory leak is gone, so the gDesklets is usable now. But what I
recognized, is that after each reload of a widget the memory usage is
growing. Because this is not really a thing one often do, it is not that
bad, but I think this should be avoidable.

Cheers Pascal Sachs

Am Dienstag, den 04.03.2008, 01:35 +0000 schrieb MarioGonzalez:
> Can someone confirm this? Pascal Sachs, have you tried the new release
> (0.36)? If not, please have a try and tell us if the bug is still
> happening.
>

Revision history for this message
MarioGonzalez (gonzalemario) wrote :

This bug has been fixed in the 0.36 release.

Changed in gdesklets:
assignee: nobody → gonzalemario
importance: Undecided → Medium
status: New → Fix Committed
Revision history for this message
MarioGonzalez (gonzalemario) wrote :

El mar, 04-03-2008 a las 15:36 +0000, Pascal Sachs escribió:
> But what I
> recognized, is that after each reload of a widget the memory usage is
> growing. Because this is not really a thing one often do, it is not

 Yes, I can confirm this since 0.35v or after. Can you report this as a
"New Bug" please?

> that
> bad, but I think this should be avoidable.
--
www.mgonzalez.cl

Revision history for this message
Christian Meyer (chrisime) wrote :

That's sometimes due to pygtk or any other libs. Nothing has been changed so
far wrt. the C code in gdesklets.

Revision history for this message
Bjoern Koch (h.humpel) wrote :

What's the status on this one ?
Can it be closed ?

Revision history for this message
Luya Tshimbalanga (luya) wrote :

This bug should stay open because of
https://bugzilla.redhat.com/show_bug.cgi?id=747420

Revision history for this message
Ronny Lorenz (raumzeit) wrote :

In my opinion, this bug was introduced with revision 142!
A fix in utils/render.c creates copies of the GdkPixbuf which in turn get free'd only, if the height or width of the area drawn changes. I created a patch for this issue that solved the problem for me (running rev. 186)

Here is the patch:

--- ../gdesklets/utils/render.c 2010-05-24 12:56:05.000000000 +0200
+++ utils/render.c 2012-01-30 10:56:46.163768331 +0100
@@ -89,7 +89,10 @@
   /* set image */
   gtk_image_set_from_pixbuf (image, scaled);

+// this condition is causing a memory leak since rev. 142
+/*
   if (srcwidth != width || srcheight != height)
+*/
     g_object_unref (scaled);
 }

Can anyone confirm this?

Revision history for this message
Luya Tshimbalanga (luya) wrote :

Where is the patch?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.