HavenDV / H.Pipes

A simple, easy to use, strongly-typed, async wrapper around .NET named pipes.
MIT License
219 stars 26 forks source link

Application getting terminated #26

Open ajith-karkera opened 1 year ago

ajith-karkera commented 1 year ago

Description: The process was terminated due to an unhandled exception. Exception Info: System.IO.FileLoadException at System.Threading.Tasks.ValueTask.get_IsCompleted() at H.Pipes.PipeClient1+<DisconnectInternalAsync>d__48[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task) at H.Pipes.PipeClient1+<b__46_0>d[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 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.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() at System.Threading.ThreadPoolWorkQueue.Dispatch()

HavenDV commented 1 year ago

Can you provide a project or code that reproduces this exception? At the moment I don't have enough information to understand the problem

ajith-karkera commented 1 year ago

Hi @HavenDV ,

Below is the code snippet:

PipeClient m_client = new PipeClient("NamedPipeServer", formatter: new NewtonsoftJsonFormatter(), reconnectionInterval: new TimeSpan(0, 0, 0, 0, 100)); m_client.MessageReceived += OnMessageReceived; m_client.ExceptionOccurred += OnExceptionOccurred; m_client.Connected += OnConnected; m_client.Disconnected += OnDisconnected; m_client.AutoReconnect = true; await m_client.ConnectAsync(); await Task.Delay(Timeout.InfiniteTimeSpan);

ajith-karkera commented 1 year ago

Hi @HavenDV , Any update on the issue?

HavenDV commented 1 year ago

Hi @HavenDV , Any update on the issue?

Please check 2.0.42

ajith-karkera commented 1 year ago

Hi @HavenDV ,

We dont see the above issue anymore, But the below error:

Description: The process was terminated due to an unhandled exception. Exception Info: System.ComponentModel.InvalidAsynchronousStateException at System.Windows.Forms.Control.WaitForWaitHandle(System.Threading.WaitHandle) at System.Windows.Forms.Control.MarshaledInvoke(System.Windows.Forms.Control, System.Delegate, System.Object[], Boolean) at System.Windows.Forms.Control.Invoke(System.Delegate, System.Object[]) at App.Service.set_StatusUpdate(System.String) at App.Service.OnExceptionOccurred(System.Object, H.Pipes.Args.ExceptionEventArgs) at H.Pipes.PipeClient`1+<b__46_0>d[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 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.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() at System.Threading.ThreadPoolWorkQueue.Dispatch()