Possible Memory Leak

Oct 5, 2012 at 2:36 PM

It seems as if VidCoder is leaking memory over time. 

After each encoding job, both the Commit Charge and the Working Set are growing.  I've had VidCoder running for almost a week now and the Commit Charge is 1.2 GB and the Working Set has grown to over 770 MB.

Coordinator
Oct 5, 2012 at 4:53 PM

Is this the stable or Beta release? I know that it's probably leaking window objects in the Beta but that's due to be fixed up in the next version.

Oct 5, 2012 at 5:05 PM

I am using Version 1.3.4.0 (x64) on Windows 7 Ultimate.  I am figuring that it might just be C# not garbage collecting dangling references as I've seen this before, especially with the collection classes.

The simple workaround is to stop VidCoder every few days and just requeue the last file it was working on.  The program saves the existing queue and can restart everything but the job which was currently working.

I'd grab the source and do a debug build with a memory analyzer if I weren't so busy right now.

Coordinator
Oct 5, 2012 at 5:21 PM

It could also be an unmanaged memory leak from the HandBrake API calls we make in-process. In the 1.4.1 beta I've moved all the encoding off to worker processes that get cleaned up after they complete. It would be interesting to see if the leak persists in that version; if it disappears it was probably an unmanaged leak.

If it persists it could be a managed memory leak and I can throw WinDbg at it.

Oct 5, 2012 at 6:06 PM

That sounds like a much more likely culprit.  I guess I need to get onto the beta track and let you know what happens.