Question

maybe someone is able to explain me why I'm having unhandled exceptions when running unit tests? Is not supposed the environment to handle all the exceptions and just set the test to failed?

This can be related to the fact that the unit tests are calling unmanaged code thru C++/CLI?

Thanks in advance.

EDIT: Just to clarify, the problem is not having an exception. The problem is the exception not causing the unit test to fail and going to execute the next unit test.

alt text

Was it helpful?

Solution

There's nothing quite as nasty as an AccessViolation exception, only StackOverflow is worse. I can make out "communication", that unmanaged code probably runs in a thread that neither the CLR nor the test runner knows anything about. Very limited options there, no way to make a thread like that simply seize to exist.

It's a memory corruption problem, the debug allocator in the CRT fills freed blocks of memory with 0xfeeefeee. That's not kosher btw, you should only run unit tests on the Release build.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top