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

Author Topic: [SOLVED] sf::Style::Fullscreen freezes my PC  (Read 4163 times)

0 Members and 1 Guest are viewing this topic.

Pipin06

  • Guest
[SOLVED] sf::Style::Fullscreen freezes my PC
« 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
« Last Edit: January 29, 2019, 06:03:37 pm by Pipin06 »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: sf::Style::Fullscreen freezes my PC
« Reply #1 on: January 28, 2019, 07:53:30 pm »
OS? Version of SFML? Does the bug appear with a minimal application (window + event loop)?
Laurent Gomila - SFML developer

Pipin06

  • Guest
Re: sf::Style::Fullscreen freezes my PC
« Reply #2 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.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11035
    • View Profile
    • development blog
    • Email
Re: sf::Style::Fullscreen freezes my PC
« Reply #3 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.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Pipin06

  • Guest
Re: sf::Style::Fullscreen freezes my PC
« Reply #4 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.

Pipin06

  • Guest
Re: sf::Style::Fullscreen freezes my PC
« Reply #5 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!