views:

233

answers:

1

I have a Set of TestFixtures running fine. I added a new Test into the fixture, but for some reason, I am not able to run it. Other tests in other classes and even in the same class run fine.

  • Both NUnit GUI / TestDriven crash

If I run from NUnit GUI I get this error:

NUnit has stopped Working with this message

Description:
  Stopped working

Problem signature:
  Problem Event Name:   CLR20r3
  Problem Signature 01: nunit.exe
  Problem Signature 02: 2.5.3.9345
  Problem Signature 03: 4b2334ce
  Problem Signature 04: Engine
  Problem Signature 05: 1.0.0.0
  Problem Signature 06: 4b51c6fe
  Problem Signature 07: ad
  Problem Signature 08: 0
  Problem Signature 09: System.StackOverflowException
  OS Version:   6.0.6001.2.1.0.768.3
  Locale ID:    2057

using TestDriven.Net 2.0 inside VS2008, get this error:

TestDriven.Net 2.0 has stopped working

Description:
  Stopped working

    Problem signature:
      Problem Event Name:   CLR20r3
      Problem Signature 01: processinvocation86.exe
      Problem Signature 02: 3.0.2556.0
      Problem Signature 03: 4af0254b
      Problem Signature 04: Engine
      Problem Signature 05: 1.0.0.0
      Problem Signature 06: 4b51c6fe
      Problem Signature 07: ad
      Problem Signature 08: 0
      Problem Signature 09: System.StackOverflowException
      OS Version:   6.0.6001.2.1.0.768.3
      Locale ID:    2057
+6  A: 

Well, it seems fairly clear that you're causing a stack overflow. StackOverflowException is a fatal exception which will bring down the CLR - which is why you're seeing that problem.

I suggest you debug into the test to work out the cause of the stack overflow. It's typically a recursion issue. For example, if you have a typo in a property:

 private readonly int age;

 public int Age
 {
     get { return Age; } // should be "return age;"
 }

That will cause a stack overflow - but so can incautiously written recursive methods.

Jon Skeet
Thanks mate, do appreciate.
Asad Butt
Thanks, this was *exactly* my problem! :)
gehho