So I am trying to draw some simple text to a window, and when debugged, I get an assertion error that looks like this:
Debug Assertion Failed!
Program: C:\WINDOWS\SYSTEM32\MSVCP120D.dll
File: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\xtree
Line: 327
Expression: map/set iterators incompatible
For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.
after
window.draw(text);
Here is the code that causes the assertion:
void Editor::render(sf::RenderWindow& window) {
sf::RectangleShape shape(sf::Vector2f(500, 500));
shape.setPosition(50, 50);
shape.setFillColor(sf::Color(30, 30, 30));
window.draw(shape);
sf::Text text;
text.setFont(font);
text.setString("Test");
text.setFillColor(sf::Color::White);
text.setPosition(100, 100);
window.draw(text);
}
font is a member of the Editor class, and loadFromFile() is called in the constructor, and appears to work fine.
When built and ran in release mode, I get an access violation exception, if that means anything.