1
Window / OSX: GetFrameTime() causes SIGABRT signal
« on: October 30, 2009, 07:52:14 pm »
GetFrameTime() causes a SIGABRT signal after Close() was called on the render window.
the signal is recieved at the return of test() and kind of crashes the application.
the signal is recieved at the return of test() and kind of crashes the application.
Code: [Select]
int test()
{
// Create the main window
sf::RenderWindow App(sf::VideoMode(800, 600, 32), "SIGABRT");
App.PreserveOpenGLStates(true);
// Start main loop
while (App.IsOpened())
{
// Process events
sf::Event Event;
while (App.GetEvent(Event))
{
if (Event.Type == sf::Event::Closed) App.Close();
}
App.Clear();
// fps
char buffer[16];
int fps = 100;
fps = int(1.f / App.GetFrameTime()); // this causes the signal
sprintf(buffer, "fps = %d", fps);
App.Draw(sf::String(buffer));
App.Display();
}
return EXIT_SUCCESS;
}
int main()
{
return test();
}