devenv.exe调试后崩溃

devenv.exe crash after debugging

当我尝试在调试停止后编辑源代码时,我的 Visual Studio 2015(带有 update3)崩溃了。 (它也发生在 C# WinForm、WPF 和控制台项目上)
一个月前还好......

我得到了一个 System.AccessViolationException 的崩溃。
而且我调试的时候发现了一些奇怪的东西:

我已经修复了Visual Studio,但是还是报错


操作系统:Windows7x64
System.AccessViolationException 未处理 消息:类型 'System.AccessViolationException' 未处理的异常发生在 Microsoft.VisualStudio.LanguageServices.dll

At System.AccessViolationException thrown exception: "Microsoft.VisualStudio.LanguageServices.dll' Microsoft.VisualStudio.LanguageServices.dll! Microsoft.VisualStudio.LanguageServices.Implementation.EditAndContinue.VsENCRebuildableProjectImpl.OnReadOnlyDocumentEditAttempt (Microsoft.CodeAnalysis.DocumentId documentId, Microsoft.CodeAnalysis.EditAndContinue.SessionReadOnlyReason sessionReason, Microsoft.CodeAnalysis.EditAndContinue.ProjectReadOnlyReason projectReason) Unknown  Microsoft.VisualStudio.LanguageServices.dll! Microsoft.VisualStudio.LanguageServices.Implementation.EditAndContinue.VsENCRebuildableProjectImpl.OnEdit (Microsoft.CodeAnalysis.DocumentId documentId) Unknown  Microsoft.VisualStudio.LanguageServices.dll! Microsoft.VisualStudio.LanguageServices.Implementation.AbstractVsTextViewFilter .Microsoft.VisualStudio.TextManager.Interop.IVsReadOnlyViewNotification.OnDisabledEditingCommand (ref System.Guid pguidCmdGuid, uint dwCmdId) unknown  Microsoft.VisualStudio.Editor.Implementation.dll! Microsoft.VisualStudio.Editor.Implementation.SimpleTextViewWindow.OnDisabledEditingCommand (ref System.Guid pguidCmdGuid, uint dwCmdId) Unknown  Microsoft.VisualStudio.Editor.Implementation.dll! Microsoft.VisualStudio.Editor.Implementation.SimpleTextViewWindow.InnerExec (ref System.Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, System.IntPtr pvaIn, System.IntPtr pvaOut) Unknown  Microsoft.VisualStudio.Editor.Implementation.dll! Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.Exec (ref System.Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, System.IntPtr pvaIn, System.IntPtr pvaOut) Unknown  Microsoft.VisualStudio.Editor.Implementation.dll! Microsoft.VisualStudio.Editor.Implementation.Undo.UndoManagerCommandFilter.Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget.Exec (ref System.Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, System.IntPtr pvaIn , System.IntPtr pvaOut) unknown  Microsoft.VisualStudio.Editor.Implementation.dll! Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.InnerExec (ref System.Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, System.IntPtr pvaIn, System.IntPtr pvaOut) Unknown  Microsoft.VisualStudio.Editor.Implementation.dll! Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.Exec (ref System.Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, System.IntPtr pvaIn, System.IntPtr pvaOut) Unknown  Microsoft.VisualStudio.Editor.Implementation.dll! Microsoft.VisualStudio.Editor.Implementation.VerticalDetail.VerticalContentCommandFilter.Exec (ref System.Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, System.IntPtr pvaIn, System.IntPtr pvaOut) Unknown  Microsoft.VisualStudio.Editor.Implementation.dll! Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.InnerExec (ref System.Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, System.IntPtr pvaIn, System.IntPtr pvaOut) Unknown  Microsoft.VisualStudio.Editor.Implementation.dll! Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.Exec (ref System.Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, System.IntPtr pvaIn, System.IntPtr pvaOut) Unknown  Microsoft.VisualStudio.Editor.Implementation.dll! Microsoft.VisualStudio.Editor.Implementation.Find.FindCommandFilter.Exec (ref System.Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, System.IntPtr pvaIn, System.IntPtr pvaOut) Unknown  Microsoft.VisualStudio.Editor.Implementation.dll! Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.InnerExec (ref System.Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, System.IntPtr pvaIn, System.IntPtr pvaOut) Unknown  Microsoft.VisualStudio.Editor.Implementation.dll! Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.Exec (ref System.Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, System.IntPtr pvaIn, System.IntPtr pvaOut) Unknown  Microsoft.VisualStudio.Editor.Implementation.dll! Microsoft.VisualStudio.Editor.Implementation.IntellisenseCommandFilter.Exec (ref System.Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, System.IntPtr pvaIn, System.IntPtr pvaOut) Unknown  Microsoft.VisualStudio.Editor.Implementation.dll! Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.InnerExec (ref System.Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, System.IntPtr pvaIn, System.IntPtr pvaOut) Unknown  Microsoft.VisualStudio.Editor.Implementation.dll! Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.Exec (ref System.Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, System.IntPtr pvaIn, System.IntPtr pvaOut) Unknown  Microsoft.VisualStudio.Editor.Implementation.dll! Microsoft.VisualStudio.Editor.Implementation.BraceCompletionCommandFilter.Exec (ref System.Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, System.IntPtr pvaIn, System.IntPtr pvaOut) Unknown  Microsoft.VisualStudio.Editor.Implementation.dll! Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.InnerExec (ref System.Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, System.IntPtr pvaIn, System.IntPtr pvaOut) Unknown  Microsoft.VisualStudio.Editor.Implementation.dll! Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.Exec (ref System.Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, System.IntPtr pvaIn, System.IntPtr pvaOut) Unknown  Microsoft.VisualStudio.Editor.Implementation.dll! Microsoft.VisualStudio.Editor.Implementation.CommandFilterWrapper.Exec (ref System.Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, System.IntPtr pvaIn, System.IntPtr pvaOut) Unknown  Microsoft.VisualStudio.Editor.Implementation.dll! Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.InnerExec (ref System.Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, System.IntPtr pvaIn, System.IntPtr pvaOut) Unknown  Microsoft.VisualStudio.Editor.Implementation.dll! Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.Exec (ref System.Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, System.IntPtr pvaIn, System.IntPtr pvaOut) Unknown  Microsoft.VisualStudio.Editor.Implementation.dll! Microsoft.VisualStudio.Editor.Implementation.CommandFilterWrapper.Exec (ref System.Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, System.IntPtr pvaIn, System.IntPtr pvaOut) Unknown  Microsoft.VisualStudio.Editor.Implementation.dll! Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.InnerExec (ref System.Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, System.IntPtr pvaIn, System.IntPtr pvaOut) Unknown  Microsoft.VisualStudio.Editor.Implementation.dll! Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.Exec (ref System.Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, System.IntPtr pvaIn, System.IntPtr pvaOut) Unknown  Microsoft.VisualStudio.LanguageServices.dll! Microsoft.VisualStudio.LanguageServices.Implementation.AbstractOleCommandTarget.ExecuteVisualStudio2000.AnonymousMethod__0 () Unknown  Microsoft.CodeAnalysis.CSharp.EditorFeatures.dll! Microsoft.CodeAnalysis.Editor.CSharp.EventHookup.EventHookupCommandHandler.ExecuteCommand (Microsoft.CodeAnalysis.Editor.Commands.TypeCharCommandArgs args, System.Action nextHandler) Unknown  Microsoft.CodeAnalysis.EditorFeatures.dll! Microsoft.CodeAnalysis.Editor.Implementation.Commands.CommandHandlerService.ExecuteHandlers.AnonymousMethod__1 () Unknown  Microsoft.CodeAnalysis.EditorFeatures.dll! Microsoft.CodeAnalysis.Editor.Implementation.DocumentationComments.AbstractDocumentationCommentCommandHandler .ExecuteCommand (Microsoft.CodeAnalysis.Editor.Commands .TypeCharCommandArgs args, System.Action nextHandler) unknown  Microsoft.CodeAnalysis.EditorFeatures.dll! Microsoft.CodeAnalysis.Editor.Implementation.Commands.CommandHandlerService.ExecuteHandlers.AnonymousMethod__1 () Unknown  Microsoft.CodeAnalysis.EditorFeatures.dll! Microsoft.CodeAnalysis.Editor.Implementation.IntelliSense.Completion.Controller.Microsoft.CodeAnalysis.Editor.ICommandHandler .ExecuteCommand (Microsoft.CodeAnalysis.Editor.Commands .TypeCharCommandArgs args, System.Action nextHandler) unknown  Microsoft.CodeAnalysis.EditorFeatures.dll! Microsoft.CodeAnalysis.Editor.CommandHandlers.AbstractCompletionCommandHandler.ExecuteCommandWorker (Microsoft.CodeAnalysis.Editor.Commands.TypeCharCommandArgs args, System.Action nextHandler) Unknown  Microsoft.CodeAnalysis.EditorFeatures.dll! Microsoft.CodeAnalysis.Editor.CommandHandlers.AbstractCompletionCommandHandler.Microsoft.CodeAnalysis.Editor.ICommandHandler .ExecuteCommand (Microsoft.CodeAnalysis.Editor.Commands.TypeCharCommandArgs args, System.Action nextHandler) unknown  Microsoft.CodeAnalysis.EditorFeatures.dll! Microsoft.CodeAnalysis.Editor.Implementation.Commands.CommandHandlerService.ExecuteHandlers.AnonymousMethod__1 () Unknown  Microsoft.CodeAnalysis.EditorFeatures.dll! Microsoft.CodeAnalysis.Editor.Implementation.IntelliSense.SignatureHelp.Controller.Microsoft.CodeAnalysis.Editor.ICommandHandler .ExecuteCommand (Microsoft.CodeAnalysis.Editor.Commands .TypeCharCommandArgs args, System.Action nextHandler) unknown  Microsoft.CodeAnalysis.EditorFeatures.dll! Microsoft.CodeAnalysis.Editor.CommandHandlers.SignatureHelpCommandHandler.ExecuteCommandWorker (Microsoft.CodeAnalysis.Editor.Commands.TypeCharCommandArgs args, System.Action nextHandler) Unknown  Microsoft.CodeAnalysis.EditorFeatures.dll! Microsoft.CodeAnalysis.Editor.CommandHandlers.SignatureHelpCommandHandler.Microsoft.CodeAnalysis.Editor.ICommandHandler .ExecuteCommand (Microsoft.CodeAnalysis.Editor.Commands.TypeCharCommandArgs args, System.Action nextHandler) unknown  Microsoft.CodeAnalysis.EditorFeatures.dll! Microsoft.CodeAnalysis.Editor.Implementation.Commands.CommandHandlerService.ExecuteHandlers.AnonymousMethod__1 () Unknown  Microsoft.CodeAnalysis.EditorFeatures.dll! Microsoft.CodeAnalysis.Editor.Implementation.Formatting.FormatCommandHandler.ExecuteReturnOrTypeCommand (Microsoft.CodeAnalysis.Editor.CommandArgs args, System.Action nextHandler, System.Threading.CancellationToken cancellationToken) Unknown  Microsoft.CodeAnalysis.EditorFeatures.dll! Microsoft.CodeAnalysis.Editor.Implementation.Formatting.FormatCommandHandler.ExecuteCommand (Microsoft.CodeAnalysis.Editor.Commands.TypeCharCommandArgs args, System.Action nextHandler) Unknown  Microsoft.CodeAnalysis.EditorFeatures.dll! Microsoft.CodeAnalysis.Editor.Implementation.Commands.CommandHandlerService.ExecuteHandlers.AnonymousMethod__1 () Unknown  Microsoft.CodeAnalysis.EditorFeatures.dll! Microsoft.CodeAnalysis.Editor.Implementation.DocumentationComments.AbstractXmlTagCompletionCommandHandler.ExecuteCommand (Microsoft.CodeAnalysis.Editor.Commands.TypeCharCommandArgs args, System.Action nextHandler) Unknown  Microsoft.CodeAnalysis.EditorFeatures.dll! Microsoft.CodeAnalysis.Editor.Implementation.Commands.CommandHandlerService.ExecuteHandlers.AnonymousMethod__1 () Unknown  Microsoft.CodeAnalysis.EditorFeatures.dll! Microsoft.CodeAnalysis.Editor.Implementation.InlineRename.RenameCommandHandler.HandlePossibleTypingCommand (Microsoft.CodeAnalysis.Editor.CommandArgs args, System.Action nextHandler, System.Action actionIfInsideActiveSpan) unknown  Microsoft.CodeAnalysis.EditorFeatures.dll! Microsoft.CodeAnalysis.Editor.Implementation.InlineRename.RenameCommandHandler.ExecuteCommand (Microsoft.CodeAnalysis.Editor.Commands.TypeCharCommandArgs args, System.Action nextHandler) Unknown  Microsoft.CodeAnalysis.EditorFeatures.dll! Microsoft.CodeAnalysis.Editor.Implementation.Commands.CommandHandlerService.ExecuteHandlers (System.Collections.Generic.IList > commandHandlers, Microsoft.CodeAnalysis.Editor.Commands.TypeCharCommandArgs args, System.Action lastHandler) unknown  Microsoft.CodeAnalysis.EditorFeatures.dll! Microsoft.CodeAnalysis.Editor.Implementation.Commands.CommandHandlerService.Execute (Microsoft.VisualStudio.Utilities.IContentType contentType, Microsoft.CodeAnalysis.Editor.Commands. TypeCharCommandArgs args, System.Action lastHandler) unknown  Microsoft.VisualStudio.LanguageServices.dll! Microsoft.VisualStudio.LanguageServices.Implementation.AbstractOleCommandTarget.ExecuteTypeCharacter (System.IntPtr pvaIn, Microsoft.VisualStudio.Text.ITextBuffer subjectBuffer, Microsoft.VisualStudio.Utilities.IContentType contentType, System.Action executeNextCommandTarget) Unknown  Microsoft.VisualStudio.LanguageServices.dll! Microsoft.VisualStudio.LanguageServices.Implementation.AbstractOleCommandTarget.ExecuteVisualStudio2000 (ref System.Guid pguidCmdGroup, uint commandId, uint executeInformation, System.IntPtr pvaIn, System.IntPtr pvaOut, Microsoft.VisualStudio.Text.ITextBuffer subjectBuffer , Microsoft.VisualStudio.Utilities.IContentType contentType) unknown  Microsoft.VisualStudio.LanguageServices.dll! Microsoft.VisualStudio.LanguageServices.Implementation.AbstractOleCommandTarget.Exec (ref System.Guid pguidCmdGroup, uint commandId, uint executeInformation, System.IntPtr pvaIn, System.IntPtr pvaOut) Unknown  Microsoft.VisualStudio.Editor.Implementation.dll! Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.InnerExec (ref System.Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, System.IntPtr pvaIn, System.IntPtr pvaOut) Unknown  Microsoft.VisualStudio.Editor.Implementation.dll! Microsoft.VisualStudio.Editor.Implementation.SimpleTextViewWindow.Exec (ref System.Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, System.IntPtr pvaIn, System.IntPtr pvaOut) Unknown  Microsoft.VisualStudio.Editor.Implementation.dll! Microsoft.VisualStudio.Editor.Implementation.VsKeyboardFilter.SendCommand (System.Guid cmdGroup, uint cmdID, object inParam) Unknown  Microsoft.VisualStudio.Editor.Implementation.dll! Microsoft.VisualStudio.Editor.Implementation.VsKeyboardFilter.TextInput (System.Windows.Input.TextCompositionEventArgs args) Unknown  Microsoft.VisualStudio.Platform.VSEditor.dll! Microsoft.VisualStudio.Text.Editor.Implementation.KeyProcessorDispatcher.DispatchTextInputEvents.AnonymousMethod__6_0 (Microsoft.VisualStudio.Text.Editor.KeyProcessor p, System.Windows.Input.TextCompositionEventArgs args) Unknown  Microsoft.VisualStudio.Platform.VSEditor.dll! Microsoft.VisualStudio.Text.Editor.Implementation.KeyProcessorDispatcher.Dispatch.AnonymousMethod__0 () Unknown  Microsoft.VisualStudio.Platform.VSEditor.dll! Microsoft.VisualStudio.Text.Utilities.GuardedOperations.CallExtensionPoint (object errorSource, System.Action call) Unknown  Microsoft.VisualStudio.Platform.VSEditor.dll! Microsoft.VisualStudio.Text.Editor.Implementation.KeyProcessorDispatcher.Dispatch (System.Action action, System.Windows.Input.TextCompositionEventArgs args) unknown  Microsoft.VisualStudio.Platform.VSEditor.dll! Microsoft.VisualStudio.Text.Editor.Implementation.KeyProcessorDispatcher.MakeHandler.AnonymousMethod__0 (object sender, System.Windows.Input.TextCompositionEventArgs args) Unknown  PresentationCore.dll! System.Windows.Input.TextCompositionEventArgs.InvokeEventHandler (System.Delegate genericHandler, object genericTarget) Unknown  PresentationCore.dll! System.Windows.RoutedEventArgs.InvokeHandler (System.Delegate handler, object target) Unknown  PresentationCore.dll! System.Windows.RoutedEventHandlerInfo.InvokeHandler (object target, System.Windows.RoutedEventArgs routedEventArgs) Unknown  PresentationCore.dll! System.Windows.EventRoute.InvokeHandlersImpl (object source, System.Windows.RoutedEventArgs args, bool reRaised) Unknown  PresentationCore.dll! System.Windows.UIElement.RaiseEventImpl (System.Windows.DependencyObject sender, System.Windows.RoutedEventArgs args) Unknown  PresentationCore.dll! System.Windows.UIElement.RaiseTrustedEvent (System.Windows.RoutedEventArgs args) Unknown  PresentationCore.dll! System.Windows.Input.InputManager.ProcessStagingArea () Unknown  PresentationCore.dll! System.Windows.Input.InputManager.ProcessInput (System.Windows.Input.InputEventArgs input) Unknown  PresentationCore.dll! System.Windows.Input.TextCompositionManager.UnsafeCompleteComposition (System.Windows.Input.TextComposition composition) Unknown  PresentationCore.dll! System.Windows.Input.TextCompositionManager.PostProcessInput (object sender, System.Windows.Input.ProcessInputEventArgs e) Unknown  PresentationCore.dll! System.Windows.Input.InputManager.RaiseProcessInputEventHandlers (System.Windows.Input.ProcessInputEventHandler postProcessInput, System.Windows.Input.ProcessInputEventArgs processInputEventArgs) Unknown  PresentationCore.dll! System.Windows.Input.InputManager.ProcessStagingArea () Unknown  PresentationCore.dll! System.Windows.Input.InputManager.ProcessInput (System.Windows.Input.InputEventArgs input) Unknown  PresentationCore.dll! System.Windows.Input.TextCompositionManager.UnsafeStartComposition (System.Windows.Input.TextComposition composition) Unknown  PresentationCore.dll! System.Windows.Input.TextCompositionManager.PostProcessInput (object sender, System.Windows.Input.ProcessInputEventArgs e) Unknown  PresentationCore.dll! System.Windows.Input.InputManager.RaiseProcessInputEventHandlers (System.Windows.Input.ProcessInputEventHandler postProcessInput, System.Windows.Input.ProcessInputEventArgs processInputEventArgs) Unknown  PresentationCore.dll! System.Windows.Input.InputManager.ProcessStagingArea () Unknown  PresentationCore.dll! System.Windows.Input.InputManager.ProcessInput (System.Windows.Input.InputEventArgs input) Unknown  PresentationCore.dll! System.Windows.Input.InputProviderSite.ReportInput (System.Windows.Input.InputReport inputReport) Unknown  PresentationCore.dll! System.Windows.Interop.HwndKeyboardInputProvider.ProcessTextInputAction (System.IntPtr hwnd, MS.Internal.Interop.WindowMessage msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) Unknown  PresentationCore.dll! System.Windows.Interop.HwndSource.OnPreprocessMessage (object param) Unknown  WindowsBase.dll! System.Windows.Threading.ExceptionWrapper.InternalRealCall (System.Delegate callback, object args, int numArgs) Unknown  WindowsBase.dll! System.Windows.Threading.ExceptionWrapper.TryCatchWhen (object source, System.Delegate callback, object args, int numArgs, System.Delegate catchHandler) Unknown  WindowsBase.dll! System.Windows.Threading.Dispatcher.LegacyInvokeImpl (System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, int numArgs) Unknown  WindowsBase.dll! System.Windows.Threading.Dispatcher.Invoke (System.Windows.Threading.DispatcherPriority priority, System.Delegate method, object arg) Unknown  PresentationCore.dll! System.Windows.Interop.HwndSource.OnPreprocessMessageThunk (ref System.Windows.Interop.MSG msg, ref bool handled) Unknown  PresentationCore.dll! System.Windows.Interop.HwndSource.WeakEventPreprocessMessage.OnPreprocessMessage (ref System.Windows.Interop.MSG msg, ref bool handled) Unknown  WindowsBase.dll! System.Windows.Interop.ComponentDispatcherThread.RaiseThreadMessage (ref System.Windows.Interop.MSG msg) Unknown  Microsoft.VisualStudio.Platform.WindowManagement.dll! Microsoft.VisualStudio.Platform.WindowManagement.WindowManagerService.PreTranslateInput (ref Microsoft.VisualStudio.OLE.Interop.MSG oleMsg, bool handled) Unknown

像 Hans Passant 的建议一样,至少,您在 TOOLS->Options->Debugging 下禁用 "Edit and Continue" 功能后解决了 VS 崩溃问题。

另外,如果看不到局部变量,请检查是否与调试选项"Use Managed Compatibility Mode"和"Use Native Compatibility Mode"有关。