Page 1 of 1

Memory leak

Posted: Thu Jul 22, 2010 10:23 pm
by DickN
Just tried 1.3.12 Beta for the first time. Got crashes rather persistently when applying effects (didn't seem to matter which ones). I tried using Windows Task Manager (Vista, 64 bit, in case it matters) to watch the CPU and memory usage. When an effect is running, the memory allocation grows monotonically and never shrinks. When it reaches about 1.76 GB, the app crashes. I had Edit->Preferences->Directories->Play and record using RAM ticked. I tried unticking it and the problem went away.

Re: Memory leak

Posted: Thu Jul 22, 2010 11:29 pm
by kozikowski
What did you have "Minimum Free Memory" set to? Same panel.

Koz

Re: Memory leak

Posted: Fri Jul 23, 2010 3:44 am
by DickN
Minimum Free Memory (MB): 16
The crash occurred during the 3rd or 4th effect.
The machine has 4 GB RAM.

- DickN

Re: Memory leak

Posted: Fri Jul 23, 2010 8:54 am
by steve
Recording to RAM should really only be used for machines that have slow hard drives, and it is not an ideal solution because Audacity will run much better if it has as much RAM as possible available for processing rather than it being taken up by recording.

For Vista, 64 bit I would expect that you would need to have a lot more free RAM available than 16 MB. If you really need to record/play using RAM, try setting the Minimum Free Memory much higher (try 1 GB, and if that works you could try reducing it to allow longer tracks). If you don't really need it, disable it (it is disabled by default).

Re: Memory leak

Posted: Fri Jul 23, 2010 8:56 pm
by DickN
Tried Stevethefiddle's suggestion: Turned Rec to RAM back on and set Min Free Memory to 1000 MB.
Memory usage (from Task Manager) after caching to RAM was 833 MB.
Ran "invert" repeatedly, no crash. Memory usage still increased with each pass of the effect, but only until it maxed out at 1.5 GB. At that point, Available Memory was 980 MB (from Control Panel->System->Performance->Advanced Tools->System Information).

The crash, when it happens, puts up an "unhandled exception" dialog.

I had turned Rec to RAM on because the benchmark says I can only play 4.4 tracks simultaneously. I have one project in 1.2.6 in which 10 tracks overlap for a few seconds. I might be fooling myself here because 7 of the tracks have silence during the overlap. If Audacity doesn't store the silence, then 4 is probably the most I've had active concurrently. I do anticipate more ambitious projects, and also have discovered the benefit of duplicating a track and applying an effect so I can use crossfade or envelope to bring the effect in and out smoothly.

I'll keep it off until it appears I really need it.

Thanks for the input, and hope my observations are useful.

- DickN

Re: Memory leak

Posted: Fri Jul 23, 2010 9:04 pm
by steve
<em>DickN</em> wrote:I had turned Rec to RAM on because the benchmark says I can only play 4.4 tracks simultaneously.
I've always had my doubts about that benchmark test - on my laptop (a cheap Acer Aspire) the benchmark says around 100 tracks though in reality it becomes very sluggish with much less than that and at 100 mono tracks (50 stereo tracks) it immediately crashes. It is probably worth doing some "real life" tests to see how many tracks your computer can do, and if it really is as low as single figures then we could perhaps start looking at why so few (I can get 8 tracks quite comfortably on my ancient 500 MHz Pentium III machine).

Re: Memory leak

Posted: Sat Jul 24, 2010 1:12 am
by bgravato
I don't think that's memory leak you're experiencing. I think it's normal that the memory used increases every time you apply an effect. That's probably audacity saving all the data necessary for the UNDO function...

Every time you apply an effect you have the possibility to undo that action... Undoing is not done by applying the effect in reverse... it needs to have a copy of the data before the effect saved somewhere...