5.0b breaks some scripts. Any workaround or fix?

johnmeyer wrote on 6/24/2004, 5:27 PM
There are two threads over in the Vegas forum:

5.0b breaks scripts

and

5.0b and Neon

that describe how the new 5.0b version breaks some scripts.

There was a workaround suggested in the Neon thread, but it didn't let me get around the problem with the Batch GUI script.

Other than downgrading to 5.0a, is there any other solution, other than to wait until 5.0c? (Sony you will fix this, right?)

Comments

roger_74 wrote on 6/25/2004, 2:16 AM
When you enumerate the templates, put a try-catch there and ignore the error. You won't lose any templates this way, because the offending templates aren't used.
SonyPJM wrote on 6/25/2004, 5:28 AM
Correct... the work-around is to try/catch your enumeration of templates... the offending templates are the default templates for MPEG 1 & 2 (typically used anyway).

We have fixed the mpeg plug-in and it be installed with the upcoming DVDA update.

Sorry for the bug.
johnmeyer wrote on 6/25/2004, 9:01 AM
Thanks. I just posted over in the Vegas forum before reading this. I'll put in the try/catch. Thanks!

[Update]: I added the try/catch and in the catch portion just had it advance to the next template. Script seems to work just fine now.
aefitzhugh wrote on 6/29/2004, 10:55 PM
If you want a single template and you know its name, there is a simpler alternative which works for me. Omit the enumeration, and just call the FindByName() method of the Templates collection. Here's how I modified DirectoryConverter.js:

var rt : RenderTemplate = renderer.Templates.FindByName(template_name);
if (null != rt){
return rt;
}
else {
throw "Templates.FindByName() could not find " + template_name;
}
aefitzhugh wrote on 6/30/2004, 10:46 PM
> If you want a single template and you know its name, there is a simpler
> alternative which works for me. Omit the enumeration, and just call the
> FindByName() method of the Templates collection.

I take it back.... For some reason, I will stop hitting the bug after a while of trying, whether or not I enumerate the Templates or call FindByName(). But both ways DO encounter the error (I assume FindByName() enumerates in its implementation so it makes sense). When starting afresh today I saw the same bug with FindByName(), even though it worked late yesterday, so I reverted to the workaround of catching the exception and skipping that template. That is the robust workaround.

-- Andy
jetdv wrote on 7/1/2004, 4:48 AM
For some reason, I will stop hitting the bug after a while of trying

It's probably because you manually went to the "File - Render As" screen. Once that screen was opened, the error on the scripting side no longer happens.