The VDub destructor bug isn't so easy to fix; but shouldn't be hard for someone who understands the code better.
Code:
// VDubFilter.cpp
void CallEndProc() {
if (fd->endProc) {
int result = fd->endProc(&fa, &g_filterFuncs);
if (result != 0) {
throw AvisynthError("VirtualdubFilterProxy: error calling endProc");
}
}
}
Basically, Deshaker's EndProc is trying to access "something" within fa that is no longer accessible at that time.
Commenting both of these lines does solve the problem, but I doubt it is the right fix
Code:
// in FilterAdd
fm->env->AtExit(FreeFilterDefinition, fd);
// in LoadVirtualdubPlugin
env->AtExit(FreeFilterModule, fm);
The destructor needs to be called before these 2 functions.
I'll let you fix it before I start adding a "release timer" to fix the sequence