SFML community forums

Help => Network => Topic started by: Fred_FS on August 28, 2011, 05:59:05 pm

Title: [SFML 2.0] IPAddress::ToString is not working
Post by: Fred_FS on August 28, 2011, 05:59:05 pm
Hello,

if I use the IPAddress::ToString function I allways get a "Debug Assertion Failed"-error.
The expression is: _CrtIsValidHeapPointer( pUserData )

My very simple code is:
Code: [Select]

int main( int argc, char* argv[] )
{
sf::IpAddress ip("192.168.1.1");
std::cout << ip.ToString();
return 0;
}


Do I use this function in a wrong way or is it maybe a bug in SFML 2.0?

Thanks for your help,
Fred
Title: [SFML 2.0] IPAddress::ToString is not working
Post by: Laurent on August 28, 2011, 07:18:59 pm
Make sure that you're not using release libraries in debug mode.

Does everything else works (window, graphics and audio modules)?
Title: [SFML 2.0] IPAddress::ToString is not working
Post by: Fred_FS on August 29, 2011, 03:56:25 pm
The other modules are working working well. And I compiled them all together. So I don't think, that I am using a wrong library.

Is my code working for you? If it does, there must be something wrong with my libs.
Title: [SFML 2.0] IPAddress::ToString is not working
Post by: Laurent on August 29, 2011, 08:40:31 pm
Yes it works for me (Windows 7, VC++ 2008, static libraries).
Title: [SFML 2.0] IPAddress::ToString is not working
Post by: Fred_FS on August 30, 2011, 11:12:39 am
Okay, thank you.

I used an old version of SFML 2, so there must have been the problem. I upgraded to a new one and now it's working.