I'm not sure what I'm doing wrong, but whenever I exit my game, it crashes with a segfault.
Program received signal SIGSEGV, Segmentation fault.
In atioglxx!DrvReleaseContext () (C:\WINDOWS\system32\atioglxx.dll)
I know about the bug of using the default font, but I thought the way I'd gone around it should avoid this issue. The way I've set it up is, in my header file for the class I have:
sf::Font fFont;
sf::String sSquared;
sf::String sPow2;
sf::String sSubtitle;
And then in the class constructor I have:
if(!fFont.LoadFromFile("resources/Fonts/font.ttf", 56))
printf("Failed loading font");
sSquared = sf::String("text", fFont, 56);
// Other stuff to set up sSquared
sPow2 = sf::String("2", fFont, 24);
// Other stuff to set up sPow2
sSubtitle = sf::String("ssubtitle", fFont, 32);
// Other stuff to set up sSubtitle
If I comment out or remove all of the String and Font code, the game runs without issues.
If there is another way to do this that I'm not aware of, please correct me. Otherwise, I've got it so that the font is being loaded into the String directly into the constructor, like you said. The game loads fine and renders the text, but if I try to use "delete & fFont" or on any of the Strings, it will crash immediately; or, when you try to exit the game it will crash with a memory error about being unable to read\write the selected memory.
To pre-empt any questions about my setup, I'm using the dynamic libraries on Windows XP. My graphics drivers are up to date as far as I know, but the card itself is pretty outdated.
Any help in this matter is appreciated.