SFML community forums

Help => Window => Topic started by: Flash619 on July 06, 2013, 07:22:25 pm

Title: Debug Win32 std::length_error (Debug Error Only) [Solved]
Post by: Flash619 on July 06, 2013, 07:22:25 pm
      Hello! :D

      I was toying around today with the opengl sfml window and noticed if  I tried to create the object in Debug, I receive the following message.

Quote
std::length_error at memory location

        I thought maybe it was just a incompatibility so I rebuilt the sfml Debug library with CMAKE and Visual Studio 11, and found myself still having the same issue. On a whim I switched to Release mode, and it works fine.

        Any Ideas? I tried several different methods of initializing the window, including just using a basic "non opengl window". At the moment the exact code is:

sf::Window glWindow(sf::VideoMode(800, 600), "Stuffs", sf::Style::Default, sf::ContextSettings(32));

         I can work in Release for now, but I was hoping to get some ideas as to why debug is failing.

         Thanks a bunch!
Title: Re: Debug Win32 std::length_error (Debug Error Only)
Post by: Laurent on July 06, 2013, 08:55:21 pm
Do you link to the debug libraries (-d suffix) in debug mode?
Title: Re: Debug Win32 std::length_error (Debug Error Only)
Post by: Flash619 on July 06, 2013, 09:53:46 pm
Do you link to the debug libraries (-d suffix) in debug mode?

Aha! I feel dumb.  ::)

My list of libs was:
Quote
sfml-graphics-d.lib
sfml-audio-d.lib
sfml-main-d.lib
sfml-network-d.lib
sfml-system-d.lib
sfml-window.lib

Happy you caught that! :) Thanks a bunch!