Scripts causing VP instability?

michael-harrison wrote on 5/14/2020, 10:32 AM

I'd have thought I'd have heard about this before but I can't explain the problem I'm having any other way except that using the script below is causing (maybe) more instability in VP 17?

A few days ago I found and started using the script below as I had a lot of events and got tired of setting the fade in and out manually as I made changes to my project.

Since then I've had half a dozen occurrences where the preview window hangs. The UI is responsive, I can save my project but the preview window never updates and the frame number display stops updating except for the "skipping frames" indicator which keeps cycling through it's "..." cycle as though it's skipping frames.

I have to kill VP and it's dependent processes and restart.

I very literally have not changed anything else in my system or project except for the addition, removal and moving around of some stills. I'm not using any fx more complicated than pip and vignette and all fx are VP stock. According to Win10 the last update that was installed was on 4/15

I'm triggering the script using a customized Happy Otter icon.

I've never had this happen before where previewing hangs but the rest of the UI is responsive. Usually this kind of thing results is a white-screen hang if output stops.

I can't for the life of me think of a good reason why the script would cause a preview hang but that's the only change I've made since the hangs started.

Thoughts?

 

 

 

/**
 * This script will add a 1/2 second Fade In and out to all selected events.
 *
 * Written By: Edward Troxel
 * Copyright 2016 - JETDV Scripts
 * Modified: 08-26-2016
 * Converted to .CS and new Vegas namespace
 * FadeInOut1Second.cs
 **/

 

using System;
using ScriptPortal.Vegas;

 


public class EntryPoint
{
  Vegas myVegas;

  public void FromVegas(Vegas vegas)
  {
    myVegas = vegas;

    foreach (Track track in myVegas.Project.Tracks)
    {
        foreach (TrackEvent trackEvent in track.Events)
        {
            if (trackEvent.Selected)
            {
                trackEvent.FadeIn.Length = new Timecode(500);
                trackEvent.FadeOut.Length = new Timecode(500);
            }
        }
    }
  }
}

Last changed by michael-harrison

System 1:

Windows 10
i9-10850K 10 Core
128.0G RAM
Nvidia RTX 3060 Studio driver [most likely latest]
Resolution        3840 x 2160 x 60 hertz
Video Memory 12G GDDR5

 

System 2:

Lenovo Yoga 720
Core i7-7700 2.8Ghz quad core, 8 logical
16G ram
Intel HD 630 gpu 1G vram
Nvidia GTX 1050 gpu 2G vram

 

Comments

john_dennis wrote on 5/14/2020, 12:07 PM
/**
 * This script will add a one second Fade In and out to all selected events.
 *
 * Written By: Edward Troxel
 * Copyright 2016 - JETDV Scripts
 * Modified: 08-26-2016
 * Converted to .CS and new Vegas namespace
 *
 * 10-18-2018 - Version to fade out only by 500ms by Nick Hope
 *
 **/

using System;
using ScriptPortal.Vegas;public class EntryPoint

{
  Vegas myVegas;

  public void FromVegas(Vegas vegas)
  {
    myVegas = vegas;
    foreach (Track track in myVegas.Project.Tracks)
    {
        foreach (TrackEvent trackEvent in track.Events)
        {
            if (trackEvent.Selected)
            {
                trackEvent.FadeIn.Length = new Timecode(500);
                trackEvent.FadeOut.Length = new Timecode(500);  
            }
        }
    }
  }
}

@michael-harrison

This version has performed well for me and still does. Thanks @NickHope @jetdv

 

jetdv wrote on 5/15/2020, 12:15 PM

That specific script should definitely not cause stability issues in Vegas. It's a really simple script that simply scans all events on the timeline and changes the fade in/out of those that happen to be selected. Nothing at all that should cause instability.

michael-harrison wrote on 5/15/2020, 3:46 PM

@jetdv I agree but since I hadn't been using VP scripting much before that project and began using that script *a lot* and the problems cropped up around the time I started using the script... I had to ask about it.

System 1:

Windows 10
i9-10850K 10 Core
128.0G RAM
Nvidia RTX 3060 Studio driver [most likely latest]
Resolution        3840 x 2160 x 60 hertz
Video Memory 12G GDDR5

 

System 2:

Lenovo Yoga 720
Core i7-7700 2.8Ghz quad core, 8 logical
16G ram
Intel HD 630 gpu 1G vram
Nvidia GTX 1050 gpu 2G vram

 

walter-i. wrote on 5/16/2020, 3:14 AM
/**
 * This script will add a one second Fade In and out to all selected events.
 *
 * Written By: Edward Troxel
 * Copyright 2016 - JETDV Scripts
 * Modified: 08-26-2016
 * Converted to .CS and new Vegas namespace
 *
 * 10-18-2018 - Version to fade out only by 500ms by Nick Hope
 *
 **/

using System;
using ScriptPortal.Vegas;public class EntryPoint

{
  Vegas myVegas;

  public void FromVegas(Vegas vegas)
  {
    myVegas = vegas;
    foreach (Track track in myVegas.Project.Tracks)
    {
        foreach (TrackEvent trackEvent in track.Events)
        {
            if (trackEvent.Selected)
            {
                trackEvent.FadeIn.Length = new Timecode(500);
                trackEvent.FadeOut.Length = new Timecode(500);  
            }
        }
    }
  }
}

@john_dennis
Does this script work for you?
For me it generates the following error message:

john_dennis wrote on 5/16/2020, 9:41 AM

@walter-i.

It's been working without error messages. Language?

jetdv wrote on 5/17/2020, 4:55 PM

I would say that the error message is not coming from the script listed above as there is no "var" in this script and that is what the error message on the first line is complaining about. The script you are using has to be different than the text listed above. And, make sure it has a .cs extension instead of a .js extension.

walter-i. wrote on 5/18/2020, 3:12 AM

And, make sure it has a .cs extension instead of a .js extension.

@jetdv Bingo!!!!!!!!!

Many Thanks!