Log in

View Full Version : Possible reason for "no plugin list"?


LigH
24th March 2008, 07:33
Greetings.

A reinstall of Windows fixed it - but I am curious which reason could have disabled AviSynth for one of the users of the german doom9/Gleitz board. He tried to load a simple 2-line script (LoadPlugin, *Source) and got the following error message:

Avisynth open failure:
LoadPlugin: unable to get plugin list $Plugins$, loading "Plugin.dll"
(X:\00.avs, line 3)

Could you guess into the blue what might be able to destroy AviSynth's ability to build a plugins list? A CPFH (codec pack from hell), a "non-plugin" in the autoload folder, missing access permissions, ... ?

IanB
24th March 2008, 13:01
The relevant piece of code, line 69, plugins.cpp
env->SetGlobalVar("$Plugins$", env->SaveString((const char*)plugins, max_plugins*sizeof(HMODULE)));
try {
loaded_plugins = (HMODULE*)env->GetVar("$Plugins$").AsString();
}
catch(...) { // probably should be IScriptEnvironment::NotFound
if (!quiet)
env->ThrowError("LoadPlugin: unable to get plugin list $Plugins$, loading \"%s\"", filename);
return false;
}Best guess, the SetGlobalVar failed a malloc due to no memory so the subsequent GetVar threw a NotFound.

Else corrupt copy Avisynth.dll on disk or in memory. :confused:

LigH
24th March 2008, 18:19
Thanks for a guess. Maybe a "SetMemoryMax()" could have helped, maybe not... he already installed a new Windows.

IanB
24th March 2008, 22:00
"SetMemoryMax()"No that just controls the size of the Video Buffers pool.

A corrupt Avisynth.dll or some other system .dll is most likely.

Kiichi
2nd April 2008, 20:18
Sorry for interrupt... I faced this problem today on newly installed windows system.

My hardware: Dell XPS M1330 Laptop computer with 2GB RAM.
I partitioned HDD and installed two OS: Japanese WinXP and Vista.

First is JWinXP, I installed all hotfix and some other applications (such as Firefox, foobar2000...) then installed avisynth 2.5.7 and latest MeGUI (megui online updated to newest state), but when I try to use AVS builder of MeGUI I got this error

Avisynth script error: loadPlugin: unable to get plugin list $Plugins$, loading c:\program files\avisynth2.5\plugins\vsfilter.dll
Not only vsfilter but TDeint, DGDecode... all DLLs are unable to load.
(I downloaded AviSynth and MeGUI directly from SourceForge, I think the file is not broken.

After a couple tries to uninstall/reinstall AVIsynth and MeGUI I gave up and turn to install a new Windows Vista to test. This time AVISynth is the first 3rd party application I installed. After I installed MeGUI, it can work to read AVS and show the right result. But after a few windows update hotfix installed, I got the same error..... I don't know what's wrong with it. But I really need to get rid of this issue before I can normally use this computer.

IanB
2nd April 2008, 22:13
On reading the code again, I beleive it cannot be SetGlobalVar failing a malloc, that would cause a GPF, therefore it must be some form of corruption.... But after a few windows update hotfix installed, I got the same error ...And this indicates that some other component is involved.

Try emptying your Plugins directory, in case an Autoloaded plugin is screwing over the $Plugins$ data area.

With an empty plugins directory, are you able to run a simple script with only just "Version()" in it?

If possible use system restore to roll back the hotfixes to see if it starts working again. If it does then manually install the hotfixes a few at a time (Make system restore checkpoints before each upgrade) to identify the Hotfix that breaks things.

Also try the 2.5.8 alpha release.

Kiichi
3rd April 2008, 09:24
Hello IanB,

I think I've find the root cause.

1. I deleted AVISynth2.5/plugins directory
2. Reinstall AVISynth 2.5.8 a2
3. Write test.avs with Version() function --> OK.
4. Install MeGUI and online update --> Open d2v file OK.
5. Install DirectVobSub 2.38 (vsfilter.dll , date 2008-3-6, comes from K-Lite Codec Pack 3.85) --> $Plugins$ trashed.

Replace vsfilter.dll by an older version (date 2007-6-8, from older K-lite) solves my problem.

Now avisynth works under JWinXP and WinVista.

LigH
3rd April 2008, 10:29
See - Codec Packs are Evil. ;) -- The reliable source for vsfilter.dll should be http://sf.net/projects/guliverkli

foxyshadis
3rd April 2008, 17:49
Not true, the latest released version of vsfilter there has several known and long-fixed bugs, including a thread hang on most dual-core architectures! A better option is the files from guliverkli2 or mpc-hc projects.

LigH
8th April 2008, 13:07
Good...

Let's check if those also support again the once disabled Fade-In/Out (which still worked in the AviSynth 2.0x plugin of VobSub 2.23).

burfadel
12th April 2008, 17:54
Had the same problem myself, actually it was driving me nuts! luckily I came across this thread, the culprit is indeed vsfilter.dll

I would have never have thought to change that since it was working before with the same filters, but anyways!

laserfan
23rd May 2008, 22:28
Trying out VSfilter.dll today, actually renamed to VSfilter.vdf w/VdubM, latest version 962,560 bytes says 1.0.1.4 in Properties. Sometime after I'd copied this vsfilter.dll into the Avisynth plugins directory I got this error on an .avs file I'd been opening successfully all day:

Avisynth open failure:
LoadPlugin: unable to get plugin list $Plugins$, loading "c:\program files\dgavcdec\dgavcdecode.dll

I renamed the vsfilter.dll to .junk and Avisynth (2.58a) cruised again. Thinking maybe the free-codecs download I'd used was corrupt, I went to the guliverkli2 project site and DL'ed it there--same thing, no worky. Then I tried previous version from 20070918 and Avisynth likes it.

Something broke going to the 20080306 2.38 package. Sure glad I didn't have to Restore, or (worse) reload Windows to find this! Whew... :eek:

IanB
24th May 2008, 00:17
Okay, I finally worked out what is happening. The varTable is being corrupted. Specifically in this instance a variable has had the memory holding it's name free'd, so the internal strcmp() GPF's. I still can't find what is setting the variable in the first place, but when someone does find it, it is going to need an env->SaveString().

stax76
24th May 2008, 20:37
So what we know is VSFilter 2007-09-18 is OK and VSFilter 2008-03-06 introduced a critical bug breaking AviSynth's plugin auto loading and many applications who depend on it.

It's almost three months old. I assume the programmer who introduced the critical bug isn't aware that there is a bug so we have to find out who introduced the bug so we can submit a bug report. Once it's fixed the codec pack authors have to be notified.

Casimir666
24th May 2008, 22:41
Hello,
The problem came from a line added in the AviSynth plugin initialization :

extern "C" __declspec(dllexport) const char* __stdcall AvisynthPluginInit2(IScriptEnvironment* env)
{
env->AddFunction("VobSub", "cs", VobSubCreateS, 0);
env->AddFunction("TextSub", "cs", TextSubCreateS, 0);
env->AddFunction("TextSub", "csi", TextSubCreateSI, 0);
env->AddFunction("TextSub", "csif", TextSubCreateSIF, 0);
env->AddFunction("TextSubSwapUV", "b", TextSubSwapUV, 0);
env->AddFunction("MaskSub", "siifi", MaskSubCreateSIIFI, 0);
// env->SetVar("RGBA",false);
return(NULL);
}

I have commented the "env->SetVar("RGBA",false) and now there is no more access violation, but since i'm not the author of the original patch i don't know what this line do. This line also exist for AviSynth1 plugin. Should it be removed to? Any AviSynth expert informations about this appreciated ;)

The binary is available here for test perpose : http://www.zshare.net/download/125239838e4379f8/

Can you tell me if it's works?

gzarkadas
24th May 2008, 23:45
...
This line ...Should it be removed to? ...


Try the suggestion of IanB (see post #13 in this thread) and change the line to:

env->SetVar(env->SaveString("RGBA"), false);


Do not simply remove it; most probably some of the functions that you add depend on it (although at a first sight the line should probably calling env->SetGlobalVar and not env->SetVar; however only the source has the answer and I haven't read the source :)).

Casimir666
25th May 2008, 22:12
Try the suggestion of IanB (see post #13 in this thread) and change the line to:

env->SetVar(env->SaveString("RGBA"), false);


Do not simply remove it; most probably some of the functions that you add depend on it (although at a first sight the line should probably calling env->SetGlobalVar and not env->SetVar; however only the source has the answer and I haven't read the source :)).

Ok it's done :
http://www.zshare.net/download/125690394d66d037/

Can someone do some additionnals tests with this VSFilter before I commit the modification?

stax76
25th May 2008, 22:56
Can someone do some additionnals tests with this VSFilter before I commit the modification?

Works here, I'm about to release a new stable StaxRip version and wonder which version to use for it, currently a very old version is used:


Public Class VSFilterPackage
Inherits AviSynthPluginPackage

Public Sub New()
Name = "VSFilter"
Filename = "VSFilter.dll"
Description = "VSFilter is a AviSynth plugin for adding hardcoded subtitles. Furthermore it's a DirectShow Filter to display optional subtitles."
Version = "2.37"
VersionDate = New DateTime(2005, 11, 25)
Website = "http://sourceforge.net/projects/guliverkli"
DownloadFilename = "VSFilter_2.37.zip"
TreeFolder = "AviSynth Plugins"
FilterNames = New String() {"VobSub", "TextSub"}
End Sub

Public Overrides Function Install() As Boolean
Dim ret = MyBase.Install()

If File.Exists(Path) Then
Process.Start("regsvr32", "/s """ + Path + """")
End If

Return ret
End Function
End Class

Casimir666
26th May 2008, 23:08
This is from mpc-hc repository : http://sourceforge.net/projects/mpc-hc/

Basically it's original Gabest filter and several patches posted on Guliverlki project. I have made no modification myself in this filter.

sneaker_ger
28th May 2008, 15:47
Ok it's done :
http://www.zshare.net/download/125690394d66d037/

Can someone do some additionnals tests with this VSFilter before I commit the modification?

I did a short test and it fixed the auto load error for me, thx!