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 324821 - Memory leak in properties page
Memory leak in properties page
Status: RESOLVED DUPLICATE of bug 335533
Product: totem
Classification: Core
Component: Properties page
unspecified
Other All
: Normal normal
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2005-12-22 16:13 UTC by Damien Gombault
Modified: 2006-09-04 13:54 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12


Attachments
Fixes a small leak in bacon-video-widget-properties.c (610 bytes, patch)
2006-04-03 21:00 UTC, Christoph Burghardt
committed Details | Review

Description Damien Gombault 2005-12-22 16:13:33 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)
Comment 1 Bastien Nocera 2005-12-22 23:57:49 UTC
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?
Comment 2 Damien Gombault 2005-12-23 10:30:10 UTC
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.
Comment 3 Bastien Nocera 2005-12-24 14:13:01 UTC
I can reproduce this with the test-properties-page program in CVS, which creates and destroys the property window a number of times.
Comment 4 Christoph Burghardt 2006-04-03 21:00:40 UTC
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.
Comment 5 Christoph Burghardt 2006-04-03 21:14:06 UTC
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) 
Comment 6 Bastien Nocera 2006-04-12 14:24:48 UTC
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.
Comment 7 Bastien Nocera 2006-09-04 13:54:19 UTC
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 ***