I posted this in General since it might be a VS2012 bug.
Basically, in any function that looks like this:
void func()
{
sf::RectangleShape foo; //can be any kind of shape
}
The code will crash upon exiting the func() function, because foo creates a stack corruption. This is with Visual Studio 2012, standard compiler, SFML2 RC (downloaded like a week ago).
It should be noted that the same happens when I used a dynamically allocated shape that I delete at the end of the function. But instead of a stack corruption, it will be a heap corruption, of course.
Any idea what could be the cause of this?
When debugging, it seems like the shape isn't initialized correctly. The vectors inside the attributes of sf::Shape have weird sizes (e.g. 6 and 12) and the values of their elements seem like "undefined behavior' kind of values.