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 355583 - RAM usage for the "magnifier" process constantly increases
RAM usage for the "magnifier" process constantly increases
Status: RESOLVED FIXED
Product: gnome-mag
Classification: Deprecated
Component: magnifier-utility
0.13.x
Other All
: Normal minor
: ---
Assigned To: bill.haneman
bill.haneman
Depends on:
Blocks:
 
 
Reported: 2006-09-12 14:25 UTC by Aurelian Radu
Modified: 2006-10-06 21:17 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
Carlos' valgrind log (105.91 KB, text/plain)
2006-09-12 15:53 UTC, Aurelian Radu
  Details
Correct the code causing a memory leak (1.24 KB, patch)
2006-09-20 19:08 UTC, Carlos Eduardo Rodrigues Diógenes
committed Details | Review

Description Aurelian Radu 2006-09-12 14:25:30 UTC
Please describe the problem:
After running gnome-mag under gnopernicus for a while, System Monitor shows that the "magnifier" process uses increasing amounts of RAM, even up to ~600 MB of RAM on a machine with 1 GB of RAM and 768 MB of swap.

Steps to reproduce:
1. Start gnopernicus with magnifier
2. Start Firefox and browse to many web pages, especially pages full of pictures
3. Start any application and move your mouse around the desktop, forcing gnome-mag to cache new images


Actual results:
I am a total noob, but from what I've been reading about how magnification works I think gnome-mag caches a lot of images and fails to delete this cache.

Expected results:
I think memory usage should not increase after using gnome-mag for a while, certainly not to 600 MB of RAM!

Does this happen every time?
It happens every tine, on Ubuntu and SUSE (haven't tested on other distros).

Other information:
The only "fix" I could find is to close and restart Gnopernicus every few minutes.
Comment 1 bill.haneman 2006-09-12 15:17:41 UTC
Running the magnifier binary under valgrind would help track this down.
Comment 2 Aurelian Radu 2006-09-12 15:53:24 UTC
Created attachment 72623 [details]
Carlos' valgrind log
Comment 3 Aurelian Radu 2006-09-12 15:55:28 UTC
Carlos Eduardo Rodrigues Diogenes ran gnome-mag under valgrind and sent the log to the gnome-accessibility mailing list. The log is all Greek to me, but I'm attaching it here.
Comment 4 Carlos Eduardo Rodrigues Diógenes 2006-09-20 19:08:38 UTC
Created attachment 73104 [details] [review]
Correct the code causing a memory leak

The function gdk_pixbuf_add_alpha creates a new pixbuf, so the old reference was losted, the ref count wasn't decremented and the memory was not freed.
Comment 5 bill.haneman 2006-09-20 19:12:42 UTC
Comment on attachment 73104 [details] [review]
Correct the code causing a memory leak

Carlos, thanks a lot for finding this!  Great work, that was easy to miss...
Please commit when you have time.
Comment 6 Carlos Eduardo Rodrigues Diógenes 2006-09-20 19:22:06 UTC
Fixed in the development version. The fix will be available in the next major release. Thank you for your bug report.
Comment 7 Aurelian Radu 2006-09-20 19:27:30 UTC
I'm so happy I could help! When will the new major version be released? Any ETA?
Comment 8 Carlos Eduardo Rodrigues Diógenes 2006-09-20 19:48:23 UTC
(In reply to comment #7)
> I'm so happy I could help! When will the new major version be released? Any
> ETA?
> 

Thanks a lot for the bug report Aurelian, they are a great help to improve gnome-mag! The next GNOME major release will be in March/2006, but I think that the Ubuntu Accessibility Team can make an update of this package. I think that I can contact some of them.
Comment 9 Carlos Eduardo Rodrigues Diógenes 2006-10-06 21:17:08 UTC
Aurelian, the patch will be available in the next release of Ubuntu, that must be in this month. In other distributions I don't know when this bug will appear resolved.