NCover on Windows Server 2008 64bit
NCover on Windows Server 2008 64bit
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* , sThrowInfo ) at ShMemReader.GetMemoryPointer(ShMemReader , UInt32 addr) at ShMemLinkedList.getHeadNode(ShMemLinkedList , ShM emReader rdr) at ShMemLinkedList.count(ShMemLinkedList , ShMemRead er rdr) at NCover.Data.MwShMemLinkedList<NCover::Interfaces::IModuleInfo ^\,ModuleInf 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
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
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
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
Thanks for the pointer.
I've changed the appropriate paths, and it all works fine now.