Skip to content

Instantly share code, notes, and snippets.

@Sebazzz
Created April 28, 2018 09:05
Show Gist options
  • Save Sebazzz/1078f8f5712c32347a63c3d9402c9ad9 to your computer and use it in GitHub Desktop.
Save Sebazzz/1078f8f5712c32347a63c3d9402c9ad9 to your computer and use it in GitHub Desktop.
It appears an ArgumentOutOfRangeException happens. Stack trace:
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.FileChangeTracker.<StartFileChangeListeningAsync>b__17_0()
at System.Lazy`1.CreateValue()
at System.Lazy`1.get_Value()
at Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.DocumentProvider.StandardTextDocument.GetInitialState()
at Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.AbstractProject.<>c.<CreateProjectInfoForCurrentState>b__113_0(IVisualStudioHostDocument d)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at System.Collections.Immutable.ImmutableArray.CreateRange[T](IEnumerable`1 items)
at Roslyn.Utilities.ImmutableArrayExtensions.ToImmutableArrayOrEmpty[T](IEnumerable`1 items)
at Roslyn.Utilities.ImmutableArrayExtensions.ToImmutableReadOnlyListOrEmpty[T](IEnumerable`1 items)
at Microsoft.CodeAnalysis.ProjectInfo..ctor(ProjectAttributes attributes, CompilationOptions compilationOptions, ParseOptions parseOptions, IEnumerable`1 documents, IEnumerable`1 projectReferences, IEnumerable`1 metadataReferences, IEnumerable`1 analyzerReferences, IEnumerable`1 additionalDocuments, Type hostObjectType)
at Microsoft.CodeAnalysis.ProjectInfo.Create(ProjectId id, VersionStamp version, String name, String assemblyName, String language, String filePath, String outputFilePath, CompilationOptions compilationOptions, ParseOptions parseOptions, IEnumerable`1 documents, IEnumerable`1 projectReferences, IEnumerable`1 metadataReferences, IEnumerable`1 analyzerReferences, IEnumerable`1 additionalDocuments, Boolean isSubmission, Type hostObjectType, Boolean hasAllInformation)
at Microsoft.CodeAnalysis.ProjectInfo.Create(ProjectId id, VersionStamp version, String name, String assemblyName, String language, String filePath, String outputFilePath, CompilationOptions compilationOptions, ParseOptions parseOptions, IEnumerable`1 documents, IEnumerable`1 projectReferences, IEnumerable`1 metadataReferences, IEnumerable`1 analyzerReferences, IEnumerable`1 additionalDocuments, Boolean isSubmission, Type hostObjectType)
at Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.AbstractProject.CreateProjectInfoForCurrentState()
at Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.VisualStudioProjectTracker.WorkspaceHostState.<>c.<StartPushingToWorkspaceAndNotifyOfOpenDocuments>b__13_0(AbstractProject p)
at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at System.Collections.Immutable.ImmutableArray.CreateRange[T](IEnumerable`1 items)
at System.Collections.Immutable.ImmutableArray.ToImmutableArray[TSource](IEnumerable`1 items)
at Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.VisualStudioProjectTracker.WorkspaceHostState.StartPushingToWorkspaceAndNotifyOfOpenDocuments(IEnumerable`1 projects)
at Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.VisualStudioProjectTracker.StartSendingEventsToWorkspaceHost(IVisualStudioWorkspaceHost host)
at Microsoft.VisualStudio.LanguageServices.Remote.ServiceHubRemoteHostClient.<>c__DisplayClass11_0.<RegisterWorkspaceHostAsync>b__0()
at Roslyn.Utilities.TaskFactoryExtensions.<>c__DisplayClass1_0.<SafeStartNew>g__wrapped|0()
The cause of the crash is a breakpoint being triggered at this call stack:
> Microsoft.CodeAnalysis.Workspaces.dll!Microsoft.CodeAnalysis.ErrorReporting.FatalError.Report(System.Exception exception, System.Action<System.Exception> handler) Unknown
Microsoft.CodeAnalysis.Workspaces.dll!Roslyn.Utilities.TaskFactoryExtensions.SafeStartNew.__wrapped|0() Unknown
[Native to Managed Transition]
mscorlib.dll!System.Lazy<uint?>.Value.get() Unknown
Microsoft.VisualStudio.LanguageServices.dll!Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.DocumentProvider.StandardTextDocument.GetInitialState() Unknown
Microsoft.VisualStudio.LanguageServices.dll!Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.AbstractProject.CreateProjectInfoForCurrentState.AnonymousMethod__113_0(Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.IVisualStudioHostDocument d) Unknown
System.Core.dll!System.Linq.Enumerable.WhereSelectEnumerableIterator<Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.IVisualStudioHostDocument, Microsoft.CodeAnalysis.DocumentInfo>.MoveNext() Unknown
System.Core.dll!System.Linq.Buffer<Microsoft.CodeAnalysis.DocumentInfo>.Buffer(System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.DocumentInfo> source) Unknown
System.Core.dll!System.Linq.Enumerable.ToArray<Microsoft.CodeAnalysis.DocumentInfo>(System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.DocumentInfo> source) Unknown
System.Collections.Immutable.dll!System.Collections.Immutable.ImmutableArray.CreateRange<Microsoft.CodeAnalysis.DocumentInfo>(System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.DocumentInfo> items) Unknown
Microsoft.CodeAnalysis.Workspaces.dll!Roslyn.Utilities.ImmutableArrayExtensions.ToImmutableArrayOrEmpty<Microsoft.CodeAnalysis.DocumentInfo>(System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.DocumentInfo> items) Unknown
Microsoft.CodeAnalysis.Workspaces.dll!Roslyn.Utilities.ImmutableArrayExtensions.ToImmutableReadOnlyListOrEmpty<Microsoft.CodeAnalysis.DocumentInfo>(System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.DocumentInfo> items) Unknown
Microsoft.CodeAnalysis.Workspaces.dll!Microsoft.CodeAnalysis.ProjectInfo.ProjectInfo(Microsoft.CodeAnalysis.ProjectInfo.ProjectAttributes attributes, Microsoft.CodeAnalysis.CompilationOptions compilationOptions, Microsoft.CodeAnalysis.ParseOptions parseOptions, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.DocumentInfo> documents, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.ProjectReference> projectReferences, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.MetadataReference> metadataReferences, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.Diagnostics.AnalyzerReference> analyzerReferences, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.DocumentInfo> additionalDocuments, System.Type hostObjectType) Unknown
Microsoft.CodeAnalysis.Workspaces.dll!Microsoft.CodeAnalysis.ProjectInfo.Create(Microsoft.CodeAnalysis.ProjectId id, Microsoft.CodeAnalysis.VersionStamp version, string name, string assemblyName, string language, string filePath, string outputFilePath, Microsoft.CodeAnalysis.CompilationOptions compilationOptions, Microsoft.CodeAnalysis.ParseOptions parseOptions, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.DocumentInfo> documents, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.ProjectReference> projectReferences, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.MetadataReference> metadataReferences, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.Diagnostics.AnalyzerReference> analyzerReferences, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.DocumentInfo> additionalDocuments, bool isSubmission, System.Type hostObjectType, bool hasAllInformation) Unknown
Microsoft.CodeAnalysis.Workspaces.dll!Microsoft.CodeAnalysis.ProjectInfo.Create(Microsoft.CodeAnalysis.ProjectId id, Microsoft.CodeAnalysis.VersionStamp version, string name, string assemblyName, string language, string filePath, string outputFilePath, Microsoft.CodeAnalysis.CompilationOptions compilationOptions, Microsoft.CodeAnalysis.ParseOptions parseOptions, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.DocumentInfo> documents, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.ProjectReference> projectReferences, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.MetadataReference> metadataReferences, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.Diagnostics.AnalyzerReference> analyzerReferences, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.DocumentInfo> additionalDocuments, bool isSubmission, System.Type hostObjectType) Unknown
Microsoft.VisualStudio.LanguageServices.dll!Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.AbstractProject.CreateProjectInfoForCurrentState() Unknown
Microsoft.VisualStudio.LanguageServices.dll!Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.VisualStudioProjectTracker.WorkspaceHostState.StartPushingToWorkspaceAndNotifyOfOpenDocuments.AnonymousMethod__13_0(Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.AbstractProject p) Unknown
System.Core.dll!System.Linq.Enumerable.WhereSelectListIterator<Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.AbstractProject, Microsoft.CodeAnalysis.ProjectInfo>.MoveNext() Unknown
System.Core.dll!System.Linq.Buffer<Microsoft.CodeAnalysis.ProjectInfo>.Buffer(System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.ProjectInfo> source) Unknown
System.Core.dll!System.Linq.Enumerable.ToArray<Microsoft.CodeAnalysis.ProjectInfo>(System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.ProjectInfo> source) Unknown
System.Collections.Immutable.dll!System.Collections.Immutable.ImmutableArray.CreateRange<Microsoft.CodeAnalysis.ProjectInfo>(System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.ProjectInfo> items) Unknown
System.Collections.Immutable.dll!System.Collections.Immutable.ImmutableArray.ToImmutableArray<Microsoft.CodeAnalysis.ProjectInfo>(System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.ProjectInfo> items) Unknown
Microsoft.VisualStudio.LanguageServices.dll!Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.VisualStudioProjectTracker.WorkspaceHostState.StartPushingToWorkspaceAndNotifyOfOpenDocuments(System.Collections.Generic.IEnumerable<Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.AbstractProject> projects) Unknown
Microsoft.VisualStudio.LanguageServices.dll!Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.VisualStudioProjectTracker.StartSendingEventsToWorkspaceHost(Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.IVisualStudioWorkspaceHost host) Unknown
Microsoft.VisualStudio.LanguageServices.dll!Microsoft.VisualStudio.LanguageServices.Remote.ServiceHubRemoteHostClient.RegisterWorkspaceHostAsync.AnonymousMethod__0() Unknown
Microsoft.CodeAnalysis.Workspaces.dll!Roslyn.Utilities.TaskFactoryExtensions.SafeStartNew.__wrapped|0() Unknown
mscorlib.dll!System.Threading.Tasks.Task.InnerInvoke() Unknown
mscorlib.dll!System.Threading.Tasks.Task.Execute() Unknown
mscorlib.dll!System.Threading.Tasks.Task.ExecutionContextCallback(object obj) Unknown
mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknown
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknown
mscorlib.dll!System.Threading.Tasks.Task.ExecuteWithThreadLocal(ref System.Threading.Tasks.Task currentTaskSlot) Unknown
mscorlib.dll!System.Threading.Tasks.Task.ExecuteEntry(bool bPreventDoubleExecution) Unknown
mscorlib.dll!System.Threading.Tasks.TaskScheduler.TryExecuteTask(System.Threading.Tasks.Task task) Unknown
Microsoft.CodeAnalysis.EditorFeatures.dll!Microsoft.CodeAnalysis.Editor.Shared.Utilities.SynchronizationContextTaskScheduler.PostCallback(object obj) 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.DispatcherOperation.InvokeImpl() Unknown
WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(object state) Unknown
WindowsBase.dll!MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(object obj) Unknown
mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknown
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknown
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Unknown
WindowsBase.dll!MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Unknown
WindowsBase.dll!System.Windows.Threading.DispatcherOperation.Invoke() Unknown
WindowsBase.dll!System.Windows.Threading.Dispatcher.ProcessQueue() Unknown
WindowsBase.dll!System.Windows.Threading.Dispatcher.WndProcHook(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) Unknown
WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) Unknown
WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o) 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!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam) Unknown
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment