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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - 2bdkid

Pages: [1]
Turns out it was compiling for release with debug info. I deleted all the build files and switched to release mode and it's working fine now.

General / MSVC cookie instrumentation exception when in release mode
« on: April 30, 2020, 03:07:31 am »
I'm on MSVC (VC Community 2019) and I just built SFML from source, debug and release shared libraries.

I copied the example code from sf::Window documentation

int main() {
    // Declare and create a new window
    sf::Window window(sf::VideoMode(800, 600), "SFML window");
    // Limit the framerate to 60 frames per second (this step is optional)
    // The main loop - ends as soon as the window is closed
    while (window.isOpen()) {
        // Event processing
        sf::Event event;
        while (window.pollEvent(event)) {
            // Request for closing the window
            if (event.type == sf::Event::Closed)
        // Activate the window for OpenGL rendering
        // OpenGL drawing commands go here...
        // End the current frame and display its contents on screen

When I build and run in debug mode it appears to work. When I compile and run through release mode (specifically when I close the window) I get

Unhandled exception at 0x00007FF6D7C62104 in graphics.exe: Stack cookie instrumentation code detected a stack-based buffer overrun. occurred

This comes from gs_report.c, I'm not sure if this is part of SFML or windows. The call stack does not indicate how it got to this exception.

Pages: [1]