Reset streambuf pointers on stream error.