Asa*_*sad 2 .net stack-overflow executable nunit
我有一套运行良好的TestFixtures.我在夹具中添加了一个新的测试,但由于某种原因,我无法运行它.在其他类甚至同一类中的其他测试运行良好.
如果我从NUnit GUI运行,我会收到此错误:
NUnit已停止使用此消息
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
Run Code Online (Sandbox Code Playgroud)
在VS2008中使用TestDriven.Net 2.0,得到此错误:
TestDriven.Net 2.0已停止工作
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
Run Code Online (Sandbox Code Playgroud)
好吧,你似乎很清楚你造成了堆栈溢出.StackOverflowException是一个致命的例外,它会降低CLR - 这就是你遇到这个问题的原因.
我建议您调试测试以找出堆栈溢出的原因.这通常是一个递归问题.例如,如果您在属性中输入错误:
private readonly int age;
public int Age
{
get { return Age; } // should be "return age;"
}
Run Code Online (Sandbox Code Playgroud)
这将导致堆栈溢出 - 但也可以不谨慎地编写递归方法.
| 归档时间: |
|
| 查看次数: |
1467 次 |
| 最近记录: |