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

Access violation exeption

Open danielzhelyazkov opened this issue 7 years ago • 3 comments

When client disconnect the send function throws an exception in 'cancel_timeout()' - 'std::unique_lockstd::mutex lock(timer_mutex);' row. The exception is: "Exception thrown at 0x09643473 (msvcp140d.dll) in mtsrv.dev.exe: 0xC0000005: Access violation reading location 0xDDDDDDDD."

This happens when client disconnected at the same time when server is sending data.

danielzhelyazkov avatar Feb 06 '18 13:02 danielzhelyazkov

Thank you for reporting this. Do you have the full backtrace?

Also, if you have a simple test case reproducing this access violation it would be great. I failed to reproduce this error on Linux and MacOS.

eidheim avatar Feb 06 '18 18:02 eidheim

I get this error on Windows 10 build 16299

SimpleWeb::SocketServerBase<boost::asio::ssl::stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::stream_socket_serviceboost::asio::ip::tcp > > >::Connection::cancel_timeout()

SimpleWeb::SocketServerBase<boost::asio::ssl::stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::stream_socket_serviceboost::asio::ip::tcp > > >::Connection::send(const std::shared_ptr<SimpleWeb::SocketServerBase<boost::asio::ssl::stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp,boost::asio::stream_socket_serviceboost::asio::ip::tcp > > >::SendStream> & send_stream, const std::function<void __cdecl(boost::system::error_code const &)> & callback, unsigned char fin_rsv_opcode)

danielzhelyazkov avatar Feb 07 '18 06:02 danielzhelyazkov

I'm no help here sadly since I do not use Windows, and to me it seems like a boost on Windows issue. Maybe upgrading boost will help? Hopefully, someone with Windows background can look into this.

eidheim avatar Mar 29 '18 09:03 eidheim