This error is very inconsistent -- most importantly it hangs mostly in Debug mode, but not in Release mode (makes it 90% of the time in Release). I'm probably just doing something wrong, please tell me what it is.
The code is freezing at header.cpp:102, because _vecbyte.size() is approximately 3e10:
The main.cpp and .txt file it reads is attached. Please tell me if I'm doing something wrong, or if 16-bit monochrome requires some different mode of operation I'm not seeing from the documentation.