Simple-WebSocket-Server icon indicating copy to clipboard operation
Simple-WebSocket-Server copied to clipboard

errors only in Release mode

Open Lucamiz01 opened this issue 9 years ago • 7 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.

Lucamiz01 avatar Oct 04 '16 16:10 Lucamiz01

What OS and compiler are you using?

eidheim avatar Oct 04 '16 16:10 eidheim

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)

Lucamiz01 avatar Oct 04 '16 16:10 Lucamiz01

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.

eidheim avatar Oct 04 '16 16:10 eidheim

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.

Lucamiz01 avatar Oct 05 '16 08:10 Lucamiz01

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.

eidheim avatar Oct 05 '16 08:10 eidheim

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.

Lucamiz01 avatar Oct 06 '16 07:10 Lucamiz01

Happy to hear you are getting closer to a solution.

eidheim avatar Oct 06 '16 11:10 eidheim