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

Author Topic: Unhandled exception error when trying to run?!?!  (Read 2937 times)

0 Members and 1 Guest are viewing this topic.

StormWingDelta

  • Sr. Member
  • ****
  • Posts: 365
    • View Profile
Unhandled exception error when trying to run?!?!
« 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.
I have many ideas but need the help of others to find way to make use of them.

Turbine

  • Full Member
  • ***
  • Posts: 100
    • View Profile
Unhandled exception error when trying to run?!?!
« Reply #1 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.

StormWingDelta

  • Sr. Member
  • ****
  • Posts: 365
    • View Profile
Unhandled exception error when trying to run?!?!
« Reply #2 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");
I have many ideas but need the help of others to find way to make use of them.