dotnet/roslyn
View on GitHubIntroduce parameter crashes with `ArgumentOutOfRangeException`
Open
#67,932 opened on Apr 22, 2023
Area-IDEBugIDE-CodeStylehelp wanted
Repository metrics
- Stars
- (20,414 stars)
- PR merge metrics
- (Avg merge 6d 17h) (256 merged PRs in 30d)
Description
System.ArgumentOutOfRangeException : Specified argument was out of the range of valid values.
Parameter name: span
at Microsoft.CodeAnalysis.SyntaxNode.FindNode(TextSpan span,Boolean findInsideTrivia,Boolean getInnermostNodeForTie)
at async Microsoft.CodeAnalysis.IntroduceParameter.AbstractIntroduceParameterCodeRefactoringProvider`4.FindCallSitesAsync[TExpressionSyntax,TInvocationExpressionSyntax,TObjectCreationExpressionSyntax,TIdentifierNameSyntax](<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.CodeAnalysis.IntroduceParameter.AbstractIntroduceParameterCodeRefactoringProvider`4.IntroduceParameterAsync[TExpressionSyntax,TInvocationExpressionSyntax,TObjectCreationExpressionSyntax,TIdentifierNameSyntax](<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.CodeAnalysis.CodeActions.CodeAction.ComputeOperationsAsync(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.CodeAnalysis.CodeActions.CodeAction.GetPreviewOperationsAsync(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.CodeAnalysis.Editor.Implementation.Suggestions.SuggestedAction.GetPreviewResultAsync(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.CodeAnalysis.Editor.Implementation.Suggestions.SuggestedActionWithNestedFlavors.PreviewChangesSuggestedAction.CreateAsync(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.CodeAnalysis.Editor.Implementation.Suggestions.SuggestedActionWithNestedFlavors.GetPreviewChangesFlavorAsync(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.CodeAnalysis.Editor.Implementation.Suggestions.SuggestedActionWithNestedFlavors.CreateAllFlavorsAsync(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.CodeAnalysis.Extensions.IExtensionManagerExtensions.PerformFunctionAsync[T](<Unknown Parameters>)
Looked like a one-off for me, but thought it's worth reporting.