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

Author Topic: Debug Win32 std::length_error (Debug Error Only) [Solved]  (Read 3978 times)

0 Members and 1 Guest are viewing this topic.

Flash619

  • Full Member
  • ***
  • Posts: 142
    • View Profile
Debug Win32 std::length_error (Debug Error Only) [Solved]
« 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!
« Last Edit: July 06, 2013, 09:53:56 pm by Flash619 »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Debug Win32 std::length_error (Debug Error Only)
« Reply #1 on: July 06, 2013, 08:55:21 pm »
Do you link to the debug libraries (-d suffix) in debug mode?
Laurent Gomila - SFML developer

Flash619

  • Full Member
  • ***
  • Posts: 142
    • View Profile
Re: Debug Win32 std::length_error (Debug Error Only)
« Reply #2 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!

 

anything