SFML community forums

Help => Window => Topic started by: Pipin06 on January 28, 2019, 07:33:52 pm

Title: [SOLVED] sf::Style::Fullscreen freezes my PC
Post by: Pipin06 on January 28, 2019, 07:33:52 pm
window.create(sf::VideoMode::getFullscreenModes()[0], "Test", sf::Style::Fullscreen);
This line freezes my PC. I can't Alt+F4 or Ctrl+Alt+Delete. Help!
Other styles work fine
Title: Re: sf::Style::Fullscreen freezes my PC
Post by: Laurent on January 28, 2019, 07:53:30 pm
OS? Version of SFML? Does the bug appear with a minimal application (window + event loop)?
Title: Re: sf::Style::Fullscreen freezes my PC
Post by: Pipin06 on January 28, 2019, 09:15:14 pm
OS? Version of SFML? Does the bug appear with a minimal application (window + event loop)?
Windows 7  SFML 2.5.1  Yes:
#include <SFML/Graphics.hpp>

int main()
{
        sf::RenderWindow window(sf::VideoMode::getFullscreenModes()[0], "SFML works!", sf::Style::Fullscreen);

        while (window.isOpen())
        {
                sf::Event event;
                while (window.pollEvent(event))
                {
                        if (event.type == sf::Event::Closed)
                                window.close();
                        if (event.type == sf::Event::KeyPressed && event.key.code == sf::Keyboard::Escape)
                                window.close();
                }

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

        return 0;
}

After a couple of seconds my anti-virus closes the program and auto-deletes it.
Title: Re: sf::Style::Fullscreen freezes my PC
Post by: eXpl0it3r on January 28, 2019, 09:28:54 pm
That's a so called false-positive. ;)

You may want to exclude your compilation directory (or the whole project directory for that matter) from Symantec's file scan.
Title: Re: sf::Style::Fullscreen freezes my PC
Post by: Pipin06 on January 29, 2019, 05:41:32 pm
You may want to exclude your compilation directory (or the whole project directory for that matter) from Symantec's file scan.
I added a sonar exception for my project folder, but my PC still freezes...  :'(
I am going to test it with music playing.
Title: Re: sf::Style::Fullscreen freezes my PC
Post by: Pipin06 on January 29, 2019, 06:03:03 pm
I am going to test it with music playing.
So... I added music to my project (Battlefield V Legacy Theme). My PC froze but the music was still playing.
After a few seconds, EXACTLY when the beat dropped... my PC unfroze! Everything is working again! :D

You may want to exclude your compilation directory (or the whole project directory for that matter) from Symantec's file scan.
Thank you!