It's probably best to ask avs2bdnxml questions in the
avs2bdnxml thread, I only noticed this thread by chance.
I believe a 240 frame clip is generated when an AviSynth error occurs. Try opening your .avs file in a media player. Did put (some version of) vsfilter into your AviSynth plugin autoload folder? If not, need to load it manually in your script.