project-system: VS Crashes when reloading a solution after a git checkout operation

Steps:

  1. Checkout master branch of github.com/dotnet/roslyn
  2. Load Roslyn.sln in VS 2017.
  3. From command line, checkout another branch, example: git checkout features/readonly-ref.
  4. Hit “Reload Solution” in the pop-up in VS.
  5. VS begins to unload projects, and then crashes.

I’ve a crash dump available to share:

Dump Summary

Dump File: devenv.exe.97388.csproj.dll.crash.dmp Last Write Time: 3/13/2017 1:56:52 PM Process Name: devenv.exe : C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\devenv.exe Process Architecture: x86 Exception Code: 0xC0000005 Exception Information: The thread tried to read from or write to a virtual address for which it does not have the appropriate access. Heap Information: Present

System Information

OS Version: 10.0.14393 CLR Version(s): 4.6.1586.0

Stack Trace

csproj.dll!CLangReference::Zombie() Line 382	C++
csproj.dll!CLanguageReferences::ZombieAllReferences() Line 7410	C++
csproj.dll!CLanguageReferences::Close() Line 7396	C++
csproj.dll!CLangBuildMgr::Close() Line 229	C++
csproj.dll!CCSharpBuildMgr::Close() Line 120	C++
csproj.dll!CLangProject::OnCloseHierarchy() Line 337	C++
csproj.dll!CVsProject::OnCloseHierarchy() Line 304	C++
csproj.dll!CLangHierarchy::Close() Line 407	C++
csproj.dll!CVsProjHierarchy::Close() Line 175	C++
csproj.dll!CCSharpProjHierarchy::Close() Line 45	C++
msenv.dll!CProject::Close(int fRemoveProjectDir) Line 615	C++
msenv.dll!CSolution::RemoveProjectByCProject(CProject * pProject, int fUnloadProject, int nUnloadReasonID, unsigned long dwUnloadStatus) Line 22057	C++
msenv.dll!CSolution::RemoveProjectByHierarchy(IVsHierarchy * pHierarchy, int fUnloadProject) Line 22015	C++
msenv.dll!CSolution::CloseSolutionElement(unsigned long grfCloseOpts, IVsHierarchy * pHier, unsigned long docCookie) Line 6032	C++
msenv.dll!CSolutionItemsProject::CloseChildren() Line 12812	C++
msenv.dll!CProject::Close(int fRemoveProjectDir) Line 594	C++
msenv.dll!CSolution::RemoveProjectByCProject(CProject * pProject, int fUnloadProject, int nUnloadReasonID, unsigned long dwUnloadStatus) Line 22057	C++
msenv.dll!CSolution::RemoveProjectByHierarchy(IVsHierarchy * pHierarchy, int fUnloadProject) Line 22015	C++
msenv.dll!CSolution::CloseSolutionElement(unsigned long grfCloseOpts, IVsHierarchy * pHier, unsigned long docCookie) Line 6032	C++
msenv.dll!CSolutionItemsProject::CloseChildren() Line 12812	C++
msenv.dll!CProject::Close(int fRemoveProjectDir) Line 594	C++
msenv.dll!CSolution::RemoveProjectByCProject(CProject * pProject, int fUnloadProject, int nUnloadReasonID, unsigned long dwUnloadStatus) Line 22057	C++
msenv.dll!CSolution::RemoveProjectByHierarchy(IVsHierarchy * pHierarchy, int fUnloadProject) Line 22015	C++
msenv.dll!CSolution::CloseSolutionElement(unsigned long grfCloseOpts, IVsHierarchy * pHier, unsigned long docCookie) Line 6032	C++
msenv.dll!CSolution::ClearProjectsInternal(bool fSkipNested, std::set<CProject *,std::less<CProject *>,std::allocator<CProject *> > & projectsAlreadyClosed) Line 12663	C++
msenv.dll!CSolution::Clear(bool bClearProjects) Line 12436	C++
msenv.dll!CSolution::Close(int fDoSave, int fSaveAll, int fUpdateMRU) Line 18324	C++
msenv.dll!CSolution::CloseSolutionElement(unsigned long grfCloseOpts, IVsHierarchy * pHier, unsigned long docCookie) Line 6036	C++
msenv.dll!CSolution::UnloadReloadSolution() Line 18762	C++
msenv.dll!CSolution::TimerWndProc(HWND__ * hwnd, unsigned int uMsg, unsigned int wParam, long lParam) Line 3193	C++
msenv.dll!CSolution::StaticTimerWndProc(HWND__ * hwnd, unsigned int uMsg, unsigned int wParam, long lParam) Line 3085	C++
user32.dll!__InternalCallWinProc@20() Line 116	Unknown
[Inline Frame] user32.dll!InternalCallWinProc(long(__stdcall*)(HWND__ *, unsigned int, unsigned int, long)) Line 81	C
user32.dll!UserCallWinProcCheckWow(_ACTIVATION_CONTEXT * pActCtx, void * pfn, HWND__ * hwnd, _WM_VALUE msg, unsigned int wParam, long lParam, void * fEnableLiteHooks, int) Line 231	C
user32.dll!DispatchMessageWorker(tagMSG * pmsg, int fAnsi) Line 3091	C
user32.dll!DispatchMessageW(const tagMSG * lpMsg) Line 1002	C
msenv.dll!MainMessageLoop::ProcessMessage(IMsoStdComponentMgr * pstdcm, IVsWindowManager * pIVsWindowManager, tagMSG & msg) Line 1521	C++
msenv.dll!CMsoCMHandler::EnvironmentMsgLoop() Line 450	C++
msenv.dll!CMsoCMHandler::FPushMessageLoop(unsigned long uReason) Line 358	C++
msenv.dll!SCM::FPushMessageLoop(SCMI * pscmi, unsigned long uReason, void * pvLoopData) Line 2262	C++
msenv.dll!SCM_MsoCompMgr::FPushMessageLoop(unsigned long dwComponentID, unsigned long uReason, void * pvLoopData) Line 2998	C++
msenv.dll!CMsoComponent::PushMsgLoop(unsigned long msgloop) Line 705	C++
msenv.dll!VStudioMainLogged() Line 1178	C++
msenv.dll!VStudioMain(MAINPARAM * pMainParam) Line 1259	C++
devenv.exe!util_CallVsMain(MAINPARAM * pMainParam, int * piRes) Line 1088	C++
devenv.exe!CDevEnvAppId::Run(wchar_t * wszCmdLine, int nCmdShow) Line 855	C++
devenv.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * __formal, char * lpCmdLine, int nCmdShow) Line 71	C++
[Inline Frame] devenv.exe!invoke_main() Line 94	C++
devenv.exe!__scrt_common_main_seh() Line 259	C++
kernel32.dll!BaseThreadInitThunk(unsigned long RunProcessInit, long(__stdcall*)(void *) StartAddress, void * Argument) Line 64	C
ntdll.dll!__RtlUserThreadStart(long(__stdcall*)(void *) StartAddress, void * Argument) Line 997	C
ntdll.dll!_RtlUserThreadStart(long(__stdcall*)(void *) StartAddress, void * Argument) Line 914	C

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 17 (14 by maintainers)

Most upvoted comments

A crash dump with heap matching @OmarTawfik’s call stack has been collected.