H.Pipes icon indicating copy to clipboard operation
H.Pipes copied to clipboard

Application getting terminated

Open ajith-karkera opened this issue 2 years ago • 5 comments

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+<<ConnectAsync>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()

ajith-karkera avatar Sep 13 '22 07:09 ajith-karkera

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

HavenDV avatar Sep 13 '22 07:09 HavenDV

Hi @HavenDV ,

Below is the code snippet:

PipeClient<Model> m_client = new PipeClient<Model>("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 avatar Sep 13 '22 08:09 ajith-karkera

Hi @HavenDV , Any update on the issue?

ajith-karkera avatar Sep 14 '22 06:09 ajith-karkera

Hi @HavenDV , Any update on the issue?

Please check 2.0.42

HavenDV avatar Sep 14 '22 07:09 HavenDV

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+<<ConnectAsync>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()

ajith-karkera avatar Sep 14 '22 15:09 ajith-karkera