Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Error while quitting the program  (Read 2028 times)

0 Members and 1 Guest are viewing this topic.

cdesseno

  • Newbie
  • *
  • Posts: 4
    • View Profile
Error while quitting the program
« on: March 09, 2010, 06:01:10 pm »
After playing with fonts, I get this message when I quit the app:
Quote

"The instruction at 0x092eafda referenced memory at 0x00000080 the memory could not be read."


Code: [Select]

sf::Font TextFont;

if (!TextFont.LoadFromFile("font.ttf"))
std::cout << "Error" << std::endl;

sf::String TextSpeed;

TextSpeed.SetFont(TextFont);
TextSpeed.SetSize(26);
TextSpeed.SetColor(sf::Color(0, 0, 0));
TextSpeed.Move(50.f, 360.f);



Code: [Select]

std::string StringSpeed;
std::stringstream out1;

int Speed = 10;

out1 << Speed;
StringSpeed = out1.str();
TextSpeed.SetText(StringSpeed);

App.Draw(TextSpeed);

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Error while quitting the program
« Reply #1 on: March 09, 2010, 06:24:41 pm »
This is a known bug.
Laurent Gomila - SFML developer

cdesseno

  • Newbie
  • *
  • Posts: 4
    • View Profile
Error while quitting the program
« Reply #2 on: March 09, 2010, 06:43:43 pm »
Any way to bypass it? When it happens?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Error while quitting the program
« Reply #3 on: March 09, 2010, 06:46:28 pm »
Yes, use the static libraries or never construct your sf::String instances with the default font.

Please first search the forum the next time you have a problem, this is a very well know bug ;)
Laurent Gomila - SFML developer

 

anything