I'm having a strange issue with my SFML project. When I create a pointer for a sf::Text then draw it to the window in the same function scope, it works. However, when I create the sf::Text and store in a class in one function then draw from that member variable, it breaks in Debug mode with the message: "Unhandled exception at 0x77cc15de in TestSfmlApp.exe: 0xC0000005: Access violation reading location 0xccccccd0." Below is my project info and a condensed test program that fails for me.
System Info:
SFML 2.0 for "Visual C++ 10 (2010) - 32 bits"
Windows 7 64-bit, VS 2010
VS 2010 settings:
dynamic libs according to
http://sfml-dev.org/tutorials/2.0/start-vc.phpTest program that crashes at line 42:
http://pastebin.com/L2XQeCdU(but works when I remove lines 29-31 and 65)
Not sure if I copied the right stuff, but here's the call stack:
ntdll.dll!77cc15de()
[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]
ntdll.dll!77cc15de()
ntdll.dll!77cb014e()
sfml-graphics-d-2.dll!5b80ad77()
sfml-graphics-d-2.dll!5b80cd56()
sfml-graphics-d-2.dll!5b80abae()
sfml-graphics-d-2.dll!5b80869a()
sfml-graphics-d-2.dll!5b805b2d()
sfml-graphics-d-2.dll!5b852986()
sfml-graphics-d-2.dll!5b8346e3()
> TestSfmlApp.exe!Game::Loop() Line 42 + 0x1a bytes C++
TestSfmlApp.exe!main(int argc, char * * argv) Line 66 C++
TestSfmlApp.exe!__tmainCRTStartup() Line 555 + 0x19 bytes C
TestSfmlApp.exe!mainCRTStartup() Line 371 C
kernel32.dll!770333aa()
ntdll.dll!77cd9ef2()
ntdll.dll!77cd9ec5()
I've been stuck on this for 3-4 days now, but haven't found anything on forums or tutorials. Everything I read suggests the VS 2010 settings are wrong for linking the libraries, but I followed that link above exactly. Any suggestions?