So, turned on my pc today thinking I we're gonna continue making my game but got denied by this error.

Have no idea how to fix it and why it's there at all, I haven't touched my project properties in days.

I start my game, he console pops up and just when I can see my games window blink it crashes and gives me this error :

Unhandled exception at 0x0FE62707 (sfml-system-d-2.dll) in SFML_Game.exe: 0xC0000005: Access violation reading location 0xCCCCCCD8.

It crahes at the 2nd line of SFML code it goes trough, which is :

sf::RenderWindow window(sf::VideoMode(1200, 840), "SFML - Box2D Engine 1.0");

And the first line being this :

sf::Clock deltaClock;

  • \$\begingroup\$ The problem lies very likely elsewhere in your code, it showed itself there. Is there any code before that(not even related)? Especially working with memory/raw pointers. \$\endgroup\$
    – wondra
    Dec 25, 2015 at 14:17
  • \$\begingroup\$ @wondra No, there's no other code except for the header. Though I haven't even changed the code and it worked fine yesterday? \$\endgroup\$
    – BiiX
    Dec 25, 2015 at 14:36

1 Answer 1


If absolutely nothing changed in your code there could have been a windows DLL update that changed the data addresses slightly exposing a pre-existing bug in sfml or elsewhere.

Windows (and other modern OSes) also randomize the address space for security reasons so your executable might happen to run fine one time and crash the next.

You will have to step through the code and look for an uninitialized pointer. Backtracking using breakpoints from the memory exception line.

Just to be safe run a memory tester such as http://www.memtest86.com/ on your system. It's easy and we'll eliminate defective RAM as a possible (even if unlikely) culprit. It's rare but I've had defective RAM before and system can still run "fine" for a surprisingly long time with bad memory.

But most likely it's an uninitialized pointer.

You can also try updating sfml if you're not on the latest version in case it was a bug that was fixed.

  • \$\begingroup\$ Started working today.... This is so weird... lol \$\endgroup\$
    – BiiX
    Dec 26, 2015 at 11:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .