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 Answers. Here you can ask and receive answers from other community members. And if you liked or disliked an answer or thread: react with an up- or downvote Enjoy!

Linking TypeMock with NCover under Vista x64 crash

0 votes
I recently stumbled over what seems like it could be a bug in TypeMock: When TypeMock 3.7.1 is linked with NCover 1.5.8 all .Net 2.0 processes started from VS2005 crashes. II7 will hang when I attempt to debug ASP.Net pages, the internal VS2005 web server also crashes and when pressing F1 the help pops up and closes again.

Running my ASP.Net app in IIS directly from Internet Explorer works fine. If I start the development server from the command prompt it does not crash. And if I launch the help from the start menu it does not crash either.

Unlinking NCover fixes the problem. I have not tested with other versions than TypeMock 3.7.1 and NCover 1.5.8. The x64 version of TypeMock is installed.

From the event log:
- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
<Provider Name=".NET Runtime" />
<EventID Qualifiers="0">1023</EventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2007-05-10T11:39:06.000Z" />
<EventRecordID>2328</EventRecordID>
<Channel>Application</Channel>
<Computer>sister-bear</Computer>
<Security />
</System>
- <EventData>
<Data>.NET Runtime version 2.0.50727.312 - Fatal Execution Engine Error (7A062A61) (80131506)</Data>
</EventData>
</Event>
asked May 10, 2007 by halstein (8,680 points)

11 Answers

0 votes
It seems that you found a :twisted: Bug.
Thanks for reporting this. We will fix it and post the fix.
A workaround is to link only before using NCover or to use TestDriven that will do the linking for you behind the scenes.
answered May 10, 2007 by scott (31,960 points)
0 votes
Any idea if theres a fix yet?

I'm having the same issue - trying to run ncover as part of Continuous Integration -need to use the new version of ncover to get MSTest to play nice but now TypeMock is playing up :S

I'm using TypeMock 4.03 and NCover 1.5.8

The issue occurs when I use the new //pm switch in NCover 1.5.8 to tell it to profile the VsTestHost process (because that is where the tests are running)
answered Jul 23, 2007 by StewartRobertson (260 points)
0 votes
Hi,

Fromthe details below I dont think you are experiencing the same problem. Running Typemock with NCover on vista 64 bit should be working ok.

I think the addition of the MSTest that may be introducing a new factor.
Anyway can you please provide some more details on what is your configuration?
specifically:
1) what variant of typemock you have installed (32/64 bit)
2) how are you running the tests? (from the ide, using msbuild tasks, command line)
3) what is the exact command you are executing.
4) what is the error you see.

and anything else that might be usefull
answered Jul 24, 2007 by lior (13,220 points)
0 votes
1) TypeMock 4.03 32 bit
2) Running from the an msbuild task (or command line - error is the same)
3) For the command line the command looks like this (using a stripped down test app)
"C:Program FilesNCoverNCover.Console" "C:Program FilesTypeMockTypeMock.NETTMockRunner.exe" """C:Program FilesMicrosoft Visual Studio 8Common7IDEmstest.exe""" /testcontainer:Library.Test.dll /resultsfile:../testResults.trx //w C:.Debug //pm VsTestHost.exe

its the //pm command that kills everything - this tells NCover to profile the testhost process because thats where all the execution occurs.

So it could be an NCover issue - but think its the combination of the two.

4) Error:
Event Type: Error
Event Source: .NET Runtime
Event Category: None
Event ID: 1023
Date: 27/07/2007
Time: 11:21:57
User: N/A
Computer:
Description:
.NET Runtime version 2.0.50727.832 - Fatal Execution Engine Error (7A0592A2) (80131506)


I have a sample test assembly and the bat i used to test the running I can send you if needed

[/list][/list][/code]
answered Jul 27, 2007 by StewartRobertson (260 points)
0 votes
Try the following:

"C:Program FilesTypeMockTypeMock.NETTMockRunner.exe" -link NCover
"C:Program FilesNCoverNCover.Console"  """C:Program FilesMicrosoft Visual Studio 8Common7IDEmstest.exe""" /testcontainer:Library.Test.dll /resultsfile:../testResults.trx //w C:.Debug //pm VsTestHost.exe


Note: The TMockRunner is first and we link it with NCover and then run NCover.

Another method is to Link NCover in the Configurator and then run NCover directly (no need to use TMockRunner)
"C:Program FilesNCoverNCover.Console"  """C:Program FilesMicrosoft Visual Studio 8Common7IDEmstest.exe""" /testcontainer:Library.Test.dll /resultsfile:../testResults.trx //w C:.Debug //pm VsTestHost.exe
answered Jul 27, 2007 by scott (31,960 points)
0 votes
Thanks for your response but I tried it that way initially and had no luck.

Either way will get that error with the //pm switch enabled.

For some reason the "TMockRunner first" way always meant the test failed with a "TypeMock not enabled" message - the same was true if I used the TypeMock Configurator - not sure if I'm doing something wrong there.

I've posted on the NCover forum as well to get some visibility there.
answered Jul 27, 2007 by StewartRobertson (260 points)
0 votes
Stewart hi,

We have been investigating this issue and it seems to be some kind of integration problem with NCover. Ive justed to update you that we have contacted NCover team to work together on solving the issue.

I'll let you now as soon as a fix is found.
answered Aug 2, 2007 by lior (13,220 points)
0 votes
Bump
answered Sep 7, 2007 by StewartRobertson (260 points)
0 votes
And right you are,
Hopefully a fix for that will be coming shortly.
answered Sep 9, 2007 by lior (13,220 points)
0 votes
The NCover guys are trying to solve this problem.
See NCover Case 60
answered Sep 9, 2007 by scott (31,960 points)
...