Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VisualStudio crashing RoslynCodeAnalysisService when pasting code. #49401

Closed
nathan130200 opened this issue Nov 16, 2020 · 4 comments
Closed
Labels
Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead

Comments

@nathan130200
Copy link

nathan130200 commented Nov 16, 2020

Version Used:
Visual Studio 2019 Community (16.8.1)

Steps to Reproduce:

  1. Copy csharp code.
  2. Paste into VS 2019
  3. Roslyn display "Unknown error" msgbox
  4. Go Windows Log Event Viewer, and see ArgumentOutOfRangeException throwed by roslyn.

Expected Behavior:
Paste code normally in editor.

Actual Behavior:
Roslyn crashes and i need to restart entire IDE.

Stacktrace collected in windows logs viewer

System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: start
   at Microsoft.CodeAnalysis.Text.TextSpan..ctor(Int32 start, Int32 length)
   at Microsoft.CodeAnalysis.Text.ChangedText.Merge(ImmutableArray`1 oldChanges, ImmutableArray`1 newChanges)
   at Microsoft.CodeAnalysis.Text.ChangedText.Merge(IReadOnlyList`1 changeSets)
   at Microsoft.CodeAnalysis.Text.ChangedText.GetChangeRanges(SourceText oldText)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxTree.WithChangedText(SourceText newText)
   at Microsoft.CodeAnalysis.DocumentState.IncrementallyParse(TextAndVersion newTextAndVersion, TreeAndVersion oldTreeAndVersion, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.DocumentState.<IncrementallyParseTreeAsync>d__23.MoveNext()
Stack Trace:
   at System.Environment.FailFast(System.String, System.Exception)
   at Microsoft.CodeAnalysis.FailFast.OnFatalException(System.Exception)
   at Microsoft.CodeAnalysis.ErrorReporting.FatalError.ReportUnlessCanceled(System.Exception)
   at Microsoft.CodeAnalysis.DocumentState+<IncrementallyParseTreeAsync>d__23.MoveNext()
   at Microsoft.CodeAnalysis.Text.TextSpan..ctor(Int32, Int32)
   at Microsoft.CodeAnalysis.Text.ChangedText.Merge(System.Collections.Immutable.ImmutableArray`1<Microsoft.CodeAnalysis.Text.TextChangeRange>, System.Collections.Immutable.ImmutableArray`1<Microsoft.CodeAnalysis.Text.TextChangeRange>)
   at Microsoft.CodeAnalysis.Text.ChangedText.Merge(System.Collections.Generic.IReadOnlyList`1<System.Collections.Immutable.ImmutableArray`1<Microsoft.CodeAnalysis.Text.TextChangeRange>>)
   at Microsoft.CodeAnalysis.Text.ChangedText.GetChangeRanges(Microsoft.CodeAnalysis.Text.SourceText)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxTree.WithChangedText(Microsoft.CodeAnalysis.Text.SourceText)

  ...more 165 lines truncated from stack trace...
Full stack trace
Application: ServiceHub.RoslynCodeAnalysisService.exe

[System.ArgumentOutOfRangeException]: Specified argument was out of the range of valid values.
Parameter name: start
   at Microsoft.CodeAnalysis.Text.TextSpan..ctor(Int32 start, Int32 length)
   at Microsoft.CodeAnalysis.Text.ChangedText.Merge(ImmutableArray`1 oldChanges, ImmutableArray`1 newChanges)
   at Microsoft.CodeAnalysis.Text.ChangedText.Merge(IReadOnlyList`1 changeSets)
   at Microsoft.CodeAnalysis.Text.ChangedText.GetChangeRanges(SourceText oldText)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxTree.WithChangedText(SourceText newText)
   at Microsoft.CodeAnalysis.DocumentState.IncrementallyParse(TextAndVersion newTextAndVersion, TreeAndVersion oldTreeAndVersion, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.DocumentState.<IncrementallyParseTreeAsync>d__23.MoveNext()
Stack Trace:
   at System.Environment.FailFast(System.String, System.Exception)
   at Microsoft.CodeAnalysis.FailFast.OnFatalException(System.Exception)
   at Microsoft.CodeAnalysis.ErrorReporting.FatalError.ReportUnlessCanceled(System.Exception)
   at Microsoft.CodeAnalysis.DocumentState+<IncrementallyParseTreeAsync>d__23.MoveNext()
   at Microsoft.CodeAnalysis.Text.TextSpan..ctor(Int32, Int32)
   at Microsoft.CodeAnalysis.Text.ChangedText.Merge(System.Collections.Immutable.ImmutableArray`1<Microsoft.CodeAnalysis.Text.TextChangeRange>, System.Collections.Immutable.ImmutableArray`1<Microsoft.CodeAnalysis.Text.TextChangeRange>)
   at Microsoft.CodeAnalysis.Text.ChangedText.Merge(System.Collections.Generic.IReadOnlyList`1<System.Collections.Immutable.ImmutableArray`1<Microsoft.CodeAnalysis.Text.TextChangeRange>>)
   at Microsoft.CodeAnalysis.Text.ChangedText.GetChangeRanges(Microsoft.CodeAnalysis.Text.SourceText)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxTree.WithChangedText(Microsoft.CodeAnalysis.Text.SourceText)
   at Microsoft.CodeAnalysis.DocumentState.IncrementallyParse(Microsoft.CodeAnalysis.TextAndVersion, Microsoft.CodeAnalysis.TreeAndVersion, System.Threading.CancellationToken)
   at Microsoft.CodeAnalysis.DocumentState+<IncrementallyParseTreeAsync>d__23.MoveNext()
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Start[[Microsoft.CodeAnalysis.DocumentState+<IncrementallyParseTreeAsync>d__23, Microsoft.CodeAnalysis.Workspaces, Version=3.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<IncrementallyParseTreeAsync>d__23 ByRef)
   at Microsoft.CodeAnalysis.DocumentState.IncrementallyParseTreeAsync(Roslyn.Utilities.ValueSource`1<Microsoft.CodeAnalysis.TreeAndVersion>, Roslyn.Utilities.ValueSource`1<Microsoft.CodeAnalysis.TextAndVersion>, System.Threading.CancellationToken)
   at Microsoft.CodeAnalysis.DocumentState+<>c__DisplayClass22_0.<CreateLazyIncrementallyParsedTree>b__0(System.Threading.CancellationToken)
   at Roslyn.Utilities.AsyncLazy`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].StartAsynchronousComputation(AsynchronousComputationToStart<System.__Canon>, Request<System.__Canon>, System.Threading.CancellationToken)
   at Roslyn.Utilities.AsyncLazy`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].GetValueAsync(System.Threading.CancellationToken)
   at Microsoft.CodeAnalysis.DocumentState+<GetSyntaxTreeAsync>d__48.MoveNext()
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Start[[Microsoft.CodeAnalysis.DocumentState+<GetSyntaxTreeAsync>d__48, Microsoft.CodeAnalysis.Workspaces, Version=3.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<GetSyntaxTreeAsync>d__48 ByRef)
   at Microsoft.CodeAnalysis.DocumentState.GetSyntaxTreeAsync(System.Threading.CancellationToken)
   at Microsoft.CodeAnalysis.SolutionState+<UpdateDocumentInCompilationAsync>d__112.MoveNext()
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Start[[Microsoft.CodeAnalysis.SolutionState+<UpdateDocumentInCompilationAsync>d__112, Microsoft.CodeAnalysis.Workspaces, Version=3.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<UpdateDocumentInCompilationAsync>d__112 ByRef)
   at Microsoft.CodeAnalysis.SolutionState.UpdateDocumentInCompilationAsync(Microsoft.CodeAnalysis.Compilation, Microsoft.CodeAnalysis.DocumentState, Microsoft.CodeAnalysis.DocumentState, System.Threading.CancellationToken)
   at Microsoft.CodeAnalysis.SolutionState+CompilationAndGeneratorDriverTranslationAction+TouchDocumentAction.TransformCompilationAsync(Microsoft.CodeAnalysis.Compilation, System.Threading.CancellationToken)
   at Microsoft.CodeAnalysis.SolutionState+CompilationTracker+<BuildDeclarationCompilationFromInProgressAsync>d__29.MoveNext()
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.ValueTuple`2[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[Microsoft.CodeAnalysis.SolutionState+TrackedGeneratorDriver, Microsoft.CodeAnalysis.Workspaces, Version=3.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Start[[Microsoft.CodeAnalysis.SolutionState+CompilationTracker+<BuildDeclarationCompilationFromInProgressAsync>d__29, Microsoft.CodeAnalysis.Workspaces, Version=3.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<BuildDeclarationCompilationFromInProgressAsync>d__29 ByRef)
   at Microsoft.CodeAnalysis.SolutionState+CompilationTracker.BuildDeclarationCompilationFromInProgressAsync(Microsoft.CodeAnalysis.SolutionServices, InProgressState, Microsoft.CodeAnalysis.Compilation, System.Threading.CancellationToken)
   at Microsoft.CodeAnalysis.SolutionState+CompilationTracker+<BuildFinalStateFromInProgressStateAsync>d__28.MoveNext()
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[Microsoft.CodeAnalysis.SolutionState+CompilationTracker+CompilationInfo, Microsoft.CodeAnalysis.Workspaces, Version=3.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]].Start[[Microsoft.CodeAnalysis.SolutionState+CompilationTracker+<BuildFinalStateFromInProgressStateAsync>d__28, Microsoft.CodeAnalysis.Workspaces, Version=3.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<BuildFinalStateFromInProgressStateAsync>d__28 ByRef)
   at Microsoft.CodeAnalysis.SolutionState+CompilationTracker.BuildFinalStateFromInProgressStateAsync(Microsoft.CodeAnalysis.SolutionState, InProgressState, Microsoft.CodeAnalysis.Compilation, System.Threading.CancellationToken)
   at Microsoft.CodeAnalysis.SolutionState+CompilationTracker.BuildCompilationInfoAsync(Microsoft.CodeAnalysis.SolutionState, System.Threading.CancellationToken)
   at Microsoft.CodeAnalysis.SolutionState+CompilationTracker+<GetOrBuildCompilationInfoAsync>d__23.MoveNext()
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[Microsoft.CodeAnalysis.SolutionState+CompilationTracker+CompilationInfo, Microsoft.CodeAnalysis.Workspaces, Version=3.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]].Start[[Microsoft.CodeAnalysis.SolutionState+CompilationTracker+<GetOrBuildCompilationInfoAsync>d__23, Microsoft.CodeAnalysis.Workspaces, Version=3.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<GetOrBuildCompilationInfoAsync>d__23 ByRef)
   at Microsoft.CodeAnalysis.SolutionState+CompilationTracker.GetOrBuildCompilationInfoAsync(Microsoft.CodeAnalysis.SolutionState, Boolean, System.Threading.CancellationToken)
   at Microsoft.CodeAnalysis.SolutionState+CompilationTracker+<GetCompilationSlowAsync>d__20.MoveNext()
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Start[[Microsoft.CodeAnalysis.SolutionState+CompilationTracker+<GetCompilationSlowAsync>d__20, Microsoft.CodeAnalysis.Workspaces, Version=3.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<GetCompilationSlowAsync>d__20 ByRef)
   at Microsoft.CodeAnalysis.SolutionState+CompilationTracker.GetCompilationSlowAsync(Microsoft.CodeAnalysis.SolutionState, System.Threading.CancellationToken)
   at Microsoft.CodeAnalysis.SolutionState.GetCompilationAsync(Microsoft.CodeAnalysis.ProjectState, System.Threading.CancellationToken)
   at Microsoft.CodeAnalysis.Shared.Extensions.ProjectExtensions+<GetRequiredCompilationAsync>d__18.MoveNext()
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Start[[Microsoft.CodeAnalysis.Shared.Extensions.ProjectExtensions+<GetRequiredCompilationAsync>d__18, Microsoft.CodeAnalysis.Workspaces, Version=3.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<GetRequiredCompilationAsync>d__18 ByRef)
   at Microsoft.CodeAnalysis.Shared.Extensions.ProjectExtensions.GetRequiredCompilationAsync(Microsoft.CodeAnalysis.Project, System.Threading.CancellationToken)
   at Microsoft.CodeAnalysis.Remote.Diagnostics.DiagnosticComputer+<<CreateCompilationWithAnalyzersCacheEntryAsync>g__CreateCompilationWithAnalyzerAsync|13_0>d.MoveNext()
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Start[[Microsoft.CodeAnalysis.Remote.Diagnostics.DiagnosticComputer+<<CreateCompilationWithAnalyzersCacheEntryAsync>g__CreateCompilationWithAnalyzerAsync|13_0>d, Microsoft.CodeAnalysis.Remote.ServiceHub, Version=3.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<<CreateCompilationWithAnalyzersCacheEntryAsync>g__CreateCompilationWithAnalyzerAsync|13_0>d ByRef)
   at Microsoft.CodeAnalysis.Remote.Diagnostics.DiagnosticComputer.<CreateCompilationWithAnalyzersCacheEntryAsync>g__CreateCompilationWithAnalyzerAsync|13_0(Microsoft.CodeAnalysis.Project, System.Collections.Immutable.ImmutableArray`1<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer>, System.Threading.CancellationToken)
   at Microsoft.CodeAnalysis.Remote.Diagnostics.DiagnosticComputer+<CreateCompilationWithAnalyzersCacheEntryAsync>d__13.MoveNext()
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Start[[Microsoft.CodeAnalysis.Remote.Diagnostics.DiagnosticComputer+<CreateCompilationWithAnalyzersCacheEntryAsync>d__13, Microsoft.CodeAnalysis.Remote.ServiceHub, Version=3.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<CreateCompilationWithAnalyzersCacheEntryAsync>d__13 ByRef)
   at Microsoft.CodeAnalysis.Remote.Diagnostics.DiagnosticComputer.CreateCompilationWithAnalyzersCacheEntryAsync(Microsoft.CodeAnalysis.Project, System.Threading.CancellationToken)
   at Microsoft.CodeAnalysis.Remote.Diagnostics.DiagnosticComputer+<>c__DisplayClass12_0+<<GetOrCreateCompilationWithAnalyzersAsync>g__GetOrCreateCacheEntryAsync|0>d.MoveNext()
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Start[[Microsoft.CodeAnalysis.Remote.Diagnostics.DiagnosticComputer+<>c__DisplayClass12_0+<<GetOrCreateCompilationWithAnalyzersAsync>g__GetOrCreateCacheEntryAsync|0>d, Microsoft.CodeAnalysis.Remote.ServiceHub, Version=3.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<<GetOrCreateCompilationWithAnalyzersAsync>g__GetOrCreateCacheEntryAsync|0>d ByRef)
   at Microsoft.CodeAnalysis.Remote.Diagnostics.DiagnosticComputer+<>c__DisplayClass12_0.<GetOrCreateCompilationWithAnalyzersAsync>g__GetOrCreateCacheEntryAsync|0()
   at Microsoft.CodeAnalysis.Remote.Diagnostics.DiagnosticComputer+<GetOrCreateCompilationWithAnalyzersAsync>d__12.MoveNext()
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.ValueTuple`2[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Start[[Microsoft.CodeAnalysis.Remote.Diagnostics.DiagnosticComputer+<GetOrCreateCompilationWithAnalyzersAsync>d__12, Microsoft.CodeAnalysis.Remote.ServiceHub, Version=3.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<GetOrCreateCompilationWithAnalyzersAsync>d__12 ByRef)
   at Microsoft.CodeAnalysis.Remote.Diagnostics.DiagnosticComputer.GetOrCreateCompilationWithAnalyzersAsync(Microsoft.CodeAnalysis.Project, Boolean, System.Threading.CancellationToken)
   at Microsoft.CodeAnalysis.Remote.Diagnostics.DiagnosticComputer+<GetDiagnosticsAsync>d__8.MoveNext()
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[Microsoft.CodeAnalysis.Workspaces.Diagnostics.DiagnosticAnalysisResultMap`2[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[Microsoft.CodeAnalysis.Workspaces.Diagnostics.DiagnosticAnalysisResultBuilder, Microsoft.CodeAnalysis.Workspaces, Version=3.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]], Microsoft.CodeAnalysis.Workspaces, Version=3.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]].Start[[Microsoft.CodeAnalysis.Remote.Diagnostics.DiagnosticComputer+<GetDiagnosticsAsync>d__8, Microsoft.CodeAnalysis.Remote.ServiceHub, Version=3.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<GetDiagnosticsAsync>d__8 ByRef)
   at Microsoft.CodeAnalysis.Remote.Diagnostics.DiagnosticComputer.GetDiagnosticsAsync(System.Collections.Generic.IEnumerable`1<System.String>, Boolean, Boolean, Boolean, System.Threading.CancellationToken)
   at Microsoft.CodeAnalysis.Remote.CodeAnalysisService+<>c__DisplayClass15_0+<<CalculateDiagnosticsAsync>b__0>d.MoveNext()
   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.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run()
   at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action, Boolean, System.Threading.Tasks.Task ByRef)
   at System.Threading.Tasks.Task.FinishContinuations()
   at System.Threading.Tasks.Task`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].TrySetResult(System.__Canon)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].SetResult(System.__Canon)
   at Microsoft.CodeAnalysis.Remote.RemoteWorkspace+<GetSolutionAsync>d__12.MoveNext()
   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.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run()
   at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action, Boolean, System.Threading.Tasks.Task ByRef)
   at System.Threading.Tasks.Task.FinishContinuations()
   at System.Threading.Tasks.Task`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].TrySetResult(System.__Canon)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].SetResult(System.__Canon)
   at Microsoft.CodeAnalysis.Remote.RemoteWorkspace+<CreateSolution_NoLockAsync>d__10.MoveNext()
   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.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run()
   at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action, Boolean, System.Threading.Tasks.Task ByRef)
   at System.Threading.Tasks.Task.FinishContinuations()
   at System.Threading.Tasks.Task`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].TrySetResult(System.__Canon)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].SetResult(System.__Canon)
   at Microsoft.CodeAnalysis.Remote.RemoteWorkspace+SolutionCreator+<CreateSolutionAsync>d__6.MoveNext()
   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.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run()
   at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action, Boolean, System.Threading.Tasks.Task ByRef)
   at System.Threading.Tasks.Task.FinishContinuations()
   at System.Threading.Tasks.Task`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].TrySetResult(System.__Canon)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].SetResult(System.__Canon)
   at Microsoft.CodeAnalysis.Remote.RemoteWorkspace+SolutionCreator+<UpdateProjectsAsync>d__7.MoveNext()
   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.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run()
   at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action, Boolean, System.Threading.Tasks.Task ByRef)
   at System.Threading.Tasks.Task.FinishContinuations()
   at System.Threading.Tasks.Task`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].TrySetResult(System.__Canon)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].SetResult(System.__Canon)
   at Microsoft.CodeAnalysis.Remote.RemoteWorkspace+SolutionCreator+<UpdateProjectsAsync>d__8.MoveNext()
   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.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run()
   at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action, Boolean, System.Threading.Tasks.Task ByRef)
   at System.Threading.Tasks.Task.FinishContinuations()
   at System.Threading.Tasks.Task`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].TrySetResult(System.__Canon)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].SetResult(System.__Canon)
   at Microsoft.CodeAnalysis.Remote.RemoteWorkspace+SolutionCreator+<UpdateProjectAsync>d__10.MoveNext()
   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.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run()
   at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action, Boolean, System.Threading.Tasks.Task ByRef)
   at System.Threading.Tasks.Task.FinishContinuations()
   at System.Threading.Tasks.Task`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].TrySetResult(System.__Canon)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].SetResult(System.__Canon)
   at Microsoft.CodeAnalysis.Remote.RemoteWorkspace+SolutionCreator+<UpdateDocumentsAsync>d__12.MoveNext()
   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.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run()
   at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action, Boolean, System.Threading.Tasks.Task ByRef)
   at System.Threading.Tasks.Task.FinishContinuations()
   at System.Threading.Tasks.Task`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].TrySetResult(System.__Canon)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].SetResult(System.__Canon)
   at Microsoft.CodeAnalysis.Remote.RemoteWorkspace+SolutionCreator+<GetDocumentMapAsync>d__15.MoveNext()
   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.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run()
   at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action, Boolean, System.Threading.Tasks.Task ByRef)
   at System.Threading.Tasks.Task.FinishContinuations()
   at System.Threading.Tasks.Task`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].TrySetResult(System.__Canon)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].SetResult(System.__Canon)
   at Microsoft.CodeAnalysis.Remote.AssetProvider+<GetAssetsAsync>d__6`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext()
   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.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run()
   at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action, Boolean, System.Threading.Tasks.Task ByRef)
   at System.Threading.Tasks.Task.FinishContinuations()
   at System.Threading.Tasks.Task`1[[System.Threading.Tasks.VoidTaskResult, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].TrySetResult(System.Threading.Tasks.VoidTaskResult)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.Threading.Tasks.VoidTaskResult, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].SetResult(System.Threading.Tasks.VoidTaskResult)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.Threading.Tasks.VoidTaskResult, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].SetResult(System.Threading.Tasks.Task`1<System.Threading.Tasks.VoidTaskResult>)
   at Microsoft.CodeAnalysis.Remote.ChecksumSynchronizer+<SynchronizeAssetsAsync>d__3.MoveNext()
   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.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run()
   at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action, Boolean, System.Threading.Tasks.Task ByRef)
   at System.Threading.Tasks.Task.FinishContinuations()
   at System.Threading.Tasks.Task`1[[System.Threading.Tasks.VoidTaskResult, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].TrySetResult(System.Threading.Tasks.VoidTaskResult)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.Threading.Tasks.VoidTaskResult, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].SetResult(System.Threading.Tasks.VoidTaskResult)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.Threading.Tasks.VoidTaskResult, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].SetResult(System.Threading.Tasks.Task`1<System.Threading.Tasks.VoidTaskResult>)
   at Microsoft.CodeAnalysis.Remote.ChecksumSynchronizer+<SynchronizeAssets_NoLockAsync>d__8.MoveNext()
   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.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run()
   at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action, Boolean, System.Threading.Tasks.Task ByRef)
   at System.Threading.Tasks.Task.FinishContinuations()
   at System.Threading.Tasks.Task`1[[System.Threading.Tasks.VoidTaskResult, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].TrySetResult(System.Threading.Tasks.VoidTaskResult)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.Threading.Tasks.VoidTaskResult, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].SetResult(System.Threading.Tasks.VoidTaskResult)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.Threading.Tasks.VoidTaskResult, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].SetResult(System.Threading.Tasks.Task`1<System.Threading.Tasks.VoidTaskResult>)
   at Microsoft.CodeAnalysis.Remote.AssetProvider+<SynchronizeAssetsAsync>d__10.MoveNext()
   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.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run()
   at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action, Boolean, System.Threading.Tasks.Task ByRef)
   at System.Threading.Tasks.Task.FinishContinuations()
   at System.Threading.Tasks.Task`1[[System.Collections.Immutable.ImmutableArray`1[[System.ValueTuple`2[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].TrySetResult(System.Collections.Immutable.ImmutableArray`1<System.ValueTuple`2<System.__Canon,System.__Canon>>)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.Collections.Immutable.ImmutableArray`1[[System.ValueTuple`2[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].SetResult(System.Collections.Immutable.ImmutableArray`1<System.ValueTuple`2<System.__Canon,System.__Canon>>)
   at Microsoft.CodeAnalysis.Remote.AssetProvider+<RequestAssetsAsync>d__12.MoveNext()
   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.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run()
   at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action, Boolean, System.Threading.Tasks.Task ByRef)
   at System.Threading.Tasks.Task.FinishContinuations()
   at System.Threading.Tasks.Task`1[[System.Collections.Immutable.ImmutableArray`1[[System.ValueTuple`2[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].TrySetResult(System.Collections.Immutable.ImmutableArray`1<System.ValueTuple`2<System.__Canon,System.__Canon>>)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.Collections.Immutable.ImmutableArray`1[[System.ValueTuple`2[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].SetResult(System.Collections.Immutable.ImmutableArray`1<System.ValueTuple`2<System.__Canon,System.__Canon>>)
   at Microsoft.CodeAnalysis.Remote.ServiceBase+<RunServiceAsync>d__16`1[[System.Collections.Immutable.ImmutableArray`1[[System.ValueTuple`2[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()
   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.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run()
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead labels Nov 16, 2020
@nathan130200 nathan130200 reopened this Nov 16, 2020
@nathan130200 nathan130200 changed the title RoslynCodeAnalysisService crashes everytime paste code into VS 2019. VisualStudio crashing RoslynCodeAnalysisService when paste code into IDE. Nov 16, 2020
@nathan130200 nathan130200 changed the title VisualStudio crashing RoslynCodeAnalysisService when paste code into IDE. VisualStudio crashing RoslynCodeAnalysisService when pasting code. Nov 16, 2020
@CyrusNajmabadi
Copy link
Member

Fixed with #48420

@nathan130200
Copy link
Author

nathan130200 commented Nov 16, 2020

Wait but in PR you reference is about 12 oct, this is fixed in 16.8, i'm using 16.8.1 but crash still occurring, maybe VS2019 update 16.8.1 is shipped with wrong roslyn version? I'm confused with this.

@CyrusNajmabadi
Copy link
Member

Wait but in PR you reference is about 12 oct, this is fixed in 16.8,

Where do you see that? I don't believe this fix would be in any release prior to 16.9preview-1.

@nathan130200
Copy link
Author

oops, sorry i mistaken with another thing. But thanks for information!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

No branches or pull requests

3 participants