default value for default-format is -1

that's the 2nd try to fix CID:27835
make sure TAGLEN is usnigned long

so that all operations using it wil lbecome unsigned long, preventing overflows

hopefully fixing CID:27875
properly overriding std::bad_cast::what()

again trying to fix CID:27795
fixing ressource leak in early exit

CID:53708
hopefully fixing integer overflow

(unsigned long) should be able to hold (ushort*ushort*3)

CID:27876
using std::string instead of char*

CID:28029
protecting m_thread_running with mutex

CID:27890
proper variadic NOP macro

CID:27896
added printf argument

CID:53707
initializing WindowInfo::deskMode

CID:27972