Gallio runner Assertion Failure/Exception

14 views
Skip to first unread message

Sean

unread,
Jun 24, 2009, 2:03:05 PM6/24/09
to gallio-dev
I keep getting this on my build machine:

Global\CmdReadyEvent_5472 event already exists on this machine.

I then get the option to abort/retry/ignore.

I suspect its from the NCover runner. Here's how its defined:

<gallio
ApplicationBaseDirectory='%(TestAssemblies.RootDir)%
(TestAssemblies.Directory)'
RunnerType="NCover"
IgnoreFailures="true"
ReportNameFormat='%(TestAssemblies.Filename)%
(TestAssemblies.Extension).$(TestResultFile)'
ReportTypes="xml"
ReportDirectory='%(TestAssemblies.RootDir)%
(TestAssemblies.Directory)'
RunnerProperties="NCoverCoverageFile='%(TestAssemblies.RootDir)
%(TestAssemblies.Directory)codecoverage.xml'; NCoverArguments='//w %
(TestAssemblies.RootDir)%(TestAssemblies.Directory) //ea
CoverageExcludeAttribute //q'"
Assemblies="@(TestAssemblies)"
>
<Output TaskParameter="ExitCode" PropertyName="ExitCode"/>
</gallio>

This totally locks up the build until I go to the machine and clear
the errors. What is causing this?

Sean

Jeff Brown

unread,
Jun 24, 2009, 2:21:44 PM6/24/09
to galli...@googlegroups.com
I have no idea. You might try asking the NCover guys.

Sorry,
Jeff.

Sean

unread,
Jun 24, 2009, 4:27:50 PM6/24/09
to gallio-dev
I uploaded the error message here:
http://groups.google.com/group/gallio-dev/web/CmdReadyEvent_5240.png?hl=en

It appears to be in the Gallio code.

If I choose Ignore, everything finishes as expected.

Sean

Jeff Brown

unread,
Jun 24, 2009, 4:57:43 PM6/24/09
to galli...@googlegroups.com
Gallio calls into NCover here.

If you look more closely, the error occurs in ProfilerMessageCenter, an
NCover class.

Sean

unread,
Jul 2, 2009, 12:32:47 PM7/2/09
to gallio-dev
Is this what you call getting the run-around?

http://www.ncover.com/forum/show_topic/1007

NCover guys said ask the Gallio guys. Great.


On Jun 24, 4:57 pm, "Jeff Brown" <jeff.br...@gmail.com> wrote:
> Gallio calls into NCover here.
>
> If you look more closely, the error occurs in ProfilerMessageCenter, an
> NCover class.
>
> Jeff.
>
> -----Original Message-----
> From: galli...@googlegroups.com [mailto:galli...@googlegroups.com] On
>
> Behalf Of Sean
> Sent: Wednesday, June 24, 2009 1:28 PM
> To: gallio-dev
> Subject: Re: Gallio runner Assertion Failure/Exception
>
> I uploaded the error message here:http://groups.google.com/group/gallio-dev/web/CmdReadyEvent_5240.png?...

Jeff Brown

unread,
Jul 2, 2009, 2:50:54 PM7/2/09
to galli...@googlegroups.com
Hehe well I'm not avoiding the problem. There are pretty complex
interations.

I noticed this in the thread:

"I may have multiple ncover runs at the same time on this machine. Would
this be a problem?"

Possibly.

NCover registers 3 global wait handles in the system name with names like
"Global\CmdReadyEvent_12345" where "12345" is actually NCover's process Id.

Here's the problem: It never deletes them explicitly. Those wait handles
will stick around until the process dies. If the same process starts
another run then it will fail.

Normally when you run NCover.Console.exe, you run exactly run profiler run
then the NCover.Console.exe process dies so at most one run happens in that
process.

Gallio is different. When it can, it embeds NCover in-process using the
NCover API behind the scenes. However the Gallio test runner process does
not necessarily die between each run. If you are running tests from MSBuild
or NAnt then the same process will stick around for all runs. That means
NCover will try to register the same events with the same process id each
time.

Gallio does this because of other subtle bugs in NCover v1.5.8. For
example, if you run two instances of NCover in parallel with the "/reg"
argument, then the one that finishes first will unregister parts of NCover
and the one that finished last will throw "System.ArgumentException: Cannot
delete a subkey tree because the subkey does not exist."


Anyways, this issue is serious enough that I'm just going to stop embedding
NCover altogether and always shell out to NCover.Console.exe.

That should make your problem go away. Should be ready in a couple of
hours.

Sean

unread,
Jul 7, 2009, 12:01:39 PM7/7/09
to gallio-dev
Sounds reasonable. It started happening after switching from the
ncover console to the Gallio runner.

What version can I find the changes in?

Thanks,

Sean

Jeff Brown

unread,
Jul 7, 2009, 2:13:39 PM7/7/09
to galli...@googlegroups.com
v3.1.214 and more recent:
http://ccnet.gallio.org/Distributables/
Reply all
Reply to author
Forward
0 new messages