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
0 votes

Running this test:

using NUnit.Framework;
using TypeMock.ArrangeActAssert;

[TestFixture, Isolated]
public class Tests
{
	[Test]
	public void Test()
	{
		new System.Windows.Forms.ListView();
	}
}

With Isolator 8.0.1 and NUnit 2.6.2 as invoked by TestDriven.NET 3.8 in Visual Studio 2013 Update 5 CTP results in this output on my machine:

------ Test started: Assembly: IBStratBench.Tests.dll ------
 
Test 'Tests.Test' failed: System.AccessViolationException : Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at System.Drawing.SafeNativeMethods.Gdip.GdipGetLogFontW<<Swapped(HandleRef , HandleRef , Object )
at System.Drawing.SafeNativeMethods.Gdip.GdipGetLogFontW(HandleRef font, HandleRef graphics, Object lf)
at System.Drawing.Font.ToLogFont(Object logFont, Graphics graphics)
at System.Drawing.Font.ToLogFont(Object logFont)
at System.Drawing.Font.ToHfont()
at System.Windows.Forms.Control.FontHandleWrapper..ctor(Font font)
at System.Windows.Forms.Control.GetDefaultFontHandleWrapper()
at System.Windows.Forms.Control.get_FontHandle()
at System.Windows.Forms.ListView..ctor()
Tests.cs(10,0): at Tests.Test()
at TypeMock.MockManager.getReturn(Object context, String typeName, String methodName, Object methodGenericParams, Boolean isDecorated, Boolean isInterceptedType, Object[] methodArguments)
at Typemock.Interceptors.Profiler.InternalMockManager.getReturn(Object that, String typeName, String methodName, Object methodParameters, Boolean isInjected, Boolean isInterceptedType)
Tests.cs(9,0): at Tests.Test()
 
0 passed, 1 failed, 0 skipped, took 2.62 seconds (NUnit 2.6.2).
 
This apparent bug is new in Isolator 8.0.1. My ListView-newing tests used to pass in the previous 7 version of Isolator.
asked by NeilJustice (14.1k points)
edited by NeilJustice

1 Answer

0 votes
Hi Neil,

Thank you for reportig this.

This is indeed a new bug related to the PInvoke support we added in V8.

We're looking into it and will update you ASAP.

 

Cheers,

Alex Galin.
answered by alex (17k points)
Thanks Alex, good luck fixing.

Hi Alex,

This bug remains unfixed in Isolator 8.0.4.8:

This bug is fixed in Isolator 8.0.5.2. Thanks for fixing this Typemock programmers. The previous month of unrunnable C# tests due to this bug was a vacation away from the TDD style that I would prefer not to repeat! TDD baby! Woo!
Cause all code is guilty untill proven innocent!!
...