GNOME Bugzilla – Bug 353189
gnome-typing-monitor leaks memory on each screen capture
Last modified: 2006-10-04 20:11:05 UTC
Forwarded from: https://launchpad.net/distros/ubuntu/+source/control-center/+bug/57704 Each time gnome-typing-monitor says "Take a break!", it does a screen capture. And each time it does a screen capture, it leaks memory. I know this because valgrind told me: ==3394== 178,200 bytes in 253 blocks are possibly lost in loss record 174 of 176 ==3394== at 0x401F548: memalign (vg_replace_malloc.c:332) ==3394== by 0x401F5A2: posix_memalign (vg_replace_malloc.c:386) ==3394== by 0x456720C: (within /usr/lib/libglib-2.0.so.0.1200.2) ==3394== by 0x4567CA3: g_slice_alloc (in /usr/lib/libglib-2.0.so.0.1200.2) ==3394== by 0x4567DDD: g_slice_alloc0 (in /usr/lib/libglib-2.0.so.0.1200.2) ==3394== by 0x44F0015: g_type_create_instance (in /usr/lib/libgobject-2.0.so.0.1200.2) ==3394== by 0x44D72C0: (within /usr/lib/libgobject-2.0.so.0.1200.2) ==3394== by 0x44D588D: g_object_newv (in /usr/lib/libgobject-2.0.so.0.1200.2) ==3394== by 0x44D63C6: g_object_new_valist (in /usr/lib/libgobject-2.0.so.0.1200.2) ==3394== by 0x44D64C6: g_object_new (in /usr/lib/libgobject-2.0.so.0.1200.2) ==3394== by 0x4485A73: gdk_pixbuf_new_from_data (in /usr/lib/libgdk_pixbuf-2.0.so.0.1000.1) ==3394== by 0x4483F4C: gdk_pixbuf_copy (in /usr/lib/libgdk_pixbuf-2.0.so.0.1000.1) Reproduction steps: 1. Open top and sort by memory usage. Note the usage for gnome-typing-monitor. 2. Tell gnome-typing-monitor to "Take a break" 3. Postpone the break. 4. Repeat steps 2 and 3 a couple of times. 5. Note the memory usage for gnome-typing-monitor. Expected results: gnome-typing-monitor does not take up significantly more memory each time. Actual results: It grows by a few megabytes each time it greys out the screen.
Are you sure it's not the status icon blinking you're seeing? GTK+ had a memory leak that would make all the icons leak when blinking it, it has been fixed in GTK+ CVS but not released yet iirc.
I'm talking about http://bugzilla.gnome.org/show_bug.cgi?id=352264
I'm fairly sure it's not. I manually trigger "Take a break" and it leaks at that point.
I'm not convinced though, since that code hasn't changed and if there was a leak like that, it should have been noticed several years ago... could you please re-run valgrind with a larger backtrace (--num-callers=20 or so)?
I can no longer reproduce this problem, so I suppose that it _was_ the GTK+ bug.
marking as fixed then