Vegas exits when I attach a debugger

Teetow wrote on 3/9/2007, 7:06 AM
I'm trying to debug a small script (copy / paste fadein / fadeout) and while it doesn't actually work as intended at the moment (nothing happens) it runs fine.

However, when I attach the Visual Studio debugger, set a breakpoint and run my script, Vegas exits ("with code 0"). This is insanely frustrating.

It doesn't happen with my other scripts, which have identical project settings (in the same solution) and use the same base library calls.

Is this familiar to anyone?

Comments

JohnnyRoy wrote on 3/11/2007, 8:57 AM
I haven't seen this before except if a script called Application.Exit(). ;-) What version of Vegas? What version Visual Studio? What script language?

If it's not proprietary, post the code and I'll try and run it in my debugger and see if I can reproduce the problem (or email it to my personally if you don't want to post it. Just click on my name to email)

~jr
Teetow wrote on 3/12/2007, 6:11 PM
Vegas 7
Visual Studio .NET (2005?)
C#.NET

I commented out the proprietary calls, and it still crashes. Really weird.

I'll post the code tomorrow.
_TJ wrote on 5/16/2007, 3:17 PM
There are some 3rd party plugins that do this. I've seen it happen with Audio Plugins from WAVES, and I know that they use a commercial solution for copy-protection, so there are likely other plugins that do the same.

tj
Teetow wrote on 5/22/2007, 11:54 AM
You mean my installed Plug-ins can cause a Vegas script to crash the application? Scary =)

I've been getting crashes on script execution aswell, unfortunately this time it's right in the middle of my proprietary code, which is about 5000 lines long. I'll report back if I can ever zoom in on what seems to cause it.
SonyPJM wrote on 5/30/2007, 2:14 PM
Does it crash when you are accessing or enumerating Renderers?
Teetow wrote on 6/18/2007, 3:58 PM
Hmm, I'm not sure. The library is pretty disorganized, but it's a possibility. Is there a known issue with this?
SonyPJM wrote on 6/19/2007, 11:45 AM
The Cineform codec is not friendly to the debugger... if you don't need it, you can try to temporarily rename the 'cfhd.dll' in your WINDOWS/system32 directory to something like 'cfhd.dll.bak'.
Teetow wrote on 6/19/2007, 12:02 PM
That might actually have worked! It's been a while since I touched my old codebase, but for whatever reason I can attach the debugger now.

Thanks a gazillion =)
Teetow wrote on 6/21/2007, 7:54 AM
Just confirmed this on my second computer.

Removing / renaming C:\WINDOWS\SYSTEM32\cfhd.dll allows you to attach a debugger without Vegas crashing to desktop.

Yay!
Teetow wrote on 9/20/2007, 4:39 AM
Update: This fix no longer works in Vegas 8. I'll have more in a moment, but there's something really, REALLY weird going on.
ForumAdmin wrote on 9/20/2007, 9:13 AM
cfhd.dll in now installed in the application directory. Does it help to rename that one?

Teetow wrote on 9/20/2007, 9:28 AM
Yeah, I did that as part of my installation process.

I couldn't see any pattern to it - most of my old scripts can be attached to and debugged, most of my new ones don't. I'll go at it again tomorrow.

Until then, I might take the opportunity to report that the internal Vegas script debugger seems very broken. Neither the C# or VB.NET "snippet makers" work, and the jscript one generates a C# snippet. It also seems to degenerate quickly - if I save or load a script, it suddenly won't run (I get a "catastrophic failure" exception =). If I paste working code into the debugger and run it, it works.

I'll try to get more details later.
Teetow wrote on 9/27/2007, 3:18 AM
OK, so here's some more info on the "exit on debug" thing.

The cfhd.dll hack doesn't work anymore, the behavior is the same regardless. There's no discernible pattern, except for one thing: It never happens with an empty Vegas project.

I just tried setting a breakpoint on a custom command, and if I invoke it with no project loaded, it hits. If I load a project and then run the command, Vegas exits to desktop.

The program '[2120] vegas80.exe: Managed' has exited with code 0 (0x0).

I know this report is close to worthless, but PLEASE try to fix this, it's slowing me down immensely. I can zip up the project and the code if you want.
Teetow wrote on 9/27/2007, 5:43 AM
OK, so I've managed to track it down further - the crash occurs even after having created an empty audio track in an empty Vegas project.

Edit: It was the Waves plugins - if I rename the Waves plugin directory, everything works just peachy. This really sucks, since it means I cannot debug in our actual production environment.

What can be done?