eidheim / Simple-WebSocket-Server

A very simple, fast, multithreaded, platform independent WebSocket (WS) and WebSocket Secure (WSS) server and client library implemented using C++11, Boost.Asio and OpenSSL. Created to be an easy way to make WebSocket endpoints in C++.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

errors only in Release mode

Lucamiz01 opened this issue · comments

Hi,
we are developing a Secure WebSocket Server making use of this brillant project. It works fine receiving and sending messages to various clients, but, when the time-delay of received messages goes down to less than 300 ms (or more) it starts behaving strangely, giving out errores and closing the connection. The strangest thing is that it fails only when in release configuration (in Debug Mode no error whatsoever). It seems to be non related to the part of the server we wrote. The error codes are the following:
10053
10054
336151548.

What OS and compiler are you using?

This is Windows 8 (but on Windows 10 we observe the same behaviour) and the compiler is Visual Studio's 2015 one. So Microsoft (R) C/C++ Optimizing Compiler Version 19 (both in x86 or x64)

Could you try reproduce the errors on Linux using g++? Just to rule out that it us not a Windows issue. Most server libraries are typically not very well tested on Windows. Also try compile 64 bit if you are not doing so already.

We tried 64 bit already with no success (same problem). We are trying to compile in g++ but I think we have some non-cross platform code inside (maibe we can try to cut that out). Still trying.

Thank you, and since it might be a VC release build issue, you could try enable/disable the various flags that are added when you choose release build. That is, to see what compiler flag(s) is causing the issue.

It turns out it is some sort of memory corruption due to another package we were using. We are still investigating the problem anyway. Possibily the memory initialization in the Debug Mode was enough to make it work in Debug Mode and not work in Release.

Happy to hear you are getting closer to a solution.