Hi,
I've been having some troubles with a StackOverflowDetectedException. I'm afraid I currently don't have a clear reproduction case, as I'm not sure why this is occurring. And the code I'm working on is proprietary, so I wouldn't be able to share it directly.
On the off chance that maybe someone has an intuitive sense of what the problem might be, though, here's what I know:
One of my tests is failing due to a StackOverflowDetectedException.
Notably, however, it passes when I run it using the Visual Studio test runner (I'm using xUnit) and when I run it using dotnet test from a command line.
In neither case do I run into an actual stack overflow.
There are threads and socket calls involved, so this is far from a unit test (it's part of an acceptance test suite), but I would like to be able to run it through NCrunch to make potential debugging easier.
Looking at a snapshot of managed memory in Visual Studio at the time of the StackOverflowDetectedException, I notice no immediate red flags.
Most memory is taken by nCrunch.TestRuntime.TestExecutionMap at 3.384.128B and nCrunch.Common.IO.FilePath at 74.052B, but both of these seem to be of similar size when running other tests that do not have this issue.
I haven't found the usual culprit of recursion anywhere either.
One final note, I tried setting the "Detect stack overflow" option in the module configuration to False.
I had hoped that I might run into some different error/crash to lead me to the underlying problem, but the same StackOverflowDetectedException was thrown.
Does anyone have some insight into what might be going on?