So I have a very tricky problem ( at least for me).
We have an app that runs unit tests on bamboo and for some tests NUnit crashes with error code
nunit3-console.exe returned error code -1073740940. Rerun False
Which lead me to a HeapException.
My problem is right now is that.
- I can't reproduce this locally ( all the test runs I did on my dev environment run successfully). The environment we use for CI is Bamboo.
- I tried to localize the problem in the tests but I failed miserably. I removed the test class that was throwing this exception and now the exception occurs in an other testclass. 2.1 I also remove the second testclass and the error now occurs in the 3rd testclass, which led me to the conclusion that the actual HeapException is somewhere before all these test run and my test is the place where it is just acknowledged and thrown.
Application has like 100.000 tests, it would be very hard for me to go and check them all or even check which are called before my TestClass, so here I am asking you, is there a way I could at least find a way to get to the root of the problem. The actual place this error occurs.
How to debug corruption in the managed heap
I tried to follow steps here, but these almost all relay on the fact you know there the exception is happening or you could reproduce it locally.
E:
Added a test as example for the comment, but I don't think this helps the cause
[Test]
public void Test()
{
//GIVEN
var stub= new Mock<Object1>().Object;
var job= new Job();
var version= new Version(0, 0);
//WHEN + THEN
Assert.That(() => stub.Start(job, version),
Throws.InstanceOf<Excetion>().And.Message.Contains("message"),
"error message");
}
Also for the person who marked this as closed for lacking debug info, I would gladly provide you debug code as long as I know which part of the testcode fails or if I could reproduce it locally.