Looks like something weird is going on with your input script
(Or maybe, in the first pass, Avisynth simply crashed shortly before the end of the encode?)
What happens if you run this
multiple times? Does it always show the same info?
Code:
avs2yuv.exe -frames 1 "your_script.avs" NUL
Also, if you open the very same script in, e.g. VirtualDub, does it play fine, all the way to the end?