Batch Render - "Exception thrown by method called"

edlerman wrote on 5/18/2022, 2:42 PM

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Instance '0 C:' does not exist in the specified Category.
   at System.Diagnostics.CounterDefinitionSample.GetInstanceValue(String instanceName)
   at System.Diagnostics.PerformanceCounter.NextSample()
   at System.Diagnostics.PerformanceCounter.NextValue()
   at ScriptPortal.Vegas.DetailedRenderLibrary.DetailedRenderDialog.m_timer_Tick(Object sender, EventArgs e)
   at System.Windows.Threading.DispatcherTimer.FireTick(Object unused)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at ScriptPortal.Vegas.IProjectCOM.Render(Object punkArgs, Int32& status)
   at EntryPoint.DoRender(RenderArgs args)
   at EntryPoint.DoBatchRender(ArrayList selectedTemplates, String basePath, RenderMode renderMode)
   at EntryPoint.FromVegas(Vegas vegas)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at ScriptPortal.Vegas.ScriptHost.ScriptManager.Run(Assembly asm, String className, String methodName)
   at ScriptPortal.Vegas.ScriptHost.RunScript(Boolean fCompileOnly)
 

Strangely, it still allows the rendering process to continue... but i dare not click the "ok" button on this error incase it stops.

Many thanks to anybody who can assist.

Comments

edlerman wrote on 6/10/2022, 2:33 AM

Still getting this error. It doesn't end a render, but it does stop any processing of any future regions.

 

So, if it stops after region 2, of 5, then 3-5 don't get rendered.

edlerman wrote on 6/10/2022, 2:33 AM

marcinzm wrote on 6/11/2022, 3:58 PM

I submitted a ticket to Vegas developers, but they replied me that they will not be investigating the issue in the 3rd party C# applications which they didn`t wrote, so @edlerman and me are in that case alone. :( The error is strongly related with rendering call in C# and it is not an error caused by other than Vegas developers. In that case, this error will never be fixed by Vegas developers. I am very sad for such Vegas support approach.

Last changed by marcinzm on 6/11/2022, 4:01 PM, changed a total of 3 times.

If you are bored, drink water, you will want to pee. -> Albert Einstein - my idol!

I am 42. I have been creating videos since 2009 (the date when my first daughter was born in). My first video software was Pinnacle, next one was Sony Vegas 8 (I am not sure if remember it correctly). I am also a developer and wedding movie operator and editor. For example: I have created an Android app which let me control Vegas Pro rendering progress level on Android smartphone. I created it for fun, because I also love programming. I also created my own plugin for Audio To Text feature specified usage from Vegas Pro 19. I created proxy creation plugin which uses multiple GPU threads (maximum 3) to create proxy files for Vegas Pro. I also written many others plugin/softwares which enhance my video editing, also wedding editing.

Camera/video camera: Sony FX3, Sony A7 III, Sony FDR AX 100, Canon 5D Mark III, GoPro Hero Black 7,8,9,10

Lenses for Sony: Tamron 28-75mm F/2.8 Di III , Sony 24mm gm 1.4 FE, Sony 20 mm G FE 1.8

Lenses for Canon: Canon EF 24-70 mm F/2.8 L USM, Canon 70-200 f/2.8 L

Drone: DJI Mavic 3 & DJI Phantom 4 Pro v2.0

 

Editing: Vegas Pro 20 (365) with a lot of third party plugins, also my own plugins written in C#

 

PC:

CPU: Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz   3.31 GHz

RAM: 128 GB

GPU: Nvidia RTX 2080 TI

storage: 4 SSD drives (including two M.2 flash drives) and two HDD drives

Windows system: 10 Home edition

edlerman wrote on 6/11/2022, 4:48 PM

I submitted a ticket to Vegas developers, but they replied me that they will not be investigating the issue in the 3rd party C# applications which they didn`t wrote, so @edlerman and me are in that case alone. :( The error is strongly related with rendering call in C# and it is not an error caused by other than Vegas developers. In that case, this error will never be fixed by Vegas developers. I am very sad for such Vegas support approach.

That's such a poor approach from them, as a yearly subscriber i have another 10~ months to go with this error stopping the program functioning as it's meant to.

Hopefully now they see it's not a unique one off case, they may change their mind and look to assist us further.

jetdv wrote on 6/11/2022, 7:24 PM

So this is a script that you wrote?

Other than the other case I mentioned, I have not heard of this issue before. Searching for that error message seems to lead to something totally unrelated - but maybe it's not?

3POINT wrote on 6/12/2022, 2:29 AM

I also never had any issues when using the Vegas batch render script. You can use it to batch render your timeline to several codecs or to batch render several regions on your timeline.

edlerman wrote on 6/12/2022, 10:58 PM

I also never had any issues when using the Vegas batch render script. You can use it to batch render your timeline to several codecs or to batch render several regions on your timelin

Batch render is what I’m using…

edlerman wrote on 6/12/2022, 10:58 PM

So this is a script that you wrote?

Other than the other case I mentioned, I have not heard of this issue before. Searching for that error message seems to lead to something totally unrelated - but maybe it's not?

No, the other poster wrote a script.

 

im using the batch render tool that comes with Vegas Pro.

3POINT wrote on 6/13/2022, 12:56 AM

 

 

im using the batch render tool that comes with Vegas Pro.

Me too and I never had any issues with that script as stated earlier.

Last changed by 3POINT on 6/13/2022, 12:57 AM, changed a total of 1 times.

3POINT, Theo Houben, Vegasuser since version 5 and co-founder and moderator of the Dutch Vegasforum https://www.vegas-videoforum.nl/index.php

Recware: DJI Osmo Pocket/Mavic Mini, GoproHero7Black, PanasonicFZ300/HCX909.

Software: Vegaspro365+Vegasaur, PowerDirector365, Davinci Resolve 18

Hardware: i910900k, 32GB, GTX2080super, 1920x1200 display

Playware: Samsung Qled QE65Q6FN, Philips 55PFL7108

jetdv wrote on 6/13/2022, 8:52 AM

they will not be investigating the issue in the 3rd party C# applications which they didn`t wrote,

Then this shouldn't apply to @edlerman as that script is included with VEGAS.

@edlerman

What are you render settings using Batch Render?

What format videos do you have on the timeline?

@marcinzm

Same questions, what format are you rendering to?

What formats do you have on the timeline?

Perhaps is a specific renderer that's causing the issue that most of us are not using?

marcinzm wrote on 6/13/2022, 9:08 AM

@jetdv I use Voukouder 3rd party codec which I installed extra in Vegas and render to 4K 25p HEVC mp4 file container. The issue never happens when I render only audio to wav format using my C# application.

Last changed by marcinzm on 6/13/2022, 9:11 AM, changed a total of 1 times.

If you are bored, drink water, you will want to pee. -> Albert Einstein - my idol!

I am 42. I have been creating videos since 2009 (the date when my first daughter was born in). My first video software was Pinnacle, next one was Sony Vegas 8 (I am not sure if remember it correctly). I am also a developer and wedding movie operator and editor. For example: I have created an Android app which let me control Vegas Pro rendering progress level on Android smartphone. I created it for fun, because I also love programming. I also created my own plugin for Audio To Text feature specified usage from Vegas Pro 19. I created proxy creation plugin which uses multiple GPU threads (maximum 3) to create proxy files for Vegas Pro. I also written many others plugin/softwares which enhance my video editing, also wedding editing.

Camera/video camera: Sony FX3, Sony A7 III, Sony FDR AX 100, Canon 5D Mark III, GoPro Hero Black 7,8,9,10

Lenses for Sony: Tamron 28-75mm F/2.8 Di III , Sony 24mm gm 1.4 FE, Sony 20 mm G FE 1.8

Lenses for Canon: Canon EF 24-70 mm F/2.8 L USM, Canon 70-200 f/2.8 L

Drone: DJI Mavic 3 & DJI Phantom 4 Pro v2.0

 

Editing: Vegas Pro 20 (365) with a lot of third party plugins, also my own plugins written in C#

 

PC:

CPU: Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz   3.31 GHz

RAM: 128 GB

GPU: Nvidia RTX 2080 TI

storage: 4 SSD drives (including two M.2 flash drives) and two HDD drives

Windows system: 10 Home edition

jetdv wrote on 6/13/2022, 9:20 AM

@marcinzm, could Voukouder be causing that? What if you render to one of the built-in renderers instead? Do you still see the issue? If not, it might be worth checking with Voukouder's author.

edlerman wrote on 6/13/2022, 9:42 AM

they will not be investigating the issue in the 3rd party C# applications which they didn`t wrote,

Then this shouldn't apply to @edlerman as that script is included with VEGAS.

@edlerman

What are you render settings using Batch Render?

What format videos do you have on the timeline?

Hello. Batch rendering regions using my standard YouTube Horizontal which i've attached. All .mp4 videos on the timeline.

Please confirm this is what you needed, thanks:

jetdv wrote on 6/13/2022, 10:45 AM

@edlerman, that's your project properties (under File - Properties).

When you open the batch render script, what option do you choose there?

Or, if you went to File - Render As, what would be the option you would choose there?

edlerman wrote on 6/13/2022, 12:03 PM

@edlerman, that's your project properties (under File - Properties).

When you open the batch render script, what option do you choose there?

Or, if you went to File - Render As, what would be the option you would choose there?


Let me screenshot the properties for it and attach below.

Last changed by edlerman on 6/13/2022, 12:04 PM, changed a total of 1 times.

Processor    Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz   3.41 GHz
Installed RAM    16.0 GB
Intel(R) HD Graphics 630
System type    64-bit operating system, x64-based processor
Windows 11 Home

edlerman wrote on 6/14/2022, 2:25 AM

edlerman wrote on 6/14/2022, 2:26 AM

That's the custom option i use.

3POINT wrote on 6/14/2022, 5:21 AM

What sense does it make to render FHD with this bitrate settings?

jetdv wrote on 6/14/2022, 7:12 AM

Here's what I use (I do use GPU Accelerated on the other machine - this one won't):

I agree your bitrate seems excessively high (which also means your files will be excessively large).

I'm wondering if you get the same error if you turn off GPU Acceleration?

What if you use CBR instead of VBR?

What if you reduce the bitrate?

Just trying to narrow down what might be causing the error to trigger and if it might be some specific setting.

At 14,000,000 I'm still getting about 1 Gig for every 10 minutes.

edlerman wrote on 6/14/2022, 8:45 AM

I'm very new to video editing - i used some YouTube walkthroughs to setup this set of specifics. I don't know what FHD means, i only had the bitrate that high due to the video guide saying it doesnt matter if its that high rather higher than lower?

I render these videos for upload on YouTube.

I'll try reducing the bitrate and see how it goes. Thank you :).

Last changed by edlerman on 6/14/2022, 8:49 AM, changed a total of 1 times.

Processor    Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz   3.41 GHz
Installed RAM    16.0 GB
Intel(R) HD Graphics 630
System type    64-bit operating system, x64-based processor
Windows 11 Home

3POINT wrote on 6/14/2022, 9:14 AM

FHD stands for Full High Definition video which is video with a 1920x1080 resolution and used to distinguish between HD video resolution which can be 1280x720 or higher.

Still I don't know for which purpose you're using the batch render script and why you're using a modified rendertemplate.

edlerman wrote on 6/14/2022, 9:30 AM

FHD stands for Full High Definition video which is video with a 1920x1080 resolution and used to distinguish between HD video resolution which can be 1280x720 or higher.

Still I don't know for which purpose you're using the batch render script and why you're using a modified rendertemplate.

I’m using batch render as I chop up a long 3 hour video into 5-8 segments and batch render allows me to leave it running through the night creating the files I need for the morning.
 

the videos are created for upload on YT.

3POINT wrote on 6/14/2022, 9:58 AM

Did you also create a region for each segment?