Skip to content

CSharpReplaceDocCommentTextWithTagCodeRefactoringProvider #29933

@mkrueger

Description

@mkrueger

I was typing inside <summary> tags when the CSharpReplaceDocCommentTextWithTagCodeRefactoringProvider error was displayed. Do not have a repro.

 Roslyn error: Extension_Exception CSharpReplaceDocCommentTextWithTagCodeRefactoringProvider : Object reference not set to an instance of an object
  at Microsoft.CodeAnalysis.CSharp.Binder.BindBase (Microsoft.CodeAnalysis.CSharp.Syntax.BaseExpressionSyntax node, Microsoft.CodeAnalysis.DiagnosticBag diagnostics) [0x0004d] in /_/src/Compilers/CSharp/Portable/Binder/Binder_Expressions.cs:1850 
  at Microsoft.CodeAnalysis.CSharp.Binder.BindExpressionInternal (Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax node, Microsoft.CodeAnalysis.DiagnosticBag diagnostics, System.Boolean invoked, System.Boolean indexed) [0x00307] in /_/src/Compilers/CSharp/Portable/Binder/Binder_Expressions.cs:382 
  at Microsoft.CodeAnalysis.CSharp.Binder.BindExpression (Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax node, Microsoft.CodeAnalysis.DiagnosticBag diagnostics, System.Boolean invoked, System.Boolean indexed) [0x00000] in /_/src/Compilers/CSharp/Portable/Binder/Binder_Expressions.cs:329 
  at Microsoft.CodeAnalysis.CSharp.Binder.BindExpression (Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax node, Microsoft.CodeAnalysis.DiagnosticBag diagnostics) [0x00000] in /_/src/Compilers/CSharp/Portable/Binder/Binder_Expressions.cs:324 
  at Microsoft.CodeAnalysis.CSharp.CSharpSemanticModel.GetSpeculativelyBoundExpressionHelper (Microsoft.CodeAnalysis.CSharp.Binder binder, Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax expression, Microsoft.CodeAnalysis.SpeculativeBindingOption bindingOption, Microsoft.CodeAnalysis.DiagnosticBag diagnostics) [0x00021] in /_/src/Compilers/CSharp/Portable/Compilation/CSharpSemanticModel.cs:249 
  at Microsoft.CodeAnalysis.CSharp.CSharpSemanticModel.GetSpeculativelyBoundExpression (System.Int32 position, Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax expression, Microsoft.CodeAnalysis.SpeculativeBindingOption bindingOption, Microsoft.CodeAnalysis.CSharp.Binder& binder, System.Collections.Immutable.ImmutableArray`1[Microsoft.CodeAnalysis.CSharp.Symbol]& crefSymbols) [0x000f0] in /_/src/Compilers/CSharp/Portable/Compilation/CSharpSemanticModel.cs:306 
  at Microsoft.CodeAnalysis.CSharp.CSharpSemanticModel.GetSpeculativeSymbolInfo (System.Int32 position, Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax expression, Microsoft.CodeAnalysis.SpeculativeBindingOption bindingOption) [0x00010] in /_/src/Compilers/CSharp/Portable/Compilation/CSharpSemanticModel.cs:687 
  at Microsoft.CodeAnalysis.CSharp.CSharpSemanticModel.GetSpeculativeSymbolInfoCore (System.Int32 position, Microsoft.CodeAnalysis.SyntaxNode node, Microsoft.CodeAnalysis.SpeculativeBindingOption bindingOption) [0x00033] in /_/src/Compilers/CSharp/Portable/Compilation/CSharpSemanticModel.cs:4595 
  at Microsoft.CodeAnalysis.SemanticModel.GetSpeculativeSymbolInfo (System.Int32 position, Microsoft.CodeAnalysis.SyntaxNode expression, Microsoft.CodeAnalysis.SpeculativeBindingOption bindingOption) [0x00000] in /_/src/Compilers/Core/Portable/Compilation/SemanticModel.cs:139 
  at Microsoft.CodeAnalysis.ModelExtensions.GetSpeculativeSymbolInfo (Microsoft.CodeAnalysis.SemanticModel semanticModel, System.Int32 position, Microsoft.CodeAnalysis.SyntaxNode expression, Microsoft.CodeAnalysis.SpeculativeBindingOption bindingOption) [0x00000] in /_/src/Compilers/Core/Portable/Compilation/Extensions.cs:48 
  at Microsoft.CodeAnalysis.ReplaceDocCommentTextWithTag.AbstractReplaceDocCommentTextWithTagCodeRefactoringProvider.TryRegisterSeeCrefTagIfSymbol (Microsoft.CodeAnalysis.CodeRefactorings.CodeRefactoringContext context, Microsoft.CodeAnalysis.SemanticModel semanticModel, Microsoft.CodeAnalysis.SyntaxToken token, Microsoft.CodeAnalysis.Text.TextSpan replacementSpan, System.Threading.CancellationToken cancellationToken) [0x0001d] in /_/src/Features/Core/Portable/ReplaceDocCommentTextWithTag/AbstractReplaceDocCommentTextWithTagCodeRefactoringProvider.cs:129 
  at Microsoft.CodeAnalysis.ReplaceDocCommentTextWithTag.AbstractReplaceDocCommentTextWithTagCodeRefactoringProvider+<ComputeRefactoringsAsync>d__4.MoveNext () [0x0043d] in /_/src/Features/Core/Portable/ReplaceDocCommentTextWithTag/AbstractReplaceDocCommentTextWithTagCodeRefactoringProvider.cs:118 
--- End of stack trace from previous location where exception was thrown ---
  at Microsoft.CodeAnalysis.CodeRefactorings.CodeRefactoringService+<GetRefactoringFromProviderAsync>d__8.MoveNext () [0x000a0] in /_/src/Features/Core/Portable/CodeRefactorings/CodeRefactoringService.cs:143 

See mono/monodevelop#5972

[jcouv update:] Also tracked by https://devdiv.visualstudio.com/DevDiv/_workitems/edit/902391

Metadata

Metadata

Assignees

Labels

Area-CompilersBugDeveloper CommunityThe issue was originally reported on https://developercommunity.visualstudio.com

Type

No type
No fields configured for issues without a type.

Projects

Status

Active/Investigating

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions