[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

[RESOLVED] 'Bad license' message appeared suddenly

Post by DmitryKz »

Hello!
I've got suddenly the green screen with "Bad license" message by unknown reason.
After it I take these steps.
* I got a new license number, but it turned out to be the same;
* I downloaded new binaries - unsuccessfully;
* I used the old version - no luck;

Please help resolve this problem.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: 'Bad license' message appeared suddenly

Post by admin »

With more recent versions, you need to have a copy of your license file in the same directory as DGDecodeNV.dll, as well as in the same directory as DGIndexNV.exe.
DAE avatar
DmitryKz
Posts: 10
Joined: Tue Nov 05, 2013 12:52 pm

Re: 'Bad license' message appeared suddenly

Post by DmitryKz »

Yes, I have:
Image
I use full path in the script file.
With version 2052 all OK.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: 'Bad license' message appeared suddenly

Post by admin »

Please send me an email containing 1) a screenshot of your DGIndexNV Help/About dialog box, 2) attach the license.txt file you made, and 3) your user id.

Does DGIndexNV open and play files fine, but you cannot open a script via DGDecodeNV? Or do both fail?

Are you invoking things through a third-party GUI like MeGUI, StaxRip, or are you invoking DG tools directly?

Make sure your script is not autoloading an older version of DGDecodeNV. Try loading DGDecodeNV explicitly with LoadPlugin() in your script.

When you enter your id into the license generator, make sure you do not include an extra space at the end.
DAE avatar
DmitryKz
Posts: 10
Joined: Tue Nov 05, 2013 12:52 pm

Re: 'Bad license' message appeared suddenly

Post by DmitryKz »

Does DGIndexNV open and play files fine, but you cannot open a script via DGDecodeNV? Or do both fail?
Yes — DGIndexNV opens and plays video files fine. I cannot open avs-script in DGIndexNV — just nothing happens, but the "Close" button in the "File" menu becomes available.
When I'm loading avs script into MeGui or VirtualDub I get green screen and bad license message within them both.
avs-script is very simple:

Code: Select all

LoadPlugin("U:\XBackup\MyMiscProgs\DGIndexNV\DGDecodeNV.dll")
DGSource("00023.dgi")
and dgi-file created by «U:\XBackup\MyMiscProgs\DGIndexNV\DGIndexNV.exe»
Now also I repeated generating license with carefully — and I'm definitely sure — no extra space is presented at the beginning and the end of UserID and MachineID
..
And I'm also want to point again that with version 2052 all works OK — MeGui and VirtualDub open avs-script as film, without green screen and bad license message.
I have long been using DGIndexNV and before such problems as described above I did not come across.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: 'Bad license' message appeared suddenly

Post by admin »

Please post the top 20 lines of the file 00023.dgi.

I want to point out that 2053 has been out for years. Every one of the few 'Bad license' reports has been due to user error in setup.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: 'Bad license' message appeared suddenly

Post by admin »

To help you find the problem, I list the ways that the 'Bad license' screen can be caused in DGDecodeNV:

1. You have a debugger running in the context of the application opening the AVS script. This includes cracker tools as well as Visual Studio, etc. I actively combat cracking attempts in several ways. It can also stop possibly innocent things. So, for example, say you are developing an avisynth filter and open VirtualDub via Visual Studio 'Start Debugging', and then you open a script containing DGSource(). This is detected as an attempt to debug DGSource() and I stop it. You have to use a different source filter to develop your filter.

2. A readable file 'license.txt' cannot be found in the path of the DGDecodeNV.dll being invoked. You cannot rename DGDecodeNV.dll to something else, or move it away from the directory holding the license.txt file.

3. license.txt is empty.

4. A correct key is not found in the first 10 lines of license.txt.

One of these things must be happening. Based on what you have told me, I guess it is related to number 2. One thing to do is turn on display of extensions in Windows, as I cannot tell from your screenshot the full names of things.

If you are certain that none of these things are happening, then I can make an instrumented build for you that will show the reason with a popup.
DAE avatar
DmitryKz
Posts: 10
Joined: Tue Nov 05, 2013 12:52 pm

Re: 'Bad license' message appeared suddenly

Post by DmitryKz »

Don, I can not even imagine what I can do wrong.
I'm doing the same steps - both with version 2053, and with version 2052.

Code: Select all

DGVC1IndexFileNV20 DGIndexNV 2053.0.0.152 X32
U:\XBackup\MyMiscProgs\DGIndexNV\

U:\FIELD_OF_DREAMS\BDMV\STREAM\00023.m2ts 32001374208

DEVICE 0
DECODE_MODES 0,0,0,0,0
STREAM 1 0
PKTSIZ 192
VPID 4113
CLIP 0 0 0 8
RANGE 0 0 32001374207 0
DEMUX 4352,4353,4354,4355,4356,4608,4609,4610,4611,4612,4613,4614,4615,4616,4617,4618,4619,4620,4621,4622,4623,4624,4625
DEPTH 8
ASPECT 16 9
COLORIMETRY 2 2 2

SEQ 798 0 1 0
ENTRY 820 0 64
0:FRM 0 0 0
No, I haven't and debugger as well as Visual Studio. I just want to make a rip of the film :)
2. Don, as you can see on the screenshot above, "license.txe" is located in the same folder with DGDecodeNV.dll and DGIndexNV.exe.
And below:
Image
3. No, license.txt is not empty. Its size is 66 byte.
4. Hmmm.. Don, you said "10 lines"? On licensing web page I've got only one line of 66 symbols. May be that is the problem?
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: 'Bad license' message appeared suddenly

Post by admin »

No, your license file and key are fine. I checked what you sent me.

I'll post a link to a special build for you in about 15 minutes.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: 'Bad license' message appeared suddenly

Post by admin »

Please load this dll and report the results when opening your script:

http://rationalqm.us/misc/DGDecodeNV_dmitry.dll
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