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

Author Topic: sf::String leads to weird program exit, and unable to debug.  (Read 2579 times)

0 Members and 1 Guest are viewing this topic.

Manux

  • Newbie
  • *
  • Posts: 23
    • View Profile
sf::String leads to weird program exit, and unable to debug.
« on: December 24, 2009, 06:27:53 pm »
Hello,
In my main I use the following code:
Code: [Select]
sf::Font f;
f.LoadFromFile("font.ttf",12);
sf::String fps_counter;
fps_counter.SetFont(f);
fps_counter.SetSize(12);


And then display is just App.Draw(fps_counter);

When I exit my program, something goes wrong and Windows cries:
"0x09839182 uses memory address 0x00000094, which cannot be read"
It's probably just a misplaced pointer... but then the window pops up several times(with different addresses), which gets annoying :(

I then tried to search for something wrong with gdb, and it crashed even earlier, whenever I called sf::String::SetText(), leaving an incomprehensible call stack(even with the -d libs and dlls)

Any thoughts?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
sf::String leads to weird program exit, and unable to debug.
« Reply #1 on: December 25, 2009, 10:24:23 am »
Hi

What compiler and OS do you use? Which version of SFML?
Laurent Gomila - SFML developer

VanEldo

  • Newbie
  • *
  • Posts: 12
    • View Profile
sf::String leads to weird program exit, and unable to debug.
« Reply #2 on: December 25, 2009, 02:44:25 pm »
Hi,

I experienced the same issue today as I wanted to add a FPS display (like Fraps does it) to my programm. It also happens when I want to exit it.

Here some information:
OS: Windows XP (Media Center Edition 2005)
IDE: Microsoft Visual C++ Express 2008
Version of SFML: 1.5 (latest).

Thanks for helping in advance!
VanEldo.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
sf::String leads to weird program exit, and unable to debug.
« Reply #3 on: December 25, 2009, 05:19:37 pm »
Quote
It also happens when I want to exit

This one is a know bug (there are tons of topics about it on the forum).
Laurent Gomila - SFML developer

 

anything