"Run-Time Check Failure #2 - Stack around the variable 'window' was corrupted." is the full error message. Couldn't fit it into the title. Don't think I need to from my Googling. Quite a few instances of the same error pop up.
When does this error occur and with what code?
Code is right from the test at the end of the Visual Studio tutorial:
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
sf::CircleShape shape(100.f);
shape.setFillColor(sf::Color::Green);
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
window.clear();
window.draw(shape);
window.display();
}
return 0;
}
I get the error when I hit the X to close the little window. First time it came up I hit continue instead of break and I can't end the program anymore xD. Had to reboot to fix that. No big deal. Hitting break allows me to kill it thankfully.
Now here is where it gets interesting I think: two solutions come up in my Googling:
Either A: I am using a version of the library compiled for a different compiler.
or B: I have mixed up my linking between debug and release.
A: Yes, I am running Visual Studio 2013 (update 4). However, I compiled the libraries myself mere minutes before, so that should not be the problem.
B: I keep checking *checks again*... yep, I got the linking right. -d to debug, no -d to release.
I will note that release builds do not throw this error message, but that's because the release build lacks the error handling the debug one does I think. I could be wrong though.
So, any thoughts? Need any more information? I am happy to provide.