[RESOLVED] 'Bad license' message appeared suddenly

Support for problems with license issues for my licensed tools
Post Reply
DAE avatar
DmitryKz
Posts: 10
Joined: Tue Nov 05, 2013 12:52 pm

Re: 'Bad license' message appeared suddenly

Post by DmitryKz »

Don, you will not believe, but after installing this test library I received such a message in VirtualDub
Image
I copied license.txt into this path and voila — it's all OK, script is loaded successfully.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: 'Bad license' message appeared suddenly

Post by admin »

I believe it because when everything else has been eliminated...

Is there a copy of DGDecodeNV.dll in that path? If not, we need to investigate further.
DAE avatar
DmitryKz
Posts: 10
Joined: Tue Nov 05, 2013 12:52 pm

Re: 'Bad license' message appeared suddenly

Post by DmitryKz »

Don, you're right.
In my operating system a couple of years ago the path to the folder with the AviSynth plug-ins was registered. In this folder with plug-ins was also the old library DGDecodeNV.dll with the modification date from 2013.
Now I deleted this library and the current DGDecodeNV.dll from June 27 of this year works correctly with dgi-file in my avs-script and VirtualDub, MeGui etc.
It seemed a little strange to me that when the direct path to DGDecodeNV.dll was specified with LoadPlugin(), the license file was searched in a completely different path. What, apparently, was not in version 2052, which, as I mentioned, the script was loaded right away.
In any case, thank you very much for your quick response and quick help. Without your test library, I would never have found the reason for why my avs-scripts is not working.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: 'Bad license' message appeared suddenly

Post by admin »

DmitryKz wrote:
Thu Jun 28, 2018 10:39 am
It seemed a little strange to me that when the direct path to DGDecodeNV.dll was specified with LoadPlugin(), the license file was searched in a completely different path. What, apparently, was not in version 2052, which, as I mentioned, the script was loaded right away.
Glad to be helpful, but still I like to get to the root of the problem. An explicit load should not result in a different DLL being loaded. I will test if that happens for me and report back shortly.
DAE avatar
DmitryKz
Posts: 10
Joined: Tue Nov 05, 2013 12:52 pm

Re: 'Bad license' message appeared suddenly

Post by DmitryKz »

Hmm, I do not understand... I deleted from the system variable the path to the folder C:\Program Files (x86)\AviSynth\plugins\, restarted OS. But if I place on the specified above path DGDecodeNV.dll - I get a green screen. If I remove DGDecodeNV.dll from there — everything is fine and everything works.
Don, the plugins folder of VirtualDub do not have to do this, but Avisynth plugins folder. For some reason it is looking for a license file.
Don, excuse me for my English — maybe I do not understand quite what I need to do and what to check?
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: 'Bad license' message appeared suddenly

Post by admin »

Yes, I edited out my confusion thinking you were talking about VirtualDub plugins directory.

Avisynth+ uses a path from the registry for the autoload directory, not a system variable.

I think the issue is whether Avisynth+ overrides an explicit loadplugin call with a full path to a specific DLL not contained in the autoload directory. I can't believe it would. I can't find online anything specifying the behavior. I could try to test it but I really do not want to have autoloading on my system at all.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: 'Bad license' message appeared suddenly

Post by admin »

OK, I ran an experiment. Avisynth+ does in fact use the autoload path even if the loadplugin() path is a full path to a different DLL! This is shocking to me but at least it explains everything. I may leave that path popup in the next slipstream to make things easier to detect this problem, but maybe not as I don't like giving crackers nice places to locate my licensing checks.

Anyway, good to hear you are going again and good luck with your projects, Dmitry.
DAE avatar
DmitryKz
Posts: 10
Joined: Tue Nov 05, 2013 12:52 pm

Re: [RESOLVED] 'Bad license' message appeared suddenly

Post by DmitryKz »

Don, thank you for the kind words — I was also glad for our cooperation. All the best to you)
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: [RESOLVED] 'Bad license' message appeared suddenly

Post by admin »

My pleasure too. Onward and upward!
User avatar
MeteorRain
Posts: 130
Joined: Fri Jul 25, 2014 4:04 pm
Location: New Jersey

Re: 'Bad license' message appeared suddenly

Post by MeteorRain »

admin wrote:
Thu Jun 28, 2018 11:24 am
OK, I ran an experiment. Avisynth+ does in fact use the autoload path even if the loadplugin() path is a full path to a different DLL! This is shocking to me but at least it explains everything.
That was actually my first thought when reading the first page. Avisynth+ will load all DLLs inside autoload directory, before any further loadplugin()s. So in OP's case Avisynth simply loaded both DLLs, with the first being autoloaded, the second being loadplugin()ed.

If, luckily, they are named different, then you can use dllname_function() like dgdecodenv2053_dgsource() to call a specific version. Otherwise it's gonna be a random one pick by Avisynth+. (Being the first or the last, depending on the implementation.)
User avatar
an3k
Posts: 1
Joined: Sun Jan 20, 2013 10:48 pm

Re: [RESOLVED] 'Bad license' message appeared suddenly

Post by an3k »

I had the exact same problem. I told MeGUI to load the bundled AviSynth.dll (which is C:\Program Files (x86)\MeGUI\AviSynth.dll) instead of the previously installed AviSynth+ (system32 / SysWOW64 directories) and I used the bundled DGIndexNV. I created the dgi using that DGIndexNV.exe and yes, I saw the video content. I then loaded the just created dgi in the MeGUI AVS Script Creator and ... BAD LICENSE.

I just deleted the DGDecodeNV.dll in the system-wide AviSynth+ plugin directories and boom, it works as intended :)
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: [RESOLVED] 'Bad license' message appeared suddenly

Post by admin »

Good to hear and thanks for the information.

Welcome to the forum!
Post Reply