Forum de la communauté SFML

Aide => Fenêtrage => Discussion démarrée par: SmallPhil le Août 26, 2016, 09:41:45 pm

Titre: Exception à la création d'une sf::Window
Posté par: SmallPhil le Août 26, 2016, 09:41:45 pm
Bonjour,

lorsque j'utilise le debugger en version Debug sous Visual Studio, j'ai un message d'exception:

«Exception thrown at 0x77993923 (ntdll.dll) in test exception on startup sfml.exe: 0xC0000005: Access violation reading location 0x701F14C8.»

Le programme fonctionne bien quand je l'ignore, mais c'est tout de même gênant de toujours avoir ce message :/


Code minimal:
#include <SFML/Window.hpp>

int main()
{
        sf::Window window({ 640, 480 }, "test");
        return 0;
}
 

Call stack:
> test exception on startup sfml.exe!sf::priv::WglContext::setDevicePixelFormat(unsigned int bitsPerPixel) Line 398 C++
  test exception on startup sfml.exe!sf::priv::WglContext::createSurface(sf::priv::WglContext * shared, unsigned int width, unsigned int height, unsigned int bitsPerPixel) Line 535 C++
  test exception on startup sfml.exe!sf::priv::WglContext::WglContext(sf::priv::WglContext * shared) Line 90 C++
  test exception on startup sfml.exe!sf::priv::GlContext::globalInit() Line 182 C++
  test exception on startup sfml.exe!sf::GlResource::GlResource() Line 56 C++
  test exception on startup sfml.exe!sf::Window::Window(sf::VideoMode mode, const sf::String & title, unsigned int style, const sf::ContextSettings & settings) Line 60 C++
  test exception on startup sfml.exe!main() Line 5 C++


J'avais l'exception dans un projet sous SFML 2.3.2, j'ai donc essayé avec SFML 2.4.0, mais le résultat est le même :/ Est-ce un bug de SFML?

Merci!
Titre: Re : Exception à la création d'une sf::Window
Posté par: valentin_616 le Août 29, 2016, 09:26:08 pm
Salut
essai:
sf::Window window(sf::VideoMode(1280,720),"SFML window")
 
Titre: Re : Exception à la création d'une sf::Window
Posté par: SmallPhil le Août 30, 2016, 02:28:07 am
Même exception à la même ligne...