chevron-thin-right chevron-thin-left brand cancel-circle search youtube-icon google-plus-icon linkedin-icon facebook-icon twitter-icon toolbox download check linkedin phone twitter-old google-plus facebook profile-male chat calendar profile-male
Welcome to Typemock Community! Here you can ask and receive answers from other community members. If you liked or disliked an answer or thread: react with an up- or downvote.
0 votes
Hi All,

I'm getting a StackOverflowException on calls to MockManager.Init() when running my tests with Visual Studio 2008 in Resharper 4.0. I have two machines configured this way; one works fine and the other one fails with this error.

I've included the content of the Isolator Log file on the problematic machine. The same log on the working machine looks the same, but omits all the "Fixing Debug Maps..." lines.

Has anyone else figured this one out?

Thanks,
Ashley Tate

=============================
Logging program: C:Program FilesJetBrainsReSharper4.0BinJetBrains.ReSharper.TaskRunner.exe
Cannot read EnvName0 => The system cannot find the file specified.

Cannot read ResetCLSID => The system cannot find the file specified.

Adding typemock profiler
Loaded C:Program FilesTypemockTypemock IsolatorMockWeaver.dll
Target Runtime .NET 2.0
Initialize Profiler 0, Target Runtime .NET 2.0
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
Fixing Debug Maps on function 70464432
asked by ashleytate (640 points)

3 Answers

0 votes
Hi Ashley,

This is a weird one. But I can see that your using an older version of Isolator. I would first try with the current one to see if this still happens.

And can you please post the code that fails? Does it happen when you first call MockManager? Or after a few tests already ran?

Thanks in advance,
answered by gilz (14.5k points)
0 votes
Sorry, I forgot to mention that I had the problem initially with 4.2.3 but have also tried 4.3.2 and 5.0 and had the same issues. I rolled back to 4.2.3 and tried changing some other things before capturing this log information.

The exact test below fails in Setup() when run by itself in Resharper 4.0 test runner.

Ashley


===========================
using System;
using NUnit.Framework;
using TypeMock;

namespace RelayHealth.Interop.Message.Framework
{
[TestFixture]
public class TestTest
{
[SetUp]
public void Setup()
{
// StackOverflowException here
MockManager.Init();
}

[TearDown]
public void TearDown()
{
MockManager.ClearAll();
}

[Test]
public void Nothing()
{

}
}
}
answered by ashleytate (640 points)
0 votes
Hi Ashley,

Thanks for the code sample. However, I wasn't able to reproduce it here.
Let's take it offline, I'll write a separate mail.

Thanks
answered by gilz (14.5k points)
...