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
I built a WCF service and a test who starts the host process of this service:

ServiceHost myServiceHost = new ServiceHost(typeof(MessageRelayContract));
myServiceHost.Open();
Thread.Sleep(3000);
myServiceHost.Close();

I want to test whether the default configuration of the service works or not. The test works fine on my dev machine.
Unfortunately the test fails on the build server with the following exception:

"System.AccessViolationException : Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

As you can see I am not using TypeMock within this test - but the test assembly has other tests who do, so I need to launch TypeMock (using the TypeMockStart command in MsBuild). The test works fine when turning of TypeMock (but then of course other tests fail).

Is this a bug or a configuration problem? I'm using TypeMock 5.1 with the AAA concept.
asked by srudin (1.7k points)

3 Answers

0 votes
Hi,

Looks like a configuration problem, since it works on your computer. Does it work also on your computer with a build script, or vice versa on the build machine in VS?

I'll think a bit more about this, and get back to you.
answered by gilz (14.5k points)
0 votes
We do not have VS installed on the build server. And I don't have CruiseControl installed on my dev machine.
answered by srudin (1.7k points)
0 votes
Hi

Let's take it offline. I'll write a separate email with instruction to get the info that we need.

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