I can't help locate the leak, but I can confirm that this is not the only situation where these memory overloads then crashes occur. If you use the premiere import plugin and import many avisynth files the memory usage goes through the roof when you start using them, causing avisynth to crash and kill any project you are trying to render.
I finally got around to compiling the AviSynth source code, and now I just have to find some time to debug it when used by producer. Not sure I'll be able to find anything useful though, but at least I get to learn about how Avisynth works, which I have always been curious about.
I had some time today, and here's what I found so far: It seems that if I comment out the parent->AddRef() in CAVIStreamSynth::CAVIStreamSynth(CAVIFileSynth *parentPtr, bool isAudio) { _RPT2(0,"%p->CAVIStreamSynth(%s)\n", this, isAudio ? "audio" : "video"); m_refs = 0; AddRef(); parent = parentPtr; fAudio = isAudio; parent->AddRef(); } the memory leak is gone (see , where I encoded five .avs files ing a batch encode with 2-pass - the spike is before, the saw-toot after) Since the corresponding parent->Release() happens in CAVIStreamSynth::~CAVIStreamSynth() which is called after all Streams are Released, it would seem someone is not calling the appropriate Release, which I also verified in the debugger. I don't yet know if this is producer or the DirectShow AVI reader. The producer code that interacts with Directshow to read AVI files, is somewhat complex (at least for me who does not know DirectShow too well). Does anyone know of another app that uses DirectShow to read .avs files so I can test if this has the same behavior? When AviSynth is used in a little AVI test app that simply opens, converts all frames to raw, and then closes the AVI, there is no problem, and I can also see the right Release() is called. And, the above work-around leads to a crash, since CAVIFileSynth is deleted prematurely. (On a different topic, while working on this, I ran into a problem with mplayer2 and mplayerc in that .avs files do not show any video, and a dead process is left on exit ;; since this happens with the released Avisynth binary, both 2.0.7 and 2.5, so I won't worry about that for now).
--------------------- Jestem wciągnięty w świat Internetu i ogólnie rozumianych mediów, zwłaszcza społecznościowych - uważam, że to nowa kategoria, za parę lat pewnie nie będziemy musieli wychodzić z domów, by pracować :p
@karl_lillevold More likely it is simply that the parent->AddRef() is redundant with a call done before construction. Generally it is done this way when you pass refcounted params, you pass them with an updated refcount.
In theory, passing the AVS files to the "uncompressed VFW reader" should be ok - I could imagine you caould gain a slight speedimprovement here (probably a few memory transfers would go away, and some filters would not be used). A question: If ffdshow is enabled to accept "Raw Video" - is the video then being brought through ffdshow (and processed) - or does the Helix Producer always build the simplest possible graph - without risking any colorspace conversions or filtering?
--------------------- Witajcie na http://kaskada.info/