Hi,
While switching from SFML 2.3.2 to
2.4.0 on a big project, I run in a rather weird crash...
Here is a simple version :
class Base
{
public :
virtual void foo(){};
};
class Deriv
: public Base
{
public :
virtual void foo(){
printf( "hello\n" );
sf::Font zFont;
zFont.loadFromFile( "depend/calibri.ttf" ); //ok!
sf::Text zText( "yolo", zFont );
zText.getGlobalBounds(); //crash
}
};
int main()
{
Deriv instance;
sf::Thread thread( &Deriv::foo, &instance );
thread.launch();
}
1. In this example, the program crash as sool as getGlobalBounds is called.
(More precisely, it only works fine if we remove this call - my debugger is lost and cannot help more)
2. When creating the thread, if we give Base::foo instead of Deriv::foo (which should be the same), I get an error on the SFML code.
error: must use '.*' or '->*' to call pointer-to-member function ...
Note : everything was fine on SFML 2.3.2I use Code::Blocks with
mingw32-gcc-4.9.2Have you a clue where it can come from ?
Can it be because of a bad library/compiler configuration ?