Frequent socketexception in nUnit GUI

Bug #881715 reported by Ivar Yrke
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
NUnit V2
Fix Released
Medium
Charlie Poole

Bug Description

Windows 7 64 bit, VS2010 .Net 4.0, nUnit 2.5.10

I like to use nUnit GUI with the options automatic reload and automatic rerun last tests. This works fine for a while (anything from a few times to quite a few times) but then ends up in an error message stating

Title: "Assembly Not Loaded"
Text: "System.NetSockets.SocketException : An existing connection was forcibly closed by the remote host"

If I try to reload the project I get the same error once more. This is consistent with my impression that the error first occurs on a automatically triggered reload.
If I try to run the test after this message I get a NullReferenceException.

The only way out is to close nUnit and restart.
This error is quite annoying and disrupting to my attemp to work test driven.

Tags: gui

Related branches

Revision history for this message
Ivar Yrke (iyrke) wrote :
Revision history for this message
Charlie Poole (charlie.poole) wrote :

Please provide the stack trace that is available from the last exception dialog.

Revision history for this message
Ivar Yrke (iyrke) wrote :

Below is stack trace from the NullReferenceException.

As you can imaging it was not so easy to get this error when I wanted to provoke it. That led me to do something that might be a clue to the problem. I ended up adjusting and recompiling my unit test very quickly, basically before nUnit completed running the tests on the prevous build. Then I got the error. And it appears I could also repeat the error easily doing that.

Stack trace:
System.NullReferenceException: Object reference not set to an instance of an object.
   at NUnit.Core.ProxyTestRunner.BeginRun(EventListener listener, ITestFilter filter)
   at NUnit.Util.TestLoader.RunTests(ITestFilter filter)
   at NUnit.UiKit.TestSuiteTreeView.RunTests(ITest[] tests, Boolean ignoreCategories)
   at NUnit.UiKit.TestSuiteTreeView.RunSelectedTests()
   at NUnit.UiKit.TestTree.RunSelectedTests()
   at NUnit.Gui.NUnitForm.runButton_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

tags: added: gui
Changed in nunitv2:
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Charlie Poole (charlie.poole)
Changed in nunitv2:
status: Triaged → Fix Committed
milestone: none → 2.6.0
Changed in nunitv2:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.