I'm going to kill me. This crash was due to a simple division by 0 in my FPS counter. ahah 
I discover it after compiling debug libraries and try a debug...
At least I discover some QT functionnalities...
last_time = current_time;
current_time
= QTime::currentTime();
elapsed_time = (current_time.second()*1000 + current_time.msec()) - (last_time.second()*1000 + last_time.msec());
[B]this->fps = 1000 / elapsed_time;[/B]
last_time = current_time;
current_time = QTime::currentTime();
elapsed_time = (current_time.second()*1000 + current_time.msec()) - (last_time.second()*1000 + last_time.msec());
[B]this->fps = 1000 / elapsed_time;[/B]
To copy to clipboard, switch view to plain text mode
I don't exactly know why elapsed_time could be set to 0, at least I know it was (only) happening on some resize events.
I'm guessing it's due to the functions call order ; my guest is that :
-when a resize event happens it stops the current function execution
-the rest of the code is not executed until and of resize
-... i don't know
i just did a test and of course, during a resize, my infinite loop function is not called
whatever, this solved my problem :
if(elapsed_time <= 0)
this->fps = 0;
else
this->fps = 1000 / elapsed_time;
if(elapsed_time <= 0)
this->fps = 0;
else
this->fps = 1000 / elapsed_time;
To copy to clipboard, switch view to plain text mode
so simple....
I'm gonna check on your tips in the following days spud, thanks for helping !
If it works I will improve a LOT my application.
A little preview right there:
Bookmarks