[RESOLVED] Sometimes VirtualDub hangs with no error message

Support forum for DGDecNV
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

[RESOLVED] Sometimes VirtualDub hangs with no error message

Post by admin »

Admin note: I split this off from a different thread. This message was posted by jpsdr.

I don't know if my issue is related to this, but sometimes, when i open with VirtualDub an avisynth script with only DGIndexNV inside, VDub is stuck. I have to kill it, and after i re-open the script and everything is fine. Unfortunately, no error message or anything is displayed.
Sometimes it aslo happens during a batch. Lately, i've create a few dozen of jobs in batch, and when i've checked the progress, i've realised that VDub was stuck on the opening of one of the jobs. After killing it and restarting it, everything went fine until the end.
The avisynth script has only DGIndexNV inside, i use VDub just to convert/decode my m2ts files into a lossless avi file (UT Video code).
As i said, unfortunately, when this happens, no error message, no popup, nothing, just VDub stuck... :?
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Sometimes VirtualDub hangs with no error message

Post by admin »

When you open VirtualDub in these cases, does the first frame get displayed? Or does it stay blank and then say VirtualDub not responding?

Does it happen with all file types? How often does it happen if you repeat using the same file?

Can you give me a batch file that repeatedly opens and closes a script in Vdub? Sorry, I don't ever use Vdub like that. I can use it to try to duplicate your issue.
DAE avatar
jpsdr
Posts: 214
Joined: Tue Sep 21, 2010 4:16 am

Re: Sometimes VirtualDub hangs with no error message

Post by jpsdr »

admin wrote:Or does it stay blank and then say VirtualDub not responding?
Yes.
admin wrote: Does it happen with all file types? How often does it happen if you repeat using the same file?
Occurance is rare. Never tried to loop opening the same file, so i don't realy know. As i only use DGIndexNV on m2ts files, i don't know if it happens on other files.
admin wrote: Can you give me a batch file that repeatedly opens and closes a script in Vdub? Sorry, I don't ever use Vdub like that. I can use it to try to duplicate your issue.
Ok, i'll to see how i can do that, because for now i have no idea, never used VDub in cli... :?
I'll see that tomorrow.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Sometimes VirtualDub hangs with no error message

Post by admin »

jpsdr wrote:Ok, i'll to see how i can do that, because for now i have no idea, never used VDub in cli... :?
You're really confusing me now because you said this before:

"Sometimes it aslo happens during a batch. Lately, i've create a few dozen of jobs in batch, and when i've checked the progress, i've realised that VDub was stuck on the opening of one of the jobs."

So you are invoking VirtualDub in a batch, which is CLI, isn't it?

Just give me a batch that repeatedly encodes the same file (use a simple loop with goto). It seems like it should eventually fail if the issue is real.
DAE avatar
jpsdr
Posts: 214
Joined: Tue Sep 21, 2010 4:16 am

Re: Sometimes VirtualDub hangs with no error message

Post by jpsdr »

Sorry, i was afraid of this misunderstanding. By "batch" i mean "jobs queue", the "Queue batch operation" menu in VDub, where you create a batch of jobs adding them one after one, and run then after in the "Job control..." menu. It's also called "batch", so...
But i absolutely don't use VDub in cli.
DAE avatar
jpsdr
Posts: 214
Joined: Tue Sep 21, 2010 4:16 am

Re: Sometimes VirtualDub hangs with no error message

Post by jpsdr »

So, i've looked into how to create a batch file.
The avisynth script (for exemple Script.avs) is something like that :

Code: Select all

DGSource("File.dgi",i420=false,deinterlace=0,fieldop=0)
Then, create a VDud script file (for exemple TestScript.vcf), with the following inside (warning : case sensitive) :

Code: Select all

VirtualDub.Open("C:\\My\\Path File\\Script.avs");
VirtualDub.Close();
Then, create a batch file (for exemple Script.bat in VDub directory) with the following :

Code: Select all

@echo off
FOR /L %%A IN (1,1,200) DO vdub64 /s TestScript.vcf
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Sometimes VirtualDub hangs with no error message

Post by admin »

Ah, I see now.

OK, I used a file with just a few frames and added a preview between the open and close. I have it running in a loop with 5000 iterations and will report what happens. So far, after a few minutes and over 500 cycles, it is still cranking away.

Can you try this too, jpsdr? It will be good to know if it fails for you. If not, then some key factor is not being included in the test.

My guess is that it is not DGDecodeNV that hangs but rather the encode process. I have only a preview but no encode in my current test. I can add an encode if this does not fail, but in that case DGDecodeNV would appear to be exonerated.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Sometimes VirtualDub hangs with no error message

Post by admin »

No failures after 5000 opens.
DAE avatar
jpsdr
Posts: 214
Joined: Tue Sep 21, 2010 4:16 am

Re: Sometimes VirtualDub hangs with no error message

Post by jpsdr »

admin wrote: My guess is that it is not DGDecodeNV that hangs but rather the encode process.
This could be true if it was happening only on queued jobs. But as i said, sometimes it happens when i just open the avs file in VDub, in that case, no process/encode or anything is involved (and of course, the chain filter within VDub is empty). But, also it's rare, and not reproductible...
I'll try a 5000 loop when back home.
DAE avatar
jpsdr
Posts: 214
Joined: Tue Sep 21, 2010 4:16 am

Re: Sometimes VirtualDub hangs with no error message

Post by jpsdr »

I've tried a 5000 loop with Open/Preview/Close (trimed at a few frames for the preview), and it gone until the end... :scratch:
But... I've just a few days ago upgrade my video card from a GT950 to a GT1060. Maybe this had a side effect.
Well, i'll let this issue in suspend, continue to use DGIndexNV as usualy, and if the issue happens again with a file, try again the 5000 loop with that specific file. Don't see what else to do...
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Sometimes VirtualDub hangs with no error message

Post by admin »

ok, sounds good, thank you.
DAE avatar
jpsdr
Posts: 214
Joined: Tue Sep 21, 2010 4:16 am

Re: Sometimes VirtualDub hangs with no error message

Post by jpsdr »

Happened again... :(
Noted the files on which it happend, didn't get the time yet to do the 5000 test, but i will.
DAE avatar
jpsdr
Posts: 214
Joined: Tue Sep 21, 2010 4:16 am

Re: Sometimes VirtualDub hangs with no error message

Post by jpsdr »

Didn't have time to do 5000, but as the issue occued 3 times for 140 "process", i've done a 500 loop test on a file which created the issue, without being able to reproduce... :(
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Sometimes VirtualDub hangs with no error message

Post by admin »

That suggests something in your process other than DGIndexNV. Can you tell me more about it?
DAE avatar
jpsdr
Posts: 214
Joined: Tue Sep 21, 2010 4:16 am

Re: Sometimes VirtualDub hangs with no error message

Post by jpsdr »

It's "easy".
I'm under Windows7 x64, i have a GTX1060 card with the last NVidia drivers.
I'm using VirtualDub x64 version 1.10.5-prerelease build 35570, and UT Video Codec 17.0.0.
UT video is configured (in UT Video Codec Suite -> Global Configuration) :
- Save configuration globaly by codec itself (checked).
- Ignore setting configuration from codec client (not checked)
- Priority of worker threads : If 1 is "Low" and 5 is "High", i'm on 4.

I have a Blu-Ray Box of one anime serie, i rip it and and so i'll work on all episodes (can be 26, 50, or even 75).
Firs, I create the Anime-xx.dgi files of all episodes with DGIndexNV.
Then, i create the following Anime-xx.avs files (xx is the episode number) for all episodes, which is like this (sometimes there is not the trim, but there is more often the trim than not) :

Code: Select all

SetMemoryMax(192)
DGSource("Anime-xx.dgi",i420=false,deinterlace=0,fieldop=0)
trim(24,34045)
Then, in VDub i configure :

Video -> Color Depth
- Decompression format : 4:2:0 planar YCbCr (YV12)
- Output format to compressor/display : 4:2:0 planar YCbCr (YV12)
(These are indeed my default settings).
Video -> Compression : UTVideo YUV420 BT.709 VCM
Configuration of UT Video in VDub :
Frame divide count : Same as # of logical processor (checked => 20 in my case).
Optimize for compression ratio (Predict median) is selected.

View : Input,Output and Swap Input/Ouput are selected.

Audio : Select "No audio".

Now, for all my avs files, i do the following :
File -> Open Video file.
Queue batch operation -> Save as avi...
Sometimes, VDub hangs, without even the 1rst frame displayed during "File -> Open Video file."
Once, i've finished, i start the jobs.
Sometime a job hangs at 0% (probably during the "Open" process).

The last time it occured, i've created a batch of around 70 files, the hang occured twice during the creation of the queue batch (so, just when doing "File -> Open Video file"), and once during the process of the jobs created.

All my dgi files are created on my F partition, all my avi files are saved on my I or J partition, which is on a different physical drive, my drives are WD Black 2To.
... Don't see what to tell more, if you have any other questions. I hope my explaination are clear and detailled enough, but ask if i've forget to explain something.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Sometimes VirtualDub hangs with no error message

Post by admin »

What is your evidence that my tool is the cause of the issue? I can't help you with VirtualDub issues.

Obviously, I am not going to duplicate all that, so your hope for my help is to strip it down until it is obvious that my tool is at fault.
DAE avatar
jpsdr
Posts: 214
Joined: Tue Sep 21, 2010 4:16 am

Re: Sometimes VirtualDub hangs with no error message

Post by jpsdr »

admin wrote:What is your evidence that my tool is the cause of the issue?
Because...
- It's only hapening with avs script with DGDecodeNV inside.
- There is nothing else than DGDecodeNV in the avs script.
- There is no filter in the VDub filter chain.

Don't you think it's a good reason to suspect it...?
At first glance, and don't see any other suspect, but i'm not closed to any other suggestion.
And, it's a suspect, not the guilty.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Sometimes VirtualDub hangs with no error message

Post by admin »

Well what's the point of all the utcodec stuff etc.? Have you tried using a different codec, say uncompressed? You told me it doesn't fail with just a simple script in a loop. So what are you adding that causes it to start failing?

It could be memory related such that DGDecNV memory use puts you over a limit, or something like that. Have you tried taking out the SetMemoryMax stuff etc.? Why do you say there is only DGDecodeNV when you have SetMemoryMax and Trim? You'll have to strip the scenario down. Remember I have a minimal scenario and it runs 5000 times with no issue.

Finally what's with VirtualDub "pre-build"? Can't you use a stable VirtualDub?

I'll try to create something close to what you do and see what happens.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Sometimes VirtualDub hangs with no error message

Post by admin »

I tried using that build of VDub and saving with UT video codec. No hangs.

Here's the thing. You say:

"Sometimes, VDub hangs, without even the 1rst frame displayed during "File -> Open Video file."

In that case all the stuff with ut video and jobs is irrelevant. It should fail in my test loop then.

The only thing I cannot duplicate is your nVidia card.

I don't see where to go from here. I cannot imagine how DGDecodeNV could hang on a simple script.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Sometimes VirtualDub hangs with no error message

Post by admin »

When you get hung again, maybe you can use SysInternals Process Explorer to try to see what is happening.
DAE avatar
jpsdr
Posts: 214
Joined: Tue Sep 21, 2010 4:16 am

Re: Sometimes VirtualDub hangs with no error message

Post by jpsdr »

Ok, i'll try that.
DAE avatar
jpsdr
Posts: 214
Joined: Tue Sep 21, 2010 4:16 am

Re: Sometimes VirtualDub hangs with no error message

Post by jpsdr »

Euh... Just to be sure, are you talking about that : https://technet.microsoft.com/en-us/sys ... lorer.aspx
If yes, i have to install it to be able to start it when next hang will occur.

EDIT : Ok, it's running on its own, don't have to install. I'm not sure what i'm supposed to see, but, well, i'll try next time.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Sometimes VirtualDub hangs with no error message

Post by admin »

Yes, sir, that's the one. The process will be Veedub64 and you should able to see if it has loaded DGDecodeNV.dll and what state it is in.

Last resort I'll make a debug load with lots of traces. I hate to leave my favorite users in the lurch. ;)
DAE avatar
jpsdr
Posts: 214
Joined: Tue Sep 21, 2010 4:16 am

Re: Sometimes VirtualDub hangs with no error message

Post by jpsdr »

Ok. For now, i'm encoding the lot of files created, so there will be a little time before i'll do again another package of "lot of files".

Otherwise, for information :
The NVidia card is probably not to be the case, because it also happened with my previous card, previous drivers, etc... So, it may not be relevant to try with this specific.
Uncompressed... Huarg... Too big files... Too slow access, bad...
This "pre-release" has several bug fixes compared to the last stable release, so it will be a regression for me. And i think this release also has a fix for something i've reported (without the forum anymore i don't realy remember, it was several years ago already).
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Sometimes VirtualDub hangs with no error message

Post by admin »

Thanks for the info! Keep me informed. You know how much I hate to have threads without the [RESOLVED] prefix. :P
Post Reply