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

ArgumentOutOfRangeException in CSharpWrappingCodeRefactoringProvider #59624

Closed
genlu opened this issue Feb 17, 2022 · 1 comment · Fixed by #59629
Closed

ArgumentOutOfRangeException in CSharpWrappingCodeRefactoringProvider #59624

genlu opened this issue Feb 17, 2022 · 1 comment · Fixed by #59629
Labels
Area-IDE Bug untriaged Issues and PRs which have not yet been triaged by a lead

Comments

@genlu
Copy link
Member

genlu commented Feb 17, 2022

Encountered this in Version 17.2.0 Preview 2.0 [32216.311.main]

callstack:

System.ArgumentOutOfRangeException : Specified argument was out of the range of valid values.
Parameter name: index
   at Microsoft.CodeAnalysis.SyntaxNodeOrTokenList.get_Item(Int32 index)
   at Microsoft.CodeAnalysis.Wrapping.SeparatedSyntaxList.AbstractSeparatedSyntaxListWrapper`2.SeparatedSyntaxListCodeActionComputer.GetWrapEachEdits(WrappingStyle wrappingStyle,SyntaxTrivia indentationTrivia)
   at async Microsoft.CodeAnalysis.Wrapping.SeparatedSyntaxList.AbstractSeparatedSyntaxListWrapper`2.SeparatedSyntaxListCodeActionComputer.GetWrapEveryNestedCodeActionAsync[TListSyntax,TListItemSyntax](<Unknown Parameters>)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at async Microsoft.CodeAnalysis.Wrapping.SeparatedSyntaxList.AbstractSeparatedSyntaxListWrapper`2.SeparatedSyntaxListCodeActionComputer.GetWrapEveryGroupAsync[TListSyntax,TListItemSyntax](<Unknown Parameters>)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at async Microsoft.CodeAnalysis.Wrapping.SeparatedSyntaxList.AbstractSeparatedSyntaxListWrapper`2.SeparatedSyntaxListCodeActionComputer.AddWrappingGroupsAsync[TListSyntax,TListItemSyntax](<Unknown Parameters>)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at async Microsoft.CodeAnalysis.Wrapping.SeparatedSyntaxList.AbstractSeparatedSyntaxListWrapper`2.SeparatedSyntaxListCodeActionComputer.ComputeWrappingGroupsAsync[TListSyntax,TListItemSyntax](<Unknown Parameters>)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at async Microsoft.CodeAnalysis.Wrapping.AbstractSyntaxWrapper.AbstractCodeActionComputer`1.GetTopLevelCodeActionsAsync[TWrapper](<Unknown Parameters>)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at async Microsoft.CodeAnalysis.Wrapping.AbstractWrappingCodeRefactoringProvider.ComputeRefactoringsAsync(<Unknown Parameters>)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at async Microsoft.CodeAnalysis.CodeRefactorings.CodeRefactoringService.GetRefactoringFromProviderAsync(<Unknown Parameters>)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Issues and PRs which have not yet been triaged by a lead label Feb 17, 2022
@genlu genlu changed the title ArgumentOutOfRangeException in CSharpWrappingCodeRefactoringProvider ArgumentOutOfRangeException in CSharpWrappingCodeRefactoringProvider Feb 17, 2022
@CyrusNajmabadi
Copy link
Member

Working on a fix.

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

Successfully merging a pull request may close this issue.

2 participants