My game work well when run it in debug mode (with and without debugging it) but when i switch to release i get some errors! I work on VS 2010!
Code:
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow App(sf::VideoMode(1024,768,32),"Test TEST tt",sf::Style::Close);
App.SetFramerateLimit(300);
sf::Font TestFont;
//TestFont.LoadFromFile("segoesc.ttf");
while(App.IsOpen()){
sf::Event events;
while(App.PollEvent(events)){
if (events.Type == sf::Event::KeyPressed && events.Key.Code == sf::Keyboard::Escape)
App.Close();
}
App.Clear(sf::Color::Blue);
App.Display();
}
return EXIT_SUCCESS;
}
So i made a little code for testing it and i discovered this:
sf::RenderWindow give this error when has a space into the title:
Eccezione non gestita a 0x7592feb8 in test.exe: 0xC0000005: Violazione di accesso nella lettura del percorso 0x53455420.
Error pointer:
-> sf::RenderWindow App(sf::VideoMode(1024,768,32),"Test TEST tt",sf::Style::Close);
If i put a title like "Test" it works well!
Now the second error. When i try to load a font i get this error:
Eccezione non gestita a 0x571c37ef (msvcr100d.dll) in test.exe: 0xC0000005: Violazione di accesso nella lettura del percorso 0x2e637365.
Error pointer in fopen.c:
-> if(*file==_T('\0'))
{
errno=EINVAL;
return NULL;
}
How can i fix these errors?