Unexpected object reference not set to an instance of an obj

Advertisement

ronnieoverby
Guest

Unexpected object reference not set to an instance of an obj

I'm seeing this exception in my unit tests after upgrading to the 5.2.1 beta.

System.NullReferenceException was unhandled by user code
HResult=-2147467261
Message=Object reference not set to an instance of an object.
Source=WinSCPnet
StackTrace:
at WinSCP.SessionLogReader.Cleanup()
at WinSCP.SessionLogReader.Dispose()
at WinSCP.Session.Cleanup()
at WinSCP.Session.Dispose()
at Winscp.Extensions.Tests.UploadTests.CallingAbortOnUploadThrows() in d:\code\Winscp.Extensions\Winscp.Extensions.Tests\UploadTests.cs:line 164
InnerException:


Here's the failing test:

[Test]
[ExpectedException(typeof (SessionLocalException))]
public void CallingAbortOnUploadThrows()
{
using (var session = OpenSession()) // just a method that return an opened session object
{
Task.Delay(TimeSpan.FromSeconds(5))
.ContinueWith(t => session.Abort());

using (var localFile = new DummyFile(52428800 /* 50mb */))
session.UploadFile(localFile.FileInfo); // this is an extension that calls PutFiles()
}
}

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum