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 451639 - Gtk2::Gdk::Pixbuf::render_pixmap_and_mask leaks X memory
Gtk2::Gdk::Pixbuf::render_pixmap_and_mask leaks X memory
Status: RESOLVED FIXED
Product: gnome-perl
Classification: Bindings
Component: Gtk2
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk2-perl-bugs
gtk2-perl-bugs
Depends on:
Blocks:
 
 
Reported: 2007-06-27 15:06 UTC by Quentin Sculo
Modified: 2007-07-05 22:08 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
testcase (258 bytes, text/plain)
2007-06-27 15:10 UTC, Quentin Sculo
  Details
Mortalize returned scalars (1.24 KB, patch)
2007-07-05 21:06 UTC, Torsten Schoenfeld
none Details | Review

Description Quentin Sculo 2007-06-27 15:06:15 UTC
Please describe the problem:
Using the Gtk2::Gdk::Pixbuf::render_pixmap_and_mask function leaks GObjects and X ressources.
see http://mail.gnome.org/archives/gtk-perl-list/2007-April/msg00076.html

Steps to reproduce:
1. 
2. 
3. 


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Quentin Sculo 2007-06-27 15:10:34 UTC
Created attachment 90757 [details]
testcase

testcase, replace file.jpg by a real image file. Don't let it run too long or it might crash your X server.
Comment 2 Torsten Schoenfeld 2007-06-27 19:30:28 UTC
Looks like muppet's patch hasn't been committed yet.  muppet, can you commit it?

If that patch doesn't fix the leaks you're seeing, as you said on the list, then I think it's an issue in the underlying library.

Also, how do you measure that this is leaking?
Comment 3 Quentin Sculo 2007-06-27 21:49:40 UTC
I simply use top (press 'M' to sort by memory), and watch Xorg memory usage grows. It grows pretty fast, for example with a 600x800 jpg picture it grew by 500m in 30s (=300 function calls).
Comment 5 Torsten Schoenfeld 2007-07-05 21:06:35 UTC
Created attachment 91273 [details] [review]
Mortalize returned scalars

It turns out that the previous patch wasn't enough.  We still need to mortalize the returned scalars.  This patch fixes the issue for me.
Comment 6 Quentin Sculo 2007-07-05 21:25:06 UTC
Works for me too, thanks
Comment 7 Torsten Schoenfeld 2007-07-05 22:08:47 UTC
Committed to both branches.