When opening a avisynth script which contains DGSource() and the nvidia graphics card is not available (e.g. in a RDP session) two error messages are shown ("cuInit() failed" and "Failed to create video decoder(100)") and afterwards the calling application will close silently. I tried this with MeGUI and MPC-HC and both programs closed themself silently without a message.
I am using DGDecodeNV 2036 & Windows 7 64bit & Nvidia 460 GTX & driver 260.99
If possible:
- please change it at least in the way that the calling application is not closed
- additionally I prefer that the two error messages are not shown in a message box and instead are shown as avisynth error messages so that for example the processing of jobs in MeGUI is not paused
The main problem for me is the crashing/closing of the parent process. Is it possible to output "garbage" in the way that AviSynth refuses to play it so that it will exit in a normal way (with an avisynth error message)?
1) At first start you get two error popups that timeout after 5 seconds each.
2) After that green frames are returned with the text "CUDA Error!" written on them with no further popups.
This way the encode will finish but with bad video.
I don't know how to signal you that things went wrong so that you can abort the job. Any ideas? Remember, I cannot throw exceptions in GetFrame(). If you don't mind inspecting the video I could signal it there.
Thank you very much. The "parent app crashing" is gone and this was the important part of my report.
neuron2 wrote:I don't know how to signal you that things went wrong so that you can abort the job. Any ideas? Remember, I cannot throw exceptions in GetFrame(). If you don't mind inspecting the video I could signal it there.
Sadly I have no good idea. I was thinking about calling DGIndexNV.exe with a special parameter. When everything is fine (license file, driver available, whatever) then the exit code is 0, if something is wrong the exit code is different from 0. Maybe the DGI can passed to DGIndexNV as a parameter so that this file can be checked also. A calling app of an avisynth script with a DGI call can then before opening the script check if everything is fine. More or less this is some kind of workaround, but if there is no other method directly in AviSynth available, then this could be a possible solution.
I can do this: In the filter constructor try to open up CUDA and create a video decoder. If it fails, then throw you an exception. So you'll at least get an indication at filter startup that things are amiss. Can you catch an Avisynth exception and respond appropriately?