[RESOLVED] DGAvcDecDI crashes when playing mkv-file
Re: DGAvcDecDI crashes when playing mkv-file
I've found some code that makes DGSource() not thread-safe, and therefore not compatible with MT. I have corrected it and slipstreamed it into build 2025. So redownload build 2025 and update DGAVCDecodeDI.dll. Please test it and report your results.
- prokhozhijj
- Posts: 30
- Joined: Sat Jan 01, 2011 11:16 am
Re: DGAvcDecDI crashes when playing mkv-file
Thank you. I've downloaded last version. And what I have.
This code works properly but only with 1 thread (please pay your attention on comments within script).
Following code crashes all time when I am using x264 coder.
Following code crashes all time when I am using x264 coder. And it only works once with VirtualDub(I was unable to repeat this result later).
This code works properly but only with 1 thread (please pay your attention on comments within script).
Code: Select all
DGSource("my_file.dgi")
SetMTMode(2)
# or SetMTMode(2,0) or SetMTMode(2,3) or SetMTMode(2,4)
super = MSuper(pel=2, sharp=2)
backward_vec2 = MAnalyse(super, isb=true, delta=2, overlap=4)
backward_vec1 = MAnalyse(super, isb=true, delta=1, overlap=4)
forward_vec1 = MAnalyse(super, isb=false, delta=1, overlap=4)
forward_vec2 = MAnalyse(super, isb=false, delta=2, overlap=4)
MDegrain2(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400)
Code: Select all
SetMTMode(5)
# or SetMTMode(5,0) or SetMTMode(5,2) or SetMTMode(5,3) or SetMTMode(5,4)
DGSource("my_file.dgi")
SetMTMode(2)
super = MSuper(pel=2, sharp=2)
backward_vec2 = MAnalyse(super, isb=true, delta=2, overlap=4)
backward_vec1 = MAnalyse(super, isb=true, delta=1, overlap=4)
forward_vec1 = MAnalyse(super, isb=false, delta=1, overlap=4)
forward_vec2 = MAnalyse(super, isb=false, delta=2, overlap=4)
MDegrain2(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400)
Code: Select all
SetMTMode(5,4)
DGSource("my_file.dgi")
SetMTMode(2,4)
super = MSuper(pel=2, sharp=2)
backward_vec2 = MAnalyse(super, isb=true, delta=2, overlap=4)
backward_vec1 = MAnalyse(super, isb=true, delta=1, overlap=4)
forward_vec1 = MAnalyse(super, isb=false, delta=1, overlap=4)
forward_vec2 = MAnalyse(super, isb=false, delta=2, overlap=4)
MDegrain2(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400)
Re: DGAvcDecDI crashes when playing mkv-file
That's all I can do for you on this issue. Use your first script.
- prokhozhijj
- Posts: 30
- Joined: Sat Jan 01, 2011 11:16 am
Re: DGAvcDecDI crashes when playing mkv-file
This is certainly not what I expected. DSS2() can work stable with multi-threading in all these scripts. But... That's something at least.
Thanks.
Thanks.
Re: DGAvcDecDI crashes when playing mkv-file
You need to ask DiAVC about it. I have confirmed that DGSource() itself is threadsafe. I can open a script several times in simultaneous VirtualDub instances and they play fine and independently.
Beyond that, it's your problem to get MT working. I know nothing about it, and more precisely, I don't care at all about it. And what are you after anyway? The source filter is already multithreaded and the remainder of your script is running fine under MT. What are you trying to achieve by MT'ing the souce filter?
You are free to use DSS2() if that works better for you.
Beyond that, it's your problem to get MT working. I know nothing about it, and more precisely, I don't care at all about it. And what are you after anyway? The source filter is already multithreaded and the remainder of your script is running fine under MT. What are you trying to achieve by MT'ing the souce filter?
You are free to use DSS2() if that works better for you.
- prokhozhijj
- Posts: 30
- Joined: Sat Jan 01, 2011 11:16 am
Re: DGAvcDecDI crashes when playing mkv-file
As far as I know possibility to run several applications simultaneously is not equal to multi-threading. Threadsafe means that you can run several threads within one application process in operating system. It is because every process runs in its own memory area which is isolated from other processes. But threads run in shared memory area which one process owns.admin wrote:You need to ask DiAVC about it. I have confirmed that DGSource() itself is threadsafe. I can open a script several times in simultaneous VirtualDub instances and they play fine and independently.
Yes, you told me already about it. It is a pity (for me of course).admin wrote:Beyond that, it's your problem to get MT working. I know nothing about it, and more precisely, I don't care at all about it.
I am trying to use all cores of my CPU. I don't know exactly how it works with DSS2() but it works smoothly on all cores and when I am not MT'ing before this filter it works on one core only. The same situation with your plug-in - it can works on one core only when I am not turning on MT before it.admin wrote:And what are you after anyway? The source filter is already multithreaded and the remainder of your script is running fine under MT. What are you trying to achieve by MT'ing the souce filter?
May be MT spawns several threads when filter loads the video. And consequent filters runs within these threads.
I know, I know... But DiAVC decoder is better than it analogues. So I tried to use it.admin wrote:You are free to use DSS2() if that works better for you.
Re: DGAvcDecDI crashes when playing mkv-file
What makes you think that DSS2() cannot use the DiAVC decoder?I know, I know... But DiAVC decoder is better than it analogues. So I tried to use it.
One more time: DiAVC runs multithreaded distributed on all your CPUs. There is no need to try to instantiate DGSource() multiple times. If you cannot get DiAVC to use all your cores, then again, talk to DiAVC about it!
- prokhozhijj
- Posts: 30
- Joined: Sat Jan 01, 2011 11:16 am
Re: DGAvcDecDI crashes when playing mkv-file
At present I not quite understand how to make it work with DiAVC.admin wrote:What makes you think that DSS2() cannot use the DiAVC decoder?I know, I know... But DiAVC decoder is better than it analogues. So I tried to use it.
admin wrote:One more time: DiAVC runs multithreaded distributed on all your CPUs. There is no need to try to instantiate DGSource() multiple times. If you cannot get DiAVC to use all your cores, then again, talk to DiAVC about it!
On forum.doom9.org I've got reply regarding this. There is no need to perform special action to force decoder for using multithreading.
And I've notice that when I run following script within VirtualDub all my cores were used. But that happened only one time and only within VirtualDub
Code: Select all
SetMTmode(5,4)
DGSource()
SetMTMode(2,4)
Re: DGAvcDecDI crashes when playing mkv-file
What version of Avisynth are you running? Also, what version of MT.dll?
If you give me enough information I will try to duplicate the issue.
If you give me enough information I will try to duplicate the issue.
- prokhozhijj
- Posts: 30
- Joined: Sat Jan 01, 2011 11:16 am
Re: DGAvcDecDI crashes when playing mkv-file
I have usual Avisynth (last 32-bit version from SourceForge) and MT-libraries from SEt version 2009.07.12. I've got Avisynth MT here http://forum.doom9.org/showthread.php?p ... ost1301410
There are my Avisynth files
http://www.filefactory.com/file/b4g40cf ... isynth.zip
MD5: 869C8001ACF985372DC9E0F7A8328745
Size: 2'200'278
There are my Avisynth files
http://www.filefactory.com/file/b4g40cf ... isynth.zip
MD5: 869C8001ACF985372DC9E0F7A8328745
Size: 2'200'278
- prokhozhijj
- Posts: 30
- Joined: Sat Jan 01, 2011 11:16 am
Re: DGAvcDecDI crashes when playing mkv-file
Not quite. Firstly you need to install usual Avisynth and after that you should copy dll-s from SEt distributive over dll-s from official Avisynth.
Re: DGAvcDecDI crashes when playing mkv-file
I asked which one you are *running*.
Re: DGAvcDecDI crashes when playing mkv-file
I installed Avisynth MT and MT.dll. I ran this script:
loadplugin("dgavcdecodedi.dll")
dgsource("X:\RATATOUILLE\BDMV\STREAM\00027.dgi")
and this one:
loadplugin("f:\don\Programming\C++\DiAVC\DGAVCDecodeDI\x32\Release\dgavcdecodedi.dll")
dgsource("X:\RATATOUILLE\BDMV\STREAM\00027.dgi")
SetMTMode(2,0)
tweak(sat=0.0)
They both ran fine and both gave a utilization graph like this:
So, the first script shows that the decoder is using all the cores. The second shows that you can MT additional functions after the DGSource() call.
You *do not need* to MT DGSource(). DiAVC takes care of threading for the source filter. But just for fun, I added SetMTMode(5,0) before DGSource(). It still worked but
was slower than without it.
loadplugin("dgavcdecodedi.dll")
dgsource("X:\RATATOUILLE\BDMV\STREAM\00027.dgi")
and this one:
loadplugin("f:\don\Programming\C++\DiAVC\DGAVCDecodeDI\x32\Release\dgavcdecodedi.dll")
dgsource("X:\RATATOUILLE\BDMV\STREAM\00027.dgi")
SetMTMode(2,0)
tweak(sat=0.0)
They both ran fine and both gave a utilization graph like this:
So, the first script shows that the decoder is using all the cores. The second shows that you can MT additional functions after the DGSource() call.
You *do not need* to MT DGSource(). DiAVC takes care of threading for the source filter. But just for fun, I added SetMTMode(5,0) before DGSource(). It still worked but
was slower than without it.
- prokhozhijj
- Posts: 30
- Joined: Sat Jan 01, 2011 11:16 am
Re: DGAvcDecDI crashes when playing mkv-file
When I run my script (DiAVCDecode), It crashes all time
If I am running following script (DiAVCDecode), it works but with one thread only. It is because only 1 thread actually load video source as I wrote early.
If I am running this script (DSS2), it also works with one thread only.
But if I am running script listed below (DSS2), it runs on all my cores with 4 threads. And all cores utilization is 100% (not just 5 or 10 like your screenshot shows). x264 FPS processing speed is also much higher (15 or 16 FPS instead of 4-5 with 1 thread only).
You show me on your screenshot all cores with 1-thread-only-loading. I see it because utilization of your cores is just 5-10 percent. OS just distribute in your case load from 1 thread to all your cores. But it is NOT multi-threading.
As I think decoder will not spawns additional threads automatically. You should tell him so explicitly. And it is can be done with SetMTMode calling BEFORE using DGDecode.
Code: Select all
SetMTMode(5,4)
DGSource()
SetMTMode(2,4)
MVTools processing part ...
If I am running following script (DiAVCDecode), it works but with one thread only. It is because only 1 thread actually load video source as I wrote early.
Code: Select all
DGSource()
SetMTMode(2,4)
MVTools processing part ...
Code: Select all
DSS2()
SetMTMode(2,4)
MVTools processing part ...
Code: Select all
SetMTMode(5,4)
DSS2()
SetMTMode(2,4)
MVTools processing part ...
As I think decoder will not spawns additional threads automatically. You should tell him so explicitly. And it is can be done with SetMTMode calling BEFORE using DGDecode.
Re: DGAvcDecDI crashes when playing mkv-file
My CPU utilization is low because I was not transcoding but only decoding and playing the script in VirtualDub.
You are a self-confessed amateur yet here you are lecturing me on threading.
You are a self-confessed amateur yet here you are lecturing me on threading.
- prokhozhijj
- Posts: 30
- Joined: Sat Jan 01, 2011 11:16 am
Re: DGAvcDecDI crashes when playing mkv-file
I am not lecturing you. I'm just voicing my thoughts aloud. Also I clearly see the difference of CPU utilization between DGSource and DSS2 in my script. You can easily check that I am right. Just use Microsoft Process Explorer tool. It can show how many threads actually in use within one application process and what the nature of these threads.
I am amateur in video standards. It is true. But I am not amateur in system administration - in this area I am professional. And I know difference between multi-processing, multi-threading and multi-coring. I'm sorry if my knowledge in this area hurt you.
Please show me example of video processing script for Avisynth, when CPU utilization with DGSource will be equal to 100%. Because until now I can't understand how to reach it with DGSource. However I can easily do it with DSS2. All my scripts have been given already to you.
I am amateur in video standards. It is true. But I am not amateur in system administration - in this area I am professional. And I know difference between multi-processing, multi-threading and multi-coring. I'm sorry if my knowledge in this area hurt you.
Please show me example of video processing script for Avisynth, when CPU utilization with DGSource will be equal to 100%. Because until now I can't understand how to reach it with DGSource. However I can easily do it with DSS2. All my scripts have been given already to you.
Re: DGAvcDecDI crashes when playing mkv-file
I do not get crashing when I put SetMTMode(5,0) before DGSource(). If you do, perhaps you should remove all that MV tools stuff and see if it still crashes. If so, then please use your awesome system administration skills to provide me with a Dr. Watson dump of the crash.
- prokhozhijj
- Posts: 30
- Joined: Sat Jan 01, 2011 11:16 am
Re: DGAvcDecDI crashes when playing mkv-file
There is a dump.
http://www.filefactory.com/file/b4g7c95/n/x264.zip
MD5: 5B24798EFD065F78523CA09F45308FD4
Size: 19'002'233
Avisynth script:
I've removed any dll-s from Avisynth plugins folder except for following:
DirectShowSource
MT
TCPDeliver
http://www.filefactory.com/file/b4g7c95/n/x264.zip
MD5: 5B24798EFD065F78523CA09F45308FD4
Size: 19'002'233
Avisynth script:
Code: Select all
SetMemoryMax(2000)
SetMTmode(5,0)
LoadPlugin("D:\arh\media\edit\video\_Filters\DGAVCDecDI\2025_20110106\DGAVCDecodeDI.dll")
DGSource("g:\video1.dgi")
return last
DirectShowSource
MT
TCPDeliver
Re: DGAvcDecDI crashes when playing mkv-file
What is x264.DMP and how do I view it?
DrWatson logs are *.wlg.
DrWatson logs are *.wlg.
- prokhozhijj
- Posts: 30
- Joined: Sat Jan 01, 2011 11:16 am
Re: DGAvcDecDI crashes when playing mkv-file
I've made this dump with Windows Task Manager. It can can be viewed with Windows debugger which comes with Windows SDK 7.
As far as I know there is no Dr.Watson debugger in Windows 7. But maybe I am wrong and you can tell me how I can run it in Windows 7.
Also I have diagnostic message from OS. I don't know if it could help... It looks like following
Event name: APPCRASH
Application name: x264.exe
Application version: 0.0.0.0
Application timestamp: 4d08623f
Module name: DGAVCDecodeDI.dll
Module version: 0.0.0.2025
Module timestamp: 4d2542b7
Exception code: c0000005
Exception offset: 000057c5
OS version: 6.1.7600.2.0.0.256.1
Language code: 1049
Additional info 1: 0a9e
Additional info 2: 0a9e372d3b4ad19135b953a78882e789
Additional info 3: 0a9e
Additional info 4: 0a9e372d3b4ad19135b953a78882e789
As far as I know there is no Dr.Watson debugger in Windows 7. But maybe I am wrong and you can tell me how I can run it in Windows 7.
Also I have diagnostic message from OS. I don't know if it could help... It looks like following
Event name: APPCRASH
Application name: x264.exe
Application version: 0.0.0.0
Application timestamp: 4d08623f
Module name: DGAVCDecodeDI.dll
Module version: 0.0.0.2025
Module timestamp: 4d2542b7
Exception code: c0000005
Exception offset: 000057c5
OS version: 6.1.7600.2.0.0.256.1
Language code: 1049
Additional info 1: 0a9e
Additional info 2: 0a9e372d3b4ad19135b953a78882e789
Additional info 3: 0a9e
Additional info 4: 0a9e372d3b4ad19135b953a78882e789
Re: DGAvcDecDI crashes when playing mkv-file
Sorry I do not currently have Win7.
Can't you provide a text dump?
Also, what happens with your script if you just load it into VirtualDub and play it?
Can't you provide a text dump?
Also, what happens with your script if you just load it into VirtualDub and play it?
- prokhozhijj
- Posts: 30
- Joined: Sat Jan 01, 2011 11:16 am
Re: DGAvcDecDI crashes when playing mkv-file
How it can be done? I'll do it, of course.admin wrote: Can't you provide a text dump?
admin wrote: Also, what happens with your script if you just load it into VirtualDub and play it?
It crashes in very beginning. I've attached text file with crash info.
- Attachments
-
- crashinfo.zip
- (2.03 KiB) Downloaded 1111 times
Re: DGAvcDecDI crashes when playing mkv-file
That's strange because you say it crashes at the beginning but the dump shows decoder_flush() in the call stack and that is not called until end of stream.
Can you test on a WinXP SP3 system?
I plan to install Win7 soon on my old machine. I will test there when it is done.
Can you test on a WinXP SP3 system?
I plan to install Win7 soon on my old machine. I will test there when it is done.
- prokhozhijj
- Posts: 30
- Joined: Sat Jan 01, 2011 11:16 am
Re: DGAvcDecDI crashes when playing mkv-file
I have no time to notice any video when it crashes.admin wrote:That's strange because you say it crashes at the beginning but the dump shows decoder_flush() in the call stack and that is not called until end of stream.
I can try under virtual machine only. But I don't think that it will be relevant testing because of different hardware list that virtual machine has. If you count that it will be useful than I'll try without any doubt.admin wrote: Can you test on a WinXP SP3 system?
Of course, I can wait until you install new OS. There is no any hurry. Just let me know about this event, please.admin wrote: I plan to install Win7 soon on my old machine. I will test there when it is done.
Re: DGAvcDecDI crashes when playing mkv-file
I'm installing Win7 on one of my rigs right now. It may take me some time to get DiAVC installed and registered, etc.prokhozhijj wrote:Of course, I can wait until you install new OS. There is no any hurry. Just let me know about this event, please.