Hi jonny...
I know it is strange, but I'm pretty certain that it has nothing to do with your app, because I also get the error whenever I try to close Vdub when an AVS script was opened. I can process an AVS script via VDub, also encode via CCE and TMPGEnc, no problems however. But also when i preview an AVS script with WMP it crashes when I close the program.
Must be some kind of DLL missing or being corrupt. racer99 answered my PM and he said that after a re-installation of WinXP Pro the problem was gone... Guess I have to clean my system too...