Skip to content

Visual Studio crash (FailFast) when using git blame #3734

@dhwed

Description

@dhwed

Every time I do a git blame in VS (right click in an fsharp file, Source Control -> Git Blame (Annotate)), I get a VS crash.

I'm using VS 15.4 and a manually compiled vsix from 81d162c. This crash does not happen on stock VS 15.4.

Application: devenv.exe
Framework Version: v4.0.30319
Description: The application requested process termination through System.Environment.FailFast(string message).
Message: System.ArgumentNullException: Value cannot be null.
Parameter name: project
   at Microsoft.VisualStudio.Shell.PackageUtilities.IsCapabilityMatch(IVsHierarchy project, String capabilityAppliesToExpression)
   at Microsoft.VisualStudio.FSharp.Editor.FSharpProjectOptionsManager.UpdateProjectInfoWithProjectId(ProjectId projectId, String userOpName)
   at <StartupCode$FSharp-Editor>[email protected](WorkspaceChangeEventArgs args)
   at Microsoft.FSharp.Control.CommonExtensions.SubscribeToObservable@1730.System-IObserver`1-OnNext(T args)
   at Microsoft.FSharp.Core.CompilerServices.RuntimeHelpers.h@349.Invoke(Object _arg1, TArgs args)
   at <StartupCode$FSharp-Editor>[email protected](Object delegateArg0, WorkspaceChangeEventArgs delegateArg1)
   at Microsoft.CodeAnalysis.Workspace.<>c__DisplayClass191_1.<RaiseWorkspaceChangedEventAsync>b__1(EventHandler`1 handler)
   at Roslyn.Utilities.EventMap.Registry`1.Invoke(Action`1 invoker)
   at Roslyn.Utilities.EventMap.EventHandlerSet`1.RaiseEvent(Action`1 invoker)
   at Microsoft.CodeAnalysis.Workspace.<>c__DisplayClass191_0.<RaiseWorkspaceChangedEventAsync>b__0()
   at Roslyn.Utilities.TaskExtensions.<>c__DisplayClass15_0.<ContinueWithAfterDelay>b__1(Task _)
   at Roslyn.Utilities.TaskExtensions.<>c__DisplayClass3_0.<SafeContinueWith>b__0(Task antecedent)
   at Roslyn.Utilities.TaskExtensions.<>c__DisplayClass7_0`1.<SafeContinueWith>b__0(Task t)
Stack:
   at System.Environment.FailFast(System.String, System.Exception)
   at Microsoft.CodeAnalysis.FailFast.OnFatalException(System.Exception)
   at Microsoft.CodeAnalysis.ErrorReporting.FatalError.Report(System.Exception, System.Action`1<System.Exception>)
   at Microsoft.CodeAnalysis.ErrorReporting.FatalError.ReportUnlessCanceled(System.Exception)
   at Roslyn.Utilities.TaskExtensions+<>c__DisplayClass7_0`1[[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].<SafeContinueWith>b__0(System.Threading.Tasks.Task)
   at Microsoft.VisualStudio.Shell.PackageUtilities.IsCapabilityMatch(Microsoft.VisualStudio.Shell.Interop.IVsHierarchy, System.String)
   at Microsoft.VisualStudio.FSharp.Editor.FSharpProjectOptionsManager.UpdateProjectInfoWithProjectId(Microsoft.CodeAnalysis.ProjectId, System.String)
   at <StartupCode$FSharp-Editor>[email protected](Microsoft.CodeAnalysis.WorkspaceChangeEventArgs)
   at Microsoft.FSharp.Control.CommonExtensions+SubscribeToObservable@1730[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].System-IObserver`1-OnNext(System.__Canon)
   at Microsoft.FSharp.Core.CompilerServices.RuntimeHelpers+h@349[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Invoke(System.Object, System.__Canon)
   at <StartupCode$FSharp-Editor>[email protected](System.Object, Microsoft.CodeAnalysis.WorkspaceChangeEventArgs)
   at Microsoft.CodeAnalysis.Workspace+<>c__DisplayClass191_1.<RaiseWorkspaceChangedEventAsync>b__1(System.EventHandler`1<Microsoft.CodeAnalysis.WorkspaceChangeEventArgs>)
   at Roslyn.Utilities.EventMap+Registry`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Invoke(System.Action`1<System.__Canon>)
   at Roslyn.Utilities.EventMap+EventHandlerSet`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].RaiseEvent(System.Action`1<System.__Canon>)
   at Microsoft.CodeAnalysis.Workspace+<>c__DisplayClass191_0.<RaiseWorkspaceChangedEventAsync>b__0()
   at Roslyn.Utilities.TaskExtensions+<>c__DisplayClass15_0.<ContinueWithAfterDelay>b__1(System.Threading.Tasks.Task)
   at Roslyn.Utilities.TaskExtensions+<>c__DisplayClass3_0.<SafeContinueWith>b__0(System.Threading.Tasks.Task)
   at Roslyn.Utilities.TaskExtensions+<>c__DisplayClass7_0`1[[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].<SafeContinueWith>b__0(System.Threading.Tasks.Task)
   at System.Threading.Tasks.ContinuationResultTaskFromTask`1[[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
   at System.Threading.Tasks.Task.ExecutionContextCallback(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef)
   at System.Threading.Tasks.Task.ExecuteEntry(Boolean)
   at System.Threading.Tasks.TaskScheduler.TryExecuteTask(System.Threading.Tasks.Task)
   at Microsoft.CodeAnalysis.Editor.Shared.Utilities.SynchronizationContextTaskScheduler.PostCallback(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
   at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugImpact-High(Internal MS Team use only) Describes an issue with extreme impact on existing code.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions