-
Notifications
You must be signed in to change notification settings - Fork 596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example chat error #66
Comments
0.0.0.0 is not the right address to connect to your server. 0.0.0.0 means "any local IP" and it's a valid thing to use when listening, but not when connecting 127.0.0.1 is the right IP to connect. I'll see what is causing that assert, but I suspect it is downstrram of that. |
I tried to connect to my server with 127.0.0.1 but the error still pops up. |
Nope, I haven't seen that one! I'll see if I can reproduce it. Is this a debug build or a release build? Just had an idea. Is the Windows firewall prompt coming up and stalling any of the socket calls?
Ah, ordinary (non-CMake) Visual Studio projects. That's something I know about! (I really don't know anything about CMake). For that, you would just link with the import library GameNetworkingSockets.lib and have the .dll nearby your executable when it runs. |
I got the error mentioned when I tried to run the example_chat.exe, the one created after building the project as explained in BUILDING.md. After that, I tried to build the example on my own in a VS project. On debug as well as on release, the client crashes on line 529: m_hConnection = m_pInterface->ConnectByIPAddress(serverAddr); with Access violation reading location; It seems that m_pInterface is a null pointer. |
Crash when trying to connect as client (server seems to run fine).
Project built on Windows 10, with CMake/VS 2019. it seems to crash on calling std::string::clear(). when trying to obtain a crypto key. |
Same Error |
I had the same error, it occurred because I mixed debug and release builds (my OpenSSL & protobuf were release builds, while my GameNetworkingSockets build was a debug build), so make sure you are building all your dependencies and GameNetworkingSockets with the same build type. I guess it's the same with #54. |
Nice yes that worked for me |
I followed all the steps in building section and then I wanted to start the chat example. I had to copy "GameNetworkingSockets.dll" and "libprotobuf.dll" next to the binary "example_chat" to make it run. I started my server with "example_chat server --port 9090" and the client with "example_chat client 0.0.0.0:9090". The server starts and logs the fact that is listening for incoming clients but the client fails with " 1.001678 \src\steamnetworkingsockets\clientlib\steamnetworkingsockets_lowlevel.cpp (875) : Assertion Failed: SDR service thread gave up on lock after waiting 1000ms. This directly adds to delay of processing of network packets!"
I am not sure what I am doing wrong. Hope you already encountered this problem :)
Also, can you explain briefly how do I link a new project with this library ?
P.S. I am working on windows and I used Visual Studio to build everything
The text was updated successfully, but these errors were encountered: