Well it does not matter the error is doing you a favor here. Your not, let me repeat that, not supposed to render avi files for any reason whatsoever. Its one of those things thats hard to see why, but let me try to explain it with something you understand which is a similar situation.
Let us assume you live in the top floor of a 6 story building, and you want to get down to the ground. The fastest way although for some reason very obviously something you do not want to do, is to jump out of the balcony. Well it so happens you can do it, even with no injuries, however the chances are very slim because you have no margin of error. This is why we tend to use either the elevator or the stairs instead.
Now rendering directly to avi-files is this same kind of leap of faith. Sure you can do it but its insanely dangerous. Why? Well simply because the Avi generation works like this:
it slaps the data to a tmp fileit then crunches this tmp file to a compressed AVI file and deletes the tmp. (it does it runtime so theres no way to continue the state somewhere mid of the operation)Now thats 2 steps (well actually its N*2 steps whete n is the mount of frames). Which brings us to the reason you don't render avi files. Theres actually nothing to gain from doing this all in one go, like jumping from your balcony you have no control over the process until your done. So what happens if your building had two out exits one to the street and the other to the garden. Well if you used the elevator you could decide which way to go in the lobby. Now the Avi rendering inherits this trait in may ways. What if:
You found out the compression rate is bad, and you want to change it to something more suitable?what if you want to pause or cancel the process mid run?
what happens if you crash mid render?What if you render with 2 computers in parallel with load averaging dispatcher?What happens if you want 3 different compressed versions of the same footage?what happens if you have a bad frame mid render?what if you need a floating point format, id, coverage or Z-depth?what if you need to render tiles?Well all of that is not just plausible, its common. So why would it not be saner to render out the images as step 1 and then crunch that to a avi? This is the kind of thing that end carers prematurely, because you swiftly go past a deadline and for example in commercials the deadline is no joke, slots are bought beforehand if you don't supply your footage so they can run it you get a blank sppt.
Now your probably just crashing the render, it happens but without rendering form command line, into individual files its hard to say where the error happens.
So in the end. Don't render avis, its bad for you. Its much saner to take the individual files and compress it into a video later (theres o such thing as video really its jsut abuch of frames anyway) in the game theres a lot of software that does it and does it better than maya can do even (multi pass compression), you can get atleast 3 good ones for free. Also you might luck out and get the reason fro the crash or at least 1/2 of the footages.