V3 Documentation
Search

Detect Stack Overflow

Project-level NCrunch configuration setting

Purpose

This configuration setting controls whether or not NCrunch should attempt to intercept and handle StackOverflowExceptions during test execution.

Stack overflow exception handling is limited to user code only. NCrunch cannot intercept stack overflows that are directly caused by code in referenced assemblies.

Because NCrunch intercepts stack overflows using specialised instrumentation, this setting only applies when the instrument output assembly configuration setting is set to true.

Recommendations

Stack overflows are a special consideration for a concurrent test runner such as NCrunch, because their occurrence causes the entire runtime test process to be immediately terminated without any opportunity to return information about the state of the test under execution. The CLR's default handling of stack overflows also results in the appearance of annoying dialog boxes that can interrupt workflow.

Disabling this setting may result in a marginal improvement in test runtime performance.