Welcome, Guest!

NCover on Windows Server 2008 64bit

NCover on Windows Server 2008 64bit

by mbarrett on Wednesday August 13, 2008, 08:35 AM

Hi,

I'm having problems getting NCover to work correctly under Windows Server 2008 64bit.

It runs the tests correctly, but when it finishes running all the tests a rather nasty exception is thrown.


[info] MbUnit execution finished in 1.490149s.

***************** Exception *****************

-- Top-level exception (System.Runtime.InteropServices.SEHException)
External component has thrown an exception.
-- Stack Trace
at _CxxThrowException(Void* , _s__ThrowInfo* )
at ShMemReader.GetMemoryPointer(ShMemReader* , UInt32 addr)
at ShMemLinkedList<moduleinfo>.getHeadNode(ShMemLinkedList<moduleinfo>* , ShM
emReader* rdr)
at ShMemLinkedList<moduleinfo>.count(ShMemLinkedList<moduleinfo>* , ShMemRead
er* rdr)
at NCover.Data.MwShMemLinkedList<ncover::interfaces::imoduleinfo>
o\,NCover::Data::ModuleInfoConverter>.get_Count()
at NCover.Framework.CoverageData._ReadBinary()
at NCover.Framework.CoverageData..ctor(INCoverData data)
at NCover.Framework.ProfilerDriver._GetCoverageData()
at NCover.Framework.ProfilerDriver.Execute()
at NCover.ConsoleMain.ConsoleMain.Main(String[] args)

So, it looks like a memory access problem. I am running NCover as an administrator - I'm not sure what else to do. Any pointers?

RE: NCover on Windows Server 2008 64bit

by sporewell on Wednesday August 13, 2008, 09:07 AM

does mbunit run as a 32-bit process?

the exception you're seeing is often thrown when the bitness of NCover.console and the bitness of the profiled process don't match -- typically NCover.Console is 64 bit and the profiled process is 32 bit. You can use ProcessExplorer or the Windows Task Manager to see if the mbunit process is running under WOW.

Stephen

RE: NCover on Windows Server 2008 64bit

by mbarrett on Wednesday August 13, 2008, 09:30 AM

Bingo - that's it. Should've thought of that!

So, I guess the thing to do is install the 32bit version of NCover?

RE: NCover on Windows Server 2008 64bit

by sporewell on Thursday August 14, 2008, 05:04 AM

actually, the 64-bit NCover MSI installs a 32-bit version of NCover into "C:\program files (x86)\ncover"

that directory doesn't get stuck on the PATH, but you can specify that version explicitly.
if you're profiling a gui or console app (i.e, NOT using the //iis or //svc arguments) you'll need to add the //reg argument to NCover's command line
and if you are using the //iis or //svc arguments, then you'll need to regsvr32 the NCover.Lib.x86.dll found in "C:\program files (x86)\ncover"

Stephen

RE: NCover on Windows Server 2008 64bit

by mbarrett on Tuesday August 19, 2008, 03:17 AM

Thanks for the pointer.

I've changed the appropriate paths, and it all works fine now.