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

Author Topic: Error When Closing Window  (Read 10637 times)

0 Members and 1 Guest are viewing this topic.

bullno1

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Error When Closing Window
« Reply #15 on: March 11, 2009, 12:51:03 pm »
I got this error too. It traces back to SFML, the part where the default font is deleted.

When I use the static libraries, I got no more problem.

Sazabi02

  • Newbie
  • *
  • Posts: 10
    • Yahoo Instant Messenger - nojj02
    • View Profile
    • Email
Error When Closing Window
« Reply #16 on: March 11, 2009, 03:20:36 pm »
Quote from: "dunce"
I think this error may occur if you use a string with the default sfml font. Try to use another font, say Arial.ttf.
Code: [Select]
 sf::Font font;
  font.LoadFromFile("Arial.ttf", 32));
  sf::String text;
  text.SetFont("Arial.ttf");
  text.SetText("My String");

In this case the font file Arial.ttf must be in the same folder with your executable file.


If I use that code the error still pops up. But when I modify it like this:

Code: [Select]
 sf::Font font;
  font.LoadFromFile("Arial.ttf", 32));
  sf::String text("", font);
  text.SetText("My String");


the error goes away. In a way, you're right. The SFML default font is the cause of the problem. So if you never ever call it, no errors come up.

EDIT: Are there any fixes for this yet?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Error When Closing Window
« Reply #17 on: March 11, 2009, 03:34:40 pm »
Laurent Gomila - SFML developer

Sazabi02

  • Newbie
  • *
  • Posts: 10
    • Yahoo Instant Messenger - nojj02
    • View Profile
    • Email
Error When Closing Window
« Reply #18 on: March 11, 2009, 03:42:32 pm »
Oh ok. That's nice to know. Thanks!

Laguna

  • Newbie
  • *
  • Posts: 11
    • View Profile
Error When Closing Window
« Reply #19 on: March 11, 2009, 06:40:48 pm »
For me, using the static libaries fixed the problem.
Great! :-)

But I'll remember the point with the default font.

thx for this great support! :D

So Far...

Laguna