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

Author Topic: SFML 2.4 bugged?  (Read 2961 times)

0 Members and 1 Guest are viewing this topic.

Kanoha

  • Newbie
  • *
  • Posts: 19
    • View Profile
    • Email
SFML 2.4 bugged?
« on: November 20, 2016, 12:53:04 pm »
Hello everyone. I saw that sfml 2.4 was released a few days ago, so I decided to try it out. I installed it and copied/pasted the example code of the sfml tutorial to see if it works. But the console said that he failed to open window's context or something like that. So I thought that maybe, it was my installation of the new sfml that was wrong. I installed the sfml 2.2 again to test, but with the old version, it works perfecty. Am I just stupid, or is it a real problem?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
SFML 2.4 bugged?
« Reply #1 on: November 20, 2016, 01:28:54 pm »
SFML 2.4.1 was recently released and we aren't aware of any major issues. Did you use SFML 2.4 or 2.4.1? What was the example code? What was the error?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Kanoha

  • Newbie
  • *
  • Posts: 19
    • View Profile
    • Email
Re: SFML 2.4 bugged?
« Reply #2 on: November 20, 2016, 10:40:44 pm »
I tried the version 2.4.1, with this code:

#include <SFML/Graphics.hpp>

int main()
{
    sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
    sf::CircleShape shape(100.f);
    shape.setFillColor(sf::Color::Green);

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();
        }

        window.clear();
        window.draw(shape);
        window.display();
    }

    return 0;
}
 

It's directly taken from the learn page of this site. I use Code::Blocks with the dynamic version of the sfml. There was no compile errors, but instead of having a green CircleShape, the window was blank. In the console, it was written this message: "Failed to open window's context" that usually appears in multi threading or something like that. And the message was written over and over, at each frame.

jamesL

  • Full Member
  • ***
  • Posts: 124
    • View Profile
Re: SFML 2.4 bugged?
« Reply #3 on: November 21, 2016, 12:38:27 am »
where are your dlls

did you have any 2.2 dlls in your path or in system32 or anywhere else ?


eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: SFML 2.4 bugged?
« Reply #4 on: November 21, 2016, 12:53:17 am »
What OS are you using? If Linux, try updating. :)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Kanoha

  • Newbie
  • *
  • Posts: 19
    • View Profile
    • Email
Re: SFML 2.4 bugged?
« Reply #5 on: November 26, 2016, 12:50:37 pm »
My dlls are the good ones in the right place, because with the 2.2 version it works (if I replace the 2.4 dlls with those of the 2.2 of course). I'm using windows 7, not linux, sorry!

miroalex

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: SFML 2.4 bugged?
« Reply #6 on: January 31, 2017, 03:18:27 pm »
I receive the same result at the same code example (big amount of messages: "Failed to open window's context")
Windows 7, SFML-2.4.1, Eclipse, static library linking (or dynamically -all the same)

miroalex

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: SFML 2.4 bugged?
« Reply #7 on: January 31, 2017, 04:06:14 pm »
Now code example works (green circle)
Windows 7, Eclipse, SFML-2.2(GCC 4.9.2 MinGW (DW2) - 32-bit)
Static libraries(sfml-graphics-s,glew,sfml-window-s,sfml-system-s,opengl32,winmm.......). I had to add 'glew' after 'sfml-graphics'
Update 01.02.17:
Windows 7, Eclipse, SFML-2.2(GCC 4.9.2 MinGW (DW2) - 32-bit), also SFML-2.3 or SFML-2.4.0
Static libraries(sfml-graphics-s,sfml-window-s,sfml-system-s,opengl32,winmm.......). - Successful program's operation.
Only  SFML-2.4.1 cannot be used.
« Last Edit: February 01, 2017, 11:46:15 am by miroalex »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: SFML 2.4 bugged?
« Reply #8 on: February 01, 2017, 02:02:18 pm »
Well sure, since you use SFML 2.2 now you'll have to link glew.

"Failed to open window's context" sounds a bit odd, because usually that would be "failed to activate", or maybe we changed that just recently.

If you're using an Nvidia card, make sure to update your 5+ years old graphics driver and/or try using this PR.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

miroalex

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: SFML 2.4 bugged?
« Reply #9 on: February 01, 2017, 05:50:27 pm »
If you're using an Nvidia card, make sure to update your 5+ years old graphics driver and/or try using this PR.
Thank You!
After updating my Geforce card driver, my problem is gone.
And example-program works with SFML-2.4.1 now.

 

anything