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

Author Topic: String iterators incompatibile  (Read 2576 times)

0 Members and 1 Guest are viewing this topic.

blojayble

  • Newbie
  • *
  • Posts: 19
  • whoa
    • View Profile
String iterators incompatibile
« on: August 30, 2013, 10:22:02 pm »
Hi.

I was making my SFML app, and everything was all right when i compiled it in release mode, but when I tried debug, an weird error occurred. It shows when app is already working and refers to xstring file:

Program: C:\Windows\system32\MSVCP110D.dll
File: D:\programmes\visual-studio-2012\VC\INCLUDE\xstring
Line: 250

Expression: string iterators incompatible
 

By debugging I found what triggers that error:

void ThreadedRenderWin::create_(sf::VideoMode mode_, const std::string& title_, unsigned long style_, const sf::ContextSettings& settings_)
        {
                eventThread.reset(new sf::Thread([&]()
                {
                        sf::Lock createLock(createMutex);
                        sf::RenderWindow::create(mode_, title_, style_, settings_); //<-- This is the problematic function
                        setActive(false);
                       
                //Rest omitted
                }));
                eventThread->launch();
        }

//////main.cpp

int main(){
        NG::ThreadedRenderWin RenderWin;
        RenderWin.create_(sf::VideoMode(800,680,32), "SFML");
       

//Event loop etc.


        return 0;
}
 


Still, in release there is no problem.
I don't know what is exactly wrong, so I put it in "General" category.

Any ideas? I use VS2012.

Thanks for every response!
0 bottles of beer on the wall,
0 bottles of beer!
Take one down, pass it around,
4,294,967,295 bottles of beer on the wall!

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: String iterators incompatibile
« Reply #1 on: August 30, 2013, 10:25:07 pm »
In debug mode, link to the Debug SFML libraries.
Laurent Gomila - SFML developer

blojayble

  • Newbie
  • *
  • Posts: 19
  • whoa
    • View Profile
Re: String iterators incompatibile
« Reply #2 on: August 30, 2013, 10:32:26 pm »
Well, I checked even twice and I'm linking proper libs.

tbh, my earlier "app" worked without problems in debug mode.
« Last Edit: August 30, 2013, 10:38:39 pm by blojayble »
0 bottles of beer on the wall,
0 bottles of beer!
Take one down, pass it around,
4,294,967,295 bottles of beer on the wall!

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: String iterators incompatibile
« Reply #3 on: August 31, 2013, 01:38:44 am »
Have you accidentally chosen /MD or /MT as your runtime library for debug mode?
Have you tried a clean rebuild?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

blojayble

  • Newbie
  • *
  • Posts: 19
  • whoa
    • View Profile
Re: String iterators incompatibile
« Reply #4 on: August 31, 2013, 03:11:51 pm »
Clean rebuild did not helped, also I checked my runtime lib and it is Multhi-Threaded Debug DLL (/MDd). Changing to other options does not fix anything of course.

@Well, later problem just disappeared, strange though.
« Last Edit: October 06, 2013, 08:53:53 pm by blojayble »
0 bottles of beer on the wall,
0 bottles of beer!
Take one down, pass it around,
4,294,967,295 bottles of beer on the wall!