Hang when encoding 16-bit monochrome


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.

file attachments

Closed May 4, 2016 at 8:14 PM by vbaderks
Cannot reproduce with current release.


etotheipi wrote Oct 5, 2012 at 3:33 AM

Sorry, I couldn't figure out how to swap attachments. The first main.cpp was an older version I copied by accident from the wrong location. The second main.cpp is the correct one. On my system, it runs in release, but hangs in debug.