Null pointer exception
See original GitHub issueNot sure when it happens, but it does sometimes happen (v2.0.8): (it also completely crashes the application since it’s not caught with a try-except)
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NullReferenceException
at CryptoExchange.Net.Implementation.BaseSocket.Handle[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Collections.Generic.List1<System.Action
1<System.__Canon>>, System.__Canon)
at CryptoExchange.Net.Implementation.BaseSocket.<.ctor>b__10_2(System.Object, SuperSocket.ClientEngine.ErrorEventArgs)
at WebSocket4Net.WebSocket.client_Error(System.Object, SuperSocket.ClientEngine.ErrorEventArgs)
at SuperSocket.ClientEngine.TcpClientSession.DetectConnected()
at SuperSocket.ClientEngine.TcpClientSession.TrySend(System.ArraySegment1<Byte>) at SuperSocket.ClientEngine.ClientSession.Send(System.ArraySegment
1<Byte>)
at WebSocket4Net.Protocol.DraftHybi10Processor.SendMessage(WebSocket4Net.WebSocket, Int32, System.String)
at WebSocket4Net.WebSocket.OnDataReceived(Byte[], Int32, Int32)
at SuperSocket.ClientEngine.AuthenticatedStreamTcpSession.OnDataRead(System.IAsyncResult)
at System.Net.LazyAsyncResult.Complete(IntPtr)
at System.Net.LazyAsyncResult.ProtectedInvokeCallback(System.Object, IntPtr)
at System.Net.Security._SslStream.ProcessFrameBody(Int32, Byte[], Int32, Int32, System.Net.AsyncProtocolRequest)
at System.Net.Security._SslStream.ReadFrameCallback(System.Net.AsyncProtocolRequest)
at System.Net.AsyncProtocolRequest.CompleteRequest(Int32)
at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32)
at System.Net.FixedSizeReader.ReadCallback(System.IAsyncResult)
at System.Net.LazyAsyncResult.Complete(IntPtr)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Net.ContextAwareResult.Complete(IntPtr)
at System.Net.LazyAsyncResult.ProtectedInvokeCallback(System.Object, IntPtr)
at System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (6 by maintainers)
Top GitHub Comments
We’re running 2.0.10 since this morning (it crashed again last night). It doesn’t always crash (may be once every few days). Will keep you updated.
I’ve done some work on the reconnect logic, should work again now. Let me know if something isn’t working.