Bug report - File locking Vegas 18 (Builds 284,334,373,434,482,527)

mickhardy wrote on 10/7/2020, 8:46 PM

Vegas 18 is maintaining a file lock on media inserted using the scripting engine even after the project is closed.

If anyone can think of a workaround, it would be greatly appreciated.

I've simplified the steps to reproduce it.

  1. Save the included script as "C:\Program Files\VEGAS\VEGAS Pro 18.0\Script Menu\FileLockingIssue.cs"
  2. Copy an mp4 file to "C:\Test\Test.mp4"
  3. Open Vegas 18
  4. Run the script | Tools | Scripting | FileLockingIssue
  5. Close the project. There is no need to save.
  6. Try and delete "C:\Test\Test.mp4"
  7. The file lock will not be released until Vegas 18 is closed

This does no affect Vegas 9 through 17

using ScriptPortal.Vegas;

public class EntryPoint
{
    public void FromVegas(Vegas vegas)
    {
        const string testMedia = @"C:\Test\Test.mp4";
        var videoTrack = new VideoTrack();
        vegas.Project.Tracks.Add(videoTrack);
        videoTrack.AddVideoEvent().AddTake(new Media(testMedia).GetVideoStreamByIndex(0));
    }
}

EDIT: This issue only occurs when Vegas uses "compoundplug.dll" to decode the media file.

Comments

altarvic wrote on 10/8/2020, 7:17 AM

I confirm

@VEGASDerek

 

VEGASPascal wrote on 10/8/2020, 9:06 AM

@mickhardy @altarvic I am not able to reproduce this issue on two different systems.

mickhardy wrote on 10/8/2020, 5:23 PM

@VEGASPascal, I tested on a vanilla Windows 10 virtual machine with only Vegas 18 before posting. Are you closing just the project? Shutting Vegas down releases the lock. Are you on Windows 10 with all updates?

VEGASPascal wrote on 10/9/2020, 7:20 AM

@mickhardy @altarvic Win10 version 2004, VEGAS Pro 18 version 344

mickhardy wrote on 10/9/2020, 11:27 PM

@VEGASPascal, thanks so much for looking into this. It took me a while to work out what the difference was for you. When I followed your video, it worked fine. The difference is renaming the file while the project is still open. This clears the lock. I thought it was playing and stopping the media but this isn't enough to clear the lock. It's the actual step of renaming the file before closing the project.

VEGASPascal wrote on 10/10/2020, 5:32 AM

@mickhardy No difference on my side (doing the same steps like you in the video).

mickhardy wrote on 10/10/2020, 7:20 PM

I can't reproduce the issue on my notebook.

I wonder what the difference is. I tried a heap of different mp4 files, including one rendered by Vegas and it always locks, every single time on my main computer, and on a clean virtual machine with default settings.

My main computer is stuck at Win 10 1909 due to a driver issue but my notebook and the virtual machine are both 2004. Vegas 9 through 17 don't have the issue on the same computer.

It locks using avi, and mp4.

It doesn't lock using wmv files.

It doesn't lock using audio only files mp3, and flac after switching video to audio in the script.

I also tried inserting both video and audio streams from the mp4 files but they still lock every single time.

mickhardy wrote on 10/10/2020, 9:50 PM

The problem arises when the decoder uses "compoundplug.dll" instead of "so4compoundplug.dll".

On the virtual machine, the "compoundplug.dll" decoder is always used. I'm not sure why.

On my main computer this was caused by enabling legacy AVC decoding on the File I/O tab. This option was on due to past issues with the so4 decoder and because the first time this locking issue arose, there were m2ts files involved, which always appear to use the "compoundplug.dll" decoder.

 

altarvic wrote on 10/11/2020, 3:17 PM

The problem arises when the decoder uses "compoundplug.dll" instead of "so4compoundplug.dll".

Exactly! Good to know, thanks!

My test.mp4 (from DJI) was opened by mxhevcplug.dll and it also locked.

 

mickhardy wrote on 11/6/2020, 1:48 AM

Still broken in Vegas 18 Update 2 (build 373)

alifftudm95 wrote on 11/6/2020, 3:39 AM

I had this similar issue recently, file cant be deleted

Editor and Colorist (Kinda) from Malaysia

MYPOST Member

PC DEKSTOP

CPU: Ryzen 9 5900x

GPU: RTX3090 24GB

RAM: 64GB 3200MHZ

MOBO: X570-E

Storage:

C DRIVE NVME M.2 1TB SSD GEN 4

D DRIVE NVME M.2 2TB SSD GEN 4

E DRIVE SATA SSD 2TB

F DRIVE SATA SSD 2TB

G DRIVE HDD 1TB

Monitor: Asus ProArt PA279CV 4K HDR (Bought on 30 August 2023)

Monitor: BenQ PD2700U 4K HDR (RIP on 30 August 2023)

 

 

 

mickhardy wrote on 2/3/2021, 9:46 PM

Still broken in Vegas 18 Update 3 (build 434)

mickhardy wrote on 3/24/2021, 9:57 PM

Still broken in Vegas 18 Update 4 (build 482)

mickhardy wrote on 5/23/2021, 2:33 AM

Still broken in Vegas 18 Update 5 (build 527)