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

Author Topic: SFML2 Exception while drawing sf::Text  (Read 2111 times)

0 Members and 1 Guest are viewing this topic.

Genion

  • Newbie
  • *
  • Posts: 2
    • AOL Instant Messenger - Hoppers+Feld+10
    • View Profile
SFML2 Exception while drawing sf::Text
« on: December 30, 2010, 10:53:47 pm »
Hi,

I just wanted to upgrade my project from SFML1.6 to SFML2.0. It throws an exception (Vector iterator not dereferencable)

I compiled the latest snapshot from the SVN and compiled it with VS10 as a static library.

Code: [Select]
#include <SFML/Graphics.hpp>

int main(void)
{
    sf::RenderWindow app;
    app.Create(sf::VideoMode(800, 600), "Foobar");
    sf::Font font;
    font.LoadFromFile("comic.ttf");
    sf::Text text("Foobar");
    while(app.IsOpened())
    {
        sf::Event evt;
        while(app.GetEvent(evt))
        {
            if(evt.Type == sf::Event::Closed)
                app.Close();
        }
        app.Clear(sf::Color::Magenta);
        app.Draw(text); // Here it happens
        app.Display();
    }
}


Is it a bug or did I miss something?

Thanks
Cookie addicted Genion

Yelnats

  • Newbie
  • *
  • Posts: 27
    • View Profile
SFML2 Exception while drawing sf::Text
« Reply #1 on: December 30, 2010, 11:11:31 pm »
Same problem for me. Oh and do the latest ATi drivers work with SFML 2 yet?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
SFML2 Exception while drawing sf::Text
« Reply #2 on: December 30, 2010, 11:24:54 pm »
It was fixed before you posted your message ;)

Quote
Oh and do the latest ATi drivers work with SFML 2 yet?

Nop.
Laurent Gomila - SFML developer

Yelnats

  • Newbie
  • *
  • Posts: 27
    • View Profile
SFML2 Exception while drawing sf::Text
« Reply #3 on: December 30, 2010, 11:33:34 pm »
Thanks Laurent.

Genion

  • Newbie
  • *
  • Posts: 2
    • AOL Instant Messenger - Hoppers+Feld+10
    • View Profile
SFML2 Exception while drawing sf::Text
« Reply #4 on: December 30, 2010, 11:42:12 pm »
Damn... don't be so fast! :lol:
Thanks for fixing.

OniLinkPlus

  • Hero Member
  • *****
  • Posts: 500
    • View Profile
SFML2 Exception while drawing sf::Text
« Reply #5 on: January 01, 2011, 02:14:07 am »
Laurent is so fast that he can read a bug report, then fix it before said bug report is posted, in that order.
I use the latest build of SFML2

 

anything