Fsharp: Visual Studio crash (FailFast) when using git blame

Created on 11 Oct 2017  路  3Comments  路  Source: dotnet/fsharp

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 81d162ce55bd4c4c8bcd1eb2a0832c442888ec0e. 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)
Severity-High bug

Most helpful comment

This is fixed by #3777 (P2p references), as I can still reproduce it on master at 064d8043d09ee2794eb8a57a64ee61135a8c627d but it goes away when I compile from 44d5a22be2056c48f1b5e09b378727cf02c1b824.

All 3 comments

This is fixed by #3777 (P2p references), as I can still reproduce it on master at 064d8043d09ee2794eb8a57a64ee61135a8c627d but it goes away when I compile from 44d5a22be2056c48f1b5e09b378727cf02c1b824.

@dhwed Great to hear!

I will do my best to keep it working :-)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vasily-kirichenko picture vasily-kirichenko  路  3Comments

isaacabraham picture isaacabraham  路  4Comments

ctaggart picture ctaggart  路  3Comments

ploeh picture ploeh  路  3Comments

smoothdeveloper picture smoothdeveloper  路  3Comments