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

Author Topic: Bug? sf::RenderWindow causes crash.  (Read 2325 times)

0 Members and 1 Guest are viewing this topic.

simAura

  • Newbie
  • *
  • Posts: 3
    • View Profile
Bug? sf::RenderWindow causes crash.
« on: October 03, 2010, 12:29:28 am »
I ran into some problems when running the program I compiled from the code in the tutorial for using rendering windows (http://www.sfml-dev.org/tutorials/1.6/graphics-window.php). The same problem seems to occur with non-rendering windows as well.

I've been through the Getting started tutorials and the sample code there works fine. For the rendering windows tutorial, the program compiles fine, but when running it, the program crashes at start up. By debugging I managed to narrow down the cause of crash to the following (line 17 in the sample code):
Code: [Select]
sf::RenderWindow App(sf::VideoMode(800, 600, 32), "SFML Graphics");

I'm using Microsoft Visual C++ 2010 Express, and using version 1.6 of SFML (for Windows Visual C++ 2008). Running the debugger gives the following error (translated into English):
Quote
Unhandled exception in app.exe at 0x7c84c3e3: 0xC0000005: Location: 0x61724720 could not be read (access violation)


So, I was wondering if it makes any difference that I'm using the VC++ 2008 SFML libraries with VC++ 2010 and that I should build them myself, or if this is some other bug.

panithadrum

  • Sr. Member
  • ****
  • Posts: 304
    • View Profile
    • Skyrpex@Github
    • Email
Bug? sf::RenderWindow causes crash.
« Reply #1 on: October 03, 2010, 02:23:53 am »
This is a very common question here. Yes, you have to recompile SFML with VS2010

simAura

  • Newbie
  • *
  • Posts: 3
    • View Profile
Bug? sf::RenderWindow causes crash.
« Reply #2 on: October 07, 2010, 07:30:04 am »
Late answer, but thanks for the help; it seems to work now, after recompiling SFML.

I did put effort into searching for any similar previous issues, but I must have overlooked them.