Comments (12)
We use latest library version
from netcoreserver.
I have same problem with 7.0.0 version. Is there any progress about this issue?
Or could yo fix that in a different way? @ilsnk
from netcoreserver.
Same problem any update ?
from netcoreserver.
We have not yet had time to independently study this problem. We are still getting this error.
from netcoreserver.
I still keep getting this error. How can I handle this? @chronoxor
Unhandled exception. System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'length') at NetCoreServer.WebSocket.PrepareReceiveFrame(Byte[] buffer, Int64 offset, Int64 size) at NetCoreServer.TcpSession.ProcessReceive(SocketAsyncEventArgs e) at NetCoreServer.TcpSession.OnAsyncCompleted(Object sender, SocketAsyncEventArgs e) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
thank you for your help in advance
from netcoreserver.
@ilsnk , @selmanahatli, @suleymanbyzt, do you have a stable way to reproduce it?
from netcoreserver.
It'll great if we can reproduce it and try to fix. I cannot reproduce this on my side. And we have WebSockets server on production running for months without issues.
from netcoreserver.
Maybe we are not using the server implementation correctly?
We have NetCoreServer acting as a socket, sending/receiving messages through our own abstract handlers.
from netcoreserver.
We can assume that the problem may be in this code.
Processing goes ProcessReceive is executed by asynchronous callback, lock is executed in OnRecieve. But since the callback (ProcessReceive) is executed from asynchronous callback code, by executing Resize we ignore the lock object
TspSession.cs:602,
WebSocket.cs:322
What do you think?
from netcoreserver.
Still not reproduced on my side.
For each session receive buffer resize _receiveBuffer.Reserve(size + 1);
should be called after OnReceived(_receiveBuffer.Data, 0, size) -> WebSocket.PrepareReceiveFrame(buffer, offset, size) -> lock (WsReceiveLock) { ... }
is executed, so the buffer should be still valid in PrepareReceiveFrame.
from netcoreserver.
今天我也出现这个bug了,导致我的服务程序直接结束进程了.
我是刚开机时(服务程序加入了开机自动启动),马上打开浏览器通过网页请求我的服务出现问题的,
当时在网页上点击按钮请求服务时卡主了一会儿,然后我就使劲点了几下按钮继续请求,然后就弹出异常窗口后服务程序挂掉了...
然后我就重启我的服务程序,但是无论如何也出现不了这种异常了...
我重写了OnReceived如何用try...catch捕获异常,防止我的服务程序挂掉
from netcoreserver.
Perhaps due to an incorrect shift of payload bytes? I'm not sure what exactly the crash error is coming from, but is it worth rechecking this code?
![image](https://private-user-images.githubusercontent.com/44324620/324292904-71ecde97-6299-4cf2-a4a7-654acc5f69a0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTc2Nzk5NTIsIm5iZiI6MTcxNzY3OTY1MiwicGF0aCI6Ii80NDMyNDYyMC8zMjQyOTI5MDQtNzFlY2RlOTctNjI5OS00Y2YyLWE0YTctNjU0YWNjNWY2OWEwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjA2VDEzMTQxMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTMwNTYxMjRjNjAyOGRmZWVmNzg0OTdlYzgwM2I1YzI0ZTRiYjM2YjA1YmY4NmQxZTlkOTc3ODliYTQ3MDVmYmYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Jc4ojNgQnkC_ApDDVjRIbJWUJp8-vjOpErT39JLY4rY)
from netcoreserver.
Related Issues (20)
- Fix Bug: .NetFramework 4.8 ClientWebSocket Cann't Connect To .Net8 WsSession HOT 1
- Serialize and Deserialze HOT 3
- SimpleW : a RestAPI above NetCoreServer [not an issue but a library using NetCoreServer] HOT 1
- SslClient does not work in release mode
- Feature-Request: use BufferManager and SocketAsyncEventArgsPool to optimize memory
- netcoreserver is missing NuGet package README file
- WSS on Blazor WASM .NET 8
- 发送消息过快导致部分消息偶尔无法接受到 HOT 3
- Buffer-size in the 'OnReceived' methods can get too long HOT 3
- latency in reception of the first UDP frames (lazy?)
- Buffer.Reserve Wrong Condition? HOT 1
- TCP OnReceived(buffer, 0, received); HOT 1
- Cannot connect to WssChatServer for example
- TcpServer / TcpClient OptionKeepAlive have no effect HOT 2
- Cannot access a disposed object HOT 3
- Is there anyway to get WsOpcode in OnWsReceived?
- TcpSession.SendAsync() returns true even if a message fails to send. BytesSent also increases when send fails.
- lot of stupid internal definition
- Very good idea! Good luck!
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from netcoreserver.