Just recently Tobias Jakobi reported the bug that bs1770gain ended with an error message under certain circumstances when trying to calculate true peak, i.e. using option -t. Finally we figured that the resampler used for upsampling was incomplete switched to the new sample format. After having fixed this, the runtime error was still in place, and Tobias proposed the solution. Thanks a lot Tobias!