I've had TMPGenc crash out encoding some formats, or have other misc issues. Quite often what I do is re-encode the whole damn thing in either DivX or Indeo etc using virtualdub to remove any bugs in the file and put it in a TMPGenc-friendly format.
You'll need appropriate CODECs, of course. And with all re-encoding of lossy formats you'll lose a bit of quality - sometimes noticable sometimes not.
You'll find virtualdub and friends (for free) on sourceforge.net