I cannot debug my software because in debug version I have a message: :" A buffer overrun has occurred in [name].exe which has corrupted the program's internal state. Press break to debug the program or Continue to terminate the program.
For more details please see Help topic 'How to Debug Buffer Overrun Issues'.
After pressing 'Break' the debugger stops at _CRT_DEBUGGER_HOOK(_CRT_DEBUGGER_GSFAILURE);
in gs_report.c which tells me nothing.
I've noticed the strange thing in the output window just before this failure:
'recorder.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_5490cd9f\msvcp80d.dll', Symbols loaded.
'recorder.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.1433_x-ww_5cf844d2\msvcr80.dll', No symbols loaded.
Two versions of the CRT were loaded for my program. That was not normal.
I solved the problem already but I decided to post it. The cause was simple but quite hard to track. I will answer for it myself. Maybe somebody will use this solution in the future.