Monday, 2 September 2013

fputws to stderr crashes app

fputws to stderr crashes app

I'm kind of confused if I'm not doing anything wrong, but following code:
#include <stdio.h>
int main()
{
fputws(L"this fails.\n", stderr);
return 0;
}
crashes for me with the following exception:
Unhandled exception at 0x56BEDABC (msvcr110.dll) in errors.exe:
0xC0000005: Access violation reading location 0x000000A4.
I'm using MSVC2012.
I tried to
switch debug/release modes (both crashes)
stderr/stdout (both crashes)
switch x86/x64 (both crashes)
add /subsystem:console to linker (crashes)
compile in MSVC2010 - it works!
I've got following version:
Microsoft Visual Studio Professional 2012
Version 11.0.50727.1 RTMREL
Microsoft .NET Framework
Version 4.5.50709

No comments:

Post a Comment