← Back to team overview

nunit-core team mailing list archive

[Bug 907270] [NEW] Clicking run button causes exception if no test loaded

 

Public bug reported:

Belongs to: NUnit 2.5.10

If you start nunit for example like this:
nunit.exe /run x:\doesnt_exists
and then click the "Run" button (which is enabled after the error message that states that the file could not be loaded), an exception is thrown:

System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
bei NUnit.Util.TestLoader.RunTests(ITestFilter filter)

It seems that the error is in file TestLoader.cs in line 618: Perhaps
Services or Services.UserSettings is null. All other calls in
RunTests(ITestFilter) don't look suspicious to me to raise that
exception or would cause to happen the exception in a different place
(like if filter was null - exception would be thrown somewhere in
BeginRun or afterwards).

Full strack trace:

System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
bei NUnit.Util.TestLoader.RunTests(ITestFilter filter)
bei NUnit.UiKit.TestSuiteTreeView.RunTests(ITest[] tests, Boolean ignoreCategories)
bei NUnit.UiKit.TestSuiteTreeView.RunSelectedTests()
bei NUnit.UiKit.TestTree.RunSelectedTests()
bei NUnit.Gui.NUnitForm.runButton_Click(Object sender, EventArgs e)
bei System.Windows.Forms.Control.OnClick(EventArgs e)
bei System.Windows.Forms.Button.OnClick(EventArgs e)
bei System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
bei System.Windows.Forms.Control.WndProc(Message& m)
bei System.Windows.Forms.ButtonBase.WndProc(Message& m)
bei System.Windows.Forms.Button.WndProc(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

** Affects: nunitv2
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of NUnit
Developers, which is subscribed to NUnit V2.
https://bugs.launchpad.net/bugs/907270

Title:
  Clicking run button causes exception if no test loaded

Status in NUnit V2 Test Framework:
  New

Bug description:
  Belongs to: NUnit 2.5.10

  If you start nunit for example like this:
  nunit.exe /run x:\doesnt_exists
  and then click the "Run" button (which is enabled after the error message that states that the file could not be loaded), an exception is thrown:

  System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
  bei NUnit.Util.TestLoader.RunTests(ITestFilter filter)

  It seems that the error is in file TestLoader.cs in line 618: Perhaps
  Services or Services.UserSettings is null. All other calls in
  RunTests(ITestFilter) don't look suspicious to me to raise that
  exception or would cause to happen the exception in a different place
  (like if filter was null - exception would be thrown somewhere in
  BeginRun or afterwards).

  Full strack trace:

  System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
  bei NUnit.Util.TestLoader.RunTests(ITestFilter filter)
  bei NUnit.UiKit.TestSuiteTreeView.RunTests(ITest[] tests, Boolean ignoreCategories)
  bei NUnit.UiKit.TestSuiteTreeView.RunSelectedTests()
  bei NUnit.UiKit.TestTree.RunSelectedTests()
  bei NUnit.Gui.NUnitForm.runButton_Click(Object sender, EventArgs e)
  bei System.Windows.Forms.Control.OnClick(EventArgs e)
  bei System.Windows.Forms.Button.OnClick(EventArgs e)
  bei System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
  bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
  bei System.Windows.Forms.Control.WndProc(Message& m)
  bei System.Windows.Forms.ButtonBase.WndProc(Message& m)
  bei System.Windows.Forms.Button.WndProc(Message& m)
  bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
  bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
  bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

To manage notifications about this bug go to:
https://bugs.launchpad.net/nunitv2/+bug/907270/+subscriptions


Follow ups

References