Gallio 3.0.6.787 with TypeMock 5.3.4.0

17 views
Skip to first unread message

Lance

unread,
Sep 9, 2009, 3:00:35 PM9/9/09
to gallio-user
I'm trying to get Gallio 3.0.6.787 to play nicely with TypeMock
5.3.4.0 in a Nant build. Here is the section of my nant build:

<target name="gallio" failonerror="true">
<!-- Dynamically load TypeMock task. -->
<loadtasks assembly="${typeMockTasks}" />
<typemockregister company="***" license="***" autodeploy="true"/>
<!-- Dynamically load Gallio task. -->
<loadtasks assembly="${gallioNantTasks}" />
<gallio runner-type="TypeMock"
report-directory="BuildResults"
report-name-format="T6000MockedTest"
report-types="Xml-Inline;Html"
show-reports="${showReports}"
result-property="ExitCode2"
failonerror="false">
<plugin-directories>
<include name="${gallioBase}" />
</plugin-directories>
<assemblies>
...
</assemblies>
</gallio>
<typemockstop undeploy="true" />
</target>

This results in the following runtime exception:

[gallio] Starting TypeMock.
[gallio] A fatal exception occurred while running tests. Possible
causes include invalid test runner parameters and stack overflows.
[gallio] Gallio.Runtime.RuntimeException: The runtime could not be
initialized. ---> System.AccessViolationException: Attempted to read
or write protected memory. This is often an indication that other
memory is corrupt.
[gallio] at System.RuntimeTypeHandle._GetTypeByName(String name,
Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly,
StackCrawlMark& stackMark, Boolean loadTypeFromPartialName)
[gallio] at System.RuntimeTypeHandle.GetTypeByName(String name,
Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly,
StackCrawlMark& stackMark)
[gallio] at System.RuntimeType.PrivateGetType(String typeName,
Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly,
StackCrawlMark& stackMark)
[gallio] at System.Type.GetType(String typeName, Boolean
throwOnError, Boolean ignoreCase)
[gallio] at
Castle.Windsor.Installer.DefaultComponentInstaller.ObtainType(String
typeName)
[gallio] at
Castle.Windsor.Installer.DefaultComponentInstaller.SetUpComponents
(IConfiguration[] configurations, IWindsorContainer container)
[gallio] at
Castle.Windsor.Installer.DefaultComponentInstaller.SetUp
(IWindsorContainer container, IConfigurationStore store)
[gallio] at
Gallio.Runtime.Windsor.WindsorRuntime.RunContainerInstaller() in c:
\RelEng\Projects\MbUnit v3.0.6\Work\src\Gallio\Gallio\Runtime\Windsor
\WindsorRuntime.cs:line 447
[gallio] at Gallio.Runtime.Windsor.WindsorRuntime.Initialize
(ILogger logger) in c:\RelEng\Projects\MbUnit v3.0.6\Work\src\Gallio
\Gallio\Runtime\Windsor\WindsorRuntime.cs:line 134
[gallio] --- End of inner exception stack trace ---
[gallio]
[gallio] Server stack trace:
[gallio] at Gallio.Runtime.Windsor.WindsorRuntime.Initialize
(ILogger logger) in c:\RelEng\Projects\MbUnit v3.0.6\Work\src\Gallio
\Gallio\Runtime\Windsor\WindsorRuntime.cs:line 138
[gallio] at Gallio.Runtime.RuntimeBootstrap.Initialize
(RuntimeSetup setup, ILogger logger) in c:\RelEng\Projects\MbUnit
v3.0.6\Work\src\Gallio\Gallio\Runtime\RuntimeBootstrap.cs:line 70
[gallio] at Gallio.Runner.Drivers.BaseTestDriver.InitializeImpl
(RuntimeSetup runtimeSetup, TestRunnerOptions testRunnerOptions,
ILogger logger) in c:\RelEng\Projects\MbUnit v3.0.6\Work\src\Gallio
\Gallio\Runner\Drivers\BaseTestDriver.cs:line 131
[gallio] at Gallio.Runner.Drivers.LocalTestDriver.InitializeImpl
(RuntimeSetup runtimeSetup, TestRunnerOptions testRunnerOptions,
ILogger logger) in c:\RelEng\Projects\MbUnit v3.0.6\Work\src\Gallio
\Gallio\Runner\Drivers\LocalTestDriver.cs:line 63
[gallio] at Gallio.Runner.Drivers.BaseTestDriver.Initialize
(RuntimeSetup runtimeSetup, TestRunnerOptions testRunnerOptions,
ILogger logger) in c:\RelEng\Projects\MbUnit v3.0.6\Work\src\Gallio
\Gallio\Runner\Drivers\BaseTestDriver.cs:line 51
[gallio] at
System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage
(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean
fExecuteInContext, Object[]& outArgs)
[gallio] at
System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage
(RuntimeMethodHandle md, Object[] args, Object server, Int32
methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
[gallio] at
System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage
(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)
[gallio]
[gallio] Exception rethrown at [0]:
[gallio] at
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
reqMsg, IMessage retMsg)
[gallio] at
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
msgData, Int32 type)
[gallio] at Gallio.Runner.Drivers.ITestDriver.Initialize
(RuntimeSetup runtimeSetup, TestRunnerOptions testRunnerOptions,
ILogger logger)
[gallio] at Gallio.Runner.Drivers.RemoteTestDriver.InitializeImpl
(RuntimeSetup runtimeSetup, TestRunnerOptions testRunnerOptions,
ILogger logger) in c:\RelEng\Projects\MbUnit v3.0.6\Work\src\Gallio
\Gallio\Runner\Drivers\RemoteTestDriver.cs:line 55
[gallio] at Gallio.Runner.Drivers.BaseTestDriver.Initialize
(RuntimeSetup runtimeSetup, TestRunnerOptions testRunnerOptions,
ILogger logger) in c:\RelEng\Projects\MbUnit v3.0.6\Work\src\Gallio
\Gallio\Runner\Drivers\BaseTestDriver.cs:line 51
[gallio] at
System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage
(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean
fExecuteInContext, Object[]& outArgs)
[gallio] at
System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage
(RuntimeMethodHandle md, Object[] args, Object server, Int32
methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
[gallio] at
System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage
(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)
[gallio]
[gallio] Exception rethrown at [1]:
[gallio] at
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
reqMsg, IMessage retMsg)
[gallio] at
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
msgData, Int32 type)
[gallio] at Gallio.Runner.Drivers.ITestDriver.Initialize
(RuntimeSetup runtimeSetup, TestRunnerOptions testRunnerOptions,
ILogger logger)
[gallio] at Gallio.Runner.Drivers.RemoteTestDriver.InitializeImpl
(RuntimeSetup runtimeSetup, TestRunnerOptions testRunnerOptions,
ILogger logger) in c:\RelEng\Projects\MbUnit v3.0.6\Work\src\Gallio
\Gallio\Runner\Drivers\RemoteTestDriver.cs:line 55
[gallio] at Gallio.Runner.Drivers.BaseTestDriver.Initialize
(RuntimeSetup runtimeSetup, TestRunnerOptions testRunnerOptions,
ILogger logger) in c:\RelEng\Projects\MbUnit v3.0.6\Work\src\Gallio
\Gallio\Runner\Drivers\BaseTestDriver.cs:line 51
[gallio] at
Gallio.Runner.Drivers.AggregateTestDriver.<>c__DisplayClass9.<ExploreOrRunEachPartition>b__8
(IList`1 partitions) in c:\RelEng\Projects\MbUnit v3.0.6\Work\src
\Gallio\Gallio\Runner\Drivers\AggregateTestDriver.cs:line 89
[gallio] at
Gallio.Runner.Drivers.HostedTestDriver.DoWithPartitions
(TestPackageConfig testPackageConfig, Action`1 action, Action`1
setStatus) in c:\RelEng\Projects\MbUnit v3.0.6\Work\src\Gallio\Gallio
\Runner\Drivers\HostedTestDriver.cs:line 123
[gallio] at
Gallio.Runner.Drivers.AggregateTestDriver.ExploreOrRunEachPartition
(TestPackageConfig testPackageConfig, ITestExplorationListener
testExplorationListener, ITestExecutionListener testExecutionListener,
PartitionAction action, IProgressMonitor progressMonitor) in c:\RelEng
\Projects\MbUnit v3.0.6\Work\src\Gallio\Gallio\Runner\Drivers
\AggregateTestDriver.cs:line 74
[gallio] at Gallio.Runner.Drivers.AggregateTestDriver.RunImpl
(TestPackageConfig testPackageConfig, TestExplorationOptions
testExplorationOptions, ITestExplorationListener
testExplorationListener, TestExecutionOptions testExecutionOptions,
ITestExecutionListener testExecutionListener, IProgressMonitor
progressMonitor) in c:\RelEng\Projects\MbUnit v3.0.6\Work\src\Gallio
\Gallio\Runner\Drivers\AggregateTestDriver.cs:line 60
[gallio] at Gallio.Runner.Drivers.BaseTestDriver.Run
(TestPackageConfig testPackageConfig, TestExplorationOptions
testExplorationOptions, ITestExplorationListener
testExplorationListener, TestExecutionOptions testExecutionOptions,
ITestExecutionListener testExecutionListener, IProgressMonitor
progressMonitor) in c:\RelEng\Projects\MbUnit v3.0.6\Work\src\Gallio
\Gallio\Runner\Drivers\BaseTestDriver.cs:line 92
[gallio] at Gallio.Runner.DefaultTestRunner.Run
(TestPackageConfig testPackageConfig, TestExplorationOptions
testExplorationOptions, TestExecutionOptions testExecutionOptions,
IProgressMonitor progressMonitor) in c:\RelEng\Projects\MbUnit
v3.0.6\Work\src\Gallio\Gallio\Runner\DefaultTestRunner.cs:line 292

If I overwrite the TypeMock.Integration.dll that comes with Gallio
with the one that comes with TypeMock I get the following exception:

[gallio] Initializing the runtime and loading plugins.
[gallio] A fatal exception occurred while running tests. Possible
causes include invalid test runner parameters and stack overflows.
[gallio] System.IO.FileNotFoundException: Could not load file or
assembly 'TypeMock.Integration, Version=5.1.2.0, Culture=neutral,
PublicKeyToken=null' or one of its dependencies. The system cannot
find the file specified.
[gallio] at
Gallio.TypeMockIntegration.TypeMockHostFactory.CreateHostImpl
(HostSetup hostSetup, ILogger logger)
[gallio] at Gallio.Runtime.Hosting.BaseHostFactory.CreateHost
(HostSetup hostSetup, ILogger logger) in c:\RelEng\Projects\MbUnit
v3.0.6\Work\src\Gallio\Gallio\Runtime\Hosting\BaseHostFactory.cs:line
37
[gallio] at
Gallio.Runner.Drivers.HostedTestDriver.CreateRemoteHost(String
workingDirectory, Boolean shadowCopy, Boolean debug,
ProcessorArchitecture arch) in c:\RelEng\Projects\MbUnit v3.0.6\Work
\src\Gallio\Gallio\Runner\Drivers\HostedTestDriver.cs:line 148
[gallio] at
Gallio.Runner.Drivers.HostedTestDriver.DoWithPartitions
(TestPackageConfig testPackageConfig, Action`1 action, Action`1
setStatus) in c:\RelEng\Projects\MbUnit v3.0.6\Work\src\Gallio\Gallio
\Runner\Drivers\HostedTestDriver.cs:line 113
[gallio] at
Gallio.Runner.Drivers.AggregateTestDriver.ExploreOrRunEachPartition
(TestPackageConfig testPackageConfig, ITestExplorationListener
testExplorationListener, ITestExecutionListener testExecutionListener,
PartitionAction action, IProgressMonitor progressMonitor) in c:\RelEng
\Projects\MbUnit v3.0.6\Work\src\Gallio\Gallio\Runner\Drivers
\AggregateTestDriver.cs:line 74
[gallio] at Gallio.Runner.Drivers.AggregateTestDriver.RunImpl
(TestPackageConfig testPackageConfig, TestExplorationOptions
testExplorationOptions, ITestExplorationListener
testExplorationListener, TestExecutionOptions testExecutionOptions,
ITestExecutionListener testExecutionListener, IProgressMonitor
progressMonitor) in c:\RelEng\Projects\MbUnit v3.0.6\Work\src\Gallio
\Gallio\Runner\Drivers\AggregateTestDriver.cs:line 60
[gallio] at Gallio.Runner.Drivers.BaseTestDriver.Run
(TestPackageConfig testPackageConfig, TestExplorationOptions
testExplorationOptions, ITestExplorationListener
testExplorationListener, TestExecutionOptions testExecutionOptions,
ITestExecutionListener testExecutionListener, IProgressMonitor
progressMonitor) in c:\RelEng\Projects\MbUnit v3.0.6\Work\src\Gallio
\Gallio\Runner\Drivers\BaseTestDriver.cs:line 92
[gallio] at Gallio.Runner.DefaultTestRunner.Run
(TestPackageConfig testPackageConfig, TestExplorationOptions
testExplorationOptions, TestExecutionOptions testExecutionOptions,
IProgressMonitor progressMonitor) in c:\RelEng\Projects\MbUnit
v3.0.6\Work\src\Gallio\Gallio\Runner\DefaultTestRunner.cs:line 292


I would greatly appreciate any help to get this working.

-Lance

Jeff Brown

unread,
Sep 9, 2009, 5:36:23 PM9/9/09
to galli...@googlegroups.com
Wow, AccessViolationException!

When you replace the TypeMock.Integration.dll, try editing the
Gallio.TypeMockIntegration.plugin file and updating the version numer to
5.3.4.0 instead of 5.1.2.0.

That said, the older integration dll should work just fine with the newer
version of TypeMock.

So my inclination here is to wonder whether the new version of TypeMock
contains some kind of memory corruption bug that happens to be manifesting
during the Gallio plugin loading process.

Jeff.

Lance

unread,
Sep 9, 2009, 5:47:50 PM9/9/09
to gallio-user
My Gallio.TypeMockIntegration.plugin looks like this:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<gallio>
<assemblies>
<assembly file="Gallio.TypeMockIntegration.dll" />
</assemblies>

<runtime>
<components>
<component id="TypeMockIntegration.TypeMockHostFactory"
service="Gallio.Runtime.Hosting.IHostFactory,
Gallio"

type="Gallio.TypeMockIntegration.TypeMockHostFactory,
Gallio.TypeMockIntegration" />

<component id="TypeMockIntegration.TypeMockTestRunnerFactory"
service="Gallio.Runner.ITestRunnerFactory, Gallio"
type="Gallio.Runner.DefaultTestRunnerFactory,
Gallio">
<parameters>
<testDriverFactory>$
{TypeMockIntegration.TypeMockTestDriverFactory}</testDriverFactory>
<name>TypeMock</name>
<description>Runs tests in an external process with
TypeMock.Net. TypeMock.Net v4 or v5 must be installed for this mode
to work.</description>
</parameters>
</component>

<component id="TypeMockIntegration.TypeMockTestDriverFactory"
service="Gallio.Runner.Drivers.ITestDriverFactory,
Gallio"

type="Gallio.Runner.Drivers.HostedTestDriverFactory, Gallio">
<parameters>
<hostFactory>${TypeMockIntegration.TypeMockHostFactory}</
hostFactory>
</parameters>
</component>
</components>
</runtime>
</gallio>
</configuration>

I don't see any version anywhere. Am I missing something.

-Lance
> ...
>
> read more »

Jeff Brown

unread,
Sep 9, 2009, 7:13:54 PM9/9/09
to galli...@googlegroups.com
Ahh, no you're not missing anything. The version numbers appear in v3.1
plugin files. I couldn't remember if they were in v3.0.6.

Did you have it working previously with an older version of TypeMock?

Lance

unread,
Sep 9, 2009, 10:37:53 PM9/9/09
to gallio-user
I reverted everything back to TypeMock 5.2.3.0 and all is well.
Clearly there's something going on with 5.3.4.0. I tweeted @Typemock
with a link to this thread. Hopefullly one of them will chime in with
some useful information.

-Lance
> ...
>
> read more »
Reply all
Reply to author
Forward
0 new messages