You might try installing Debugging Tools for Windows then use the -iae
option (for NTSD/CDB) or the -I
option (for WinDBG) to have one of the debuggers from that package be the JIT/AeDebug debugger.
I finally arrived at an exception type and callstack for the faulting compiler. I did this by saving a full dump file (.dump /ma c:\myCSCdump.dmp), then opening the dump file as you would open any other project file in VS2005. Pressing the run button produced the following in the call stack window:
kernel32.dll!_RaiseException@16() + 0x3c bytes
cslangsvc.dll!ALLOCHOST::ThrowOutOfMemoryException() + 0x10 bytes cslangsvc.dll!PAGEHEAP::AllocPages() + 0xc1fd8 bytes cslangsvc.dll!SYMTBL::GrowTable() + 0x5b bytes cslangsvc.dll!BSYMMGR::AddChild() + 0x3b bytes cslangsvc.dll!BSYMMGR::CreateGlobalSym() + 0x2ba bytes cslangsvc.dll!BSYMMGR::CreateMethod() + 0xc bytes cslangsvc.dll!IMPORTER::ImportMethod() + 0x1d9 bytes cslangsvc.dll!IMPORTER::DefineImportedType() + 0x3b2 bytes cslangsvc.dll!CLSDREC::prepareAggregate() + 0x8d bytes cslangsvc.dll!COMPILER::ForceAggStates() + 0x8e bytes cslangsvc.dll!COMPILER::ForceAggStates() + 0x127 bytes cslangsvc.dll!COMPILER::EnsureState() + 0x2e bytes cslangsvc.dll!CLSDREC::CheckForTypeErrors() + 0x23 bytes cslangsvc.dll!CLSDREC::CheckForTypeErrors() + 0x2ba bytes cslangsvc.dll!CLSDREC::CheckForTypeErrors() + 0x80 bytes cslangsvc.dll!CLSDREC::CheckForTypeErrors() + 0x8a bytes cslangsvc.dll!CLSDREC::CheckForTypeErrors() + 0x8a bytes cslangsvc.dll!CLSDREC::CheckForTypeErrors() + 0x8a bytes cslangsvc.dll!COMPILER::CheckForTypeErrors() + 0x100 bytes cslangsvc.dll!COMPILER::CompileAll() + 0x546 bytes cslangsvc.dll!COMPILER::Compile() + 0x7c bytes cslangsvc.dll!CController::RunCompiler() + 0x177 bytes cslangsvc.dll!CController::Compile() + 0x16 bytes cslangsvc.dll!CCSharpProjectSite::BuildProjectCore() + 0x5a bytes cslangsvc.dll!CProjectSite::BuildProject() + 0x11 bytes csproj.dll!CCSharpBuildCompiler::DoMainBuild() + 0x88 bytes csproj.dll!CCscMSBuildHostObject::Compile() + 0x4e bytes mscorwks.dll!_CLRToCOMWorker@8() + 0x171 bytes
This is a bit wordy, so I'll post it as a reply. It's taken from Microsoft Connect site, in response to my issue. Reader might find it relevant:
Date: Thu, 7 May 2009 19:14:52 -0700
Greetings from Microsoft Connect!
This notification was generated for feedback item: Nightly build troubles (bucket 365749762) which you submitted at the Microsoft Connect site.
Thanks for reporting this issue you've encountered with Visual Studio 2005, and thanks for the dumps you've provided!
It looks like the issue is in cslangsvc.dll (the in-process C# Compiler), which is DevEnv is calling into to perform your build.
Our suggestion to work around this issue would be to try using MSBuild instead to do your nightly builds, as this should be more robust than automating DevEnv /build. Specifically, you'll likely avoid this particular issue as MSBuild will use csc.exe for compilation rather than cslangsvc.dll.
We're unlikely to have a further VS 2005 release to get out a fix to the cslangsvc issue, so I'm resolving this bug Won't Fix, but please reactivate it if you do still see an issue when using MSBuild.
Thanks again for all the information on this issue!
Alex Turner Program Manager Visual C# Compiler