Quantcast
Channel: sshnet Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 1026

Commented Issue: Unobserved exception rethrown by finalizer thread [1298]

$
0
0
<p>Hi,</p>
<p>&nbsp;</p>
<p>There is an unhandled System.AggregateException in a worker thread within SSH.NET version 18974 that causes the container application to crash. The exception should be caught and rethrown to the caller. This error occurs when the connection between the SHH client and server is flaky, i.e. it comes on and off. I added an AppDomain unhandled exception handler to log the exception. Here is the stack trace of the exception:</p>
<p>&nbsp;</p>
<p>ERROR: SubsystemSession.cs(128): Object reference not set to an instance of an object.</p>
<p>ERROR: SubsystemSession.cs(169): Renci.SshNet.Sftp.SubsystemSession.Session_ErrorOccured(Object sender, ExceptionEventArgs e) failed.</p>
<p>ERROR: System.EventHandler`1.Invoke(Object sender, TEventArgs e) failed.</p>
<p>ERROR: Session.cs(1929): Renci.SshNet.Session.RaiseError(Exception exp) failed.</p>
<p>ERROR: Session.cs(1592): Renci.SshNet.Session.MessageListener() failed.</p>
<p>ERROR: Session.cs(522): Renci.SshNet.Session.&lt;Connect&gt;b__14() failed.</p>
<p>ERROR: System.Threading.Tasks.Task.InnerInvoke() failed.</p>
<p>ERROR: System.Threading.Tasks.Task.Execute() failed.</p>
<p>ERROR: A Task&#39;s exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread.</p>
<p>ERROR: Application domain unhandled exception.</p>
<p>&nbsp;</p>
<p>I am not too familar with Tasks, but I suspect the error could be fixed by adding a catch block to the try block at Session.cs, line 520, and rethrow the exception. I am posting this while I am trying to fix the issue in case someone else can help.</p>
<p>&nbsp;</p>
<p>Thanks,</p>
<p>&nbsp;</p>
<p>Robert</p>

Comments: ** Comment from web user: olegkap **

Hi,

Can you please try latest source code and see if the error occurs?

I've done some fixes in this version to avoid exception in Dispose but may be I didnt cover all cases.

Thanks,
Oleg


Viewing all articles
Browse latest Browse all 1026

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>