SFML community forums

Help => Window => Topic started by: StormWingDelta on December 29, 2011, 07:35:44 pm

Title: Unhandled exception error when trying to run?!?!
Post by: StormWingDelta on December 29, 2011, 07:35:44 pm
Code: [Select]
sf::VideoMode VMode(800, 600, 32);
sf::RenderWindow Window(VMode, "SFMLCoder Tutorial - Empty Window");
while (Window.IsOpened())
{
sf::Event Event;
while (Window.PollEvent(Event))
{
switch (Event.Type)
{
case sf::Event::Closed:
Window.Close();
break;
default:
break;
}
}
Window.Clear(sf::Color(0, 255, 255));
Window.Display();
}



Just wondering what is wrong with this code since for some strange reason I'm getting this error when it tries to run:

First-chance exception at 0x00000000 in SFMLTesting.exe: 0xC0000005: Access violation reading location 0x00000000.
Unhandled exception at 0x00000000 in SFMLTesting.exe: 0xC0000005: Access violation reading location 0x00000000.

My compiler than takes me to the RenderTarget.cpp and points out the line with this code on it GLCheck(glUseProgramObjectARB(0));


I'm using the 2.0 screanshot if anyone is wondering.

It would be nice to know what I've messed up here and how to solve this problem.
Title: Unhandled exception error when trying to run?!?!
Post by: Turbine on December 30, 2011, 06:17:06 am
2.0 snapshot*

Worth a try getting it from the Git repository and using Cmake to generate a make file.
Title: Unhandled exception error when trying to run?!?!
Post by: StormWingDelta on December 30, 2011, 04:36:14 pm
I'll try it and see.  Yes I meant snapshot and I have no clue why I said screenshot, I must have been thinking of something-else at the time. :lol:


It also seems that these two lines are the source of the issue.
Code: [Select]

sf::VideoMode VMode(800, 600, 32);
   sf::RenderWindow Window(VMode, "SFMLCoder Tutorial - Empty Window");