GNOME Bugzilla – Bug 324821
Memory leak in properties page
Last modified: 2006-09-04 13:54:19 UTC
Please describe the problem: Nautilus eats more and more memory when you open properties pages of multimedia files. After viewing ~30 properties pages, Nautilus uses ~200 Mo RSS Memory. I tried to remove « libtotem-properties-page.so » : this problem disappears. Steps to reproduce: 1. Open a video properties page 2. Close the properties page 3. Repeat step 1. and 2. ~30 times (tested with differents files) 4. Nautilus is eating over ~200 Mo RSS Memory. Actual results: Expected results: Does this happen every time? Other information: I use Totem 1.3.0 (xine backend)
Where did you get the RSS from? Which specific files were you using (ie. if it happens only with one type of file, then it's probably a problem with the demuxer for that particular type of file)? Can you reproduce the problem with the "test-properties-page" program in the current Totem CVS?
I try each time to open ~20 twice the properties page of theses files : (note: you don't need to click to the Audio/Video tab, just opening the properties page is needed) Ogg Vorbis file : 9518 desinteg 15 0 1566m 155m 18m S 0.3 15.5 0:05.57 nautilus MP3 file : 9795 desinteg 15 0 1592m 153m 18m S 2.7 15.3 0:07.44 nautilus AVI (DivX5/MP3) 9951 desinteg 15 0 1660m 207m 18m S 95.1 20.7 0:44.19 nautilus Note : After opening 5 times the properties page this file, nautilus was using ~25% CPU. After opening 10 times the properties page, nautilus was using ~50% CPU. After ~20 times, nautilus was using 100% CPU and slows down my system. AVI (Xvid/MP3) (only 5 times opening the propertie pages : too high CPU load to continue) 10648 desinteg 15 0 616m 112m 18m S 89.3 11.2 0:25.76 nautilus MPEG (MPEG2/MPEG audio layer2) (only 10 times the opening propertie pages) 10689 desinteg 15 0 971m 144m 18m S 63.7 14.5 0:23.83 nautilus Nautilus normal usage : 10689 desinteg 15 0 149m 20m 14m S 0.0 2.1 0:00.69 nautilus When you are viewing properties page of video files, nautilus uses lots of CPU. If you wait ~1 minute, the CPU usage decreases to 0. But the used memory doesn't decrease. This memory problem seems to happen with any multimedia file. All theses informations was given by « top » command. I also verify at the same time theses values with gnome-system-monitor. Everything value was correct. Sorry, I am unable to use your « test-properties-page » program, because I get an error when I compile it. « test-properties-page.o » file seems not to be created. I used Totem 1.3.0 (xine backup) to perform theses tests.
I can reproduce this with the test-properties-page program in CVS, which creates and destroys the property window a number of times.
Created attachment 62699 [details] [review] Fixes a small leak in bacon-video-widget-properties.c While attacking this with valgrind, i think this is a small 56byte memory leak.
I`ve tried reproducing this with the gstreamer backend but despite a rss usage of about 50mb test-properties never the peak was around 60mb, even with repeating the loop 50 times. (with a 800mb movie)
I committed the small memleak fix. 2006-04-12 Bastien Nocera <hadess@hadess.net> * src/bacon-video-widget-properties.c: (bacon_video_widget_properties_finalize): patch from Christoph Burghardt <hawkes@web.de> to fix a small memory leak The xine-lib backend still has a bunch of memleaks due to its plugins system, and probably in a couple of plugins as well. I'm leaving this open for now.
It's mainly the xine-lib backend sucking (well, xine-lib itself). I already got started on debugging, and the catalogue cache is broken, but nobody's fixed it yet. I'll close this as a duplicate of bug #335533, as we wouldn't have the actual backend running in the same memory space as nautilus, thus avoiding leakage there. *** This bug has been marked as a duplicate of 335533 ***