System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.CodeAnalysis.CSharp.ConversionsBase.HasImplicitEnumerationConversion(BoundExpression source, TypeSymbol destination) at Microsoft.CodeAnalysis.CSharp.ConversionsBase.ClassifyImplicitBuiltInConversionFromExpression(BoundExpression sourceExpression, TypeSymbol source, TypeSymbol destination, HashSet`1& useSiteDiagnostics) at Microsoft.CodeAnalysis.CSharp.ConversionsBase.ClassifyImplicitConversionFromExpression(BoundExpression sourceExpression, TypeSymbol destination, HashSet`1& useSiteDiagnostics) at Microsoft.CodeAnalysis.CSharp.Binder.GenerateConversionForAssignment(TypeSymbol targetType, BoundExpression expression, DiagnosticBag diagnostics, Boolean isDefaultParameter, RefKind refKind) at Microsoft.CodeAnalysis.CSharp.Binder.ConvertPatternExpression(TypeSymbol inputType, CSharpSyntaxNode node, BoundExpression expression, ConstantValue& constantValue, DiagnosticBag diagnostics) at Microsoft.CodeAnalysis.CSharp.Binder.BindConstantPattern(CSharpSyntaxNode node, BoundExpression operand, TypeSymbol operandType, ExpressionSyntax patternExpression, Boolean hasErrors, DiagnosticBag diagnostics, Boolean& wasExpression, Boolean wasSwitchCase) at Microsoft.CodeAnalysis.CSharp.Binder.BindPattern(PatternSyntax node, BoundExpression operand, TypeSymbol operandType, Boolean hasErrors, DiagnosticBag diagnostics, Boolean wasSwitchCase) at Microsoft.CodeAnalysis.CSharp.Binder.BindIsPatternExpression(IsPatternExpressionSyntax node, DiagnosticBag diagnostics) at Microsoft.CodeAnalysis.CSharp.Binder.BindExpressionInternal(ExpressionSyntax node, DiagnosticBag diagnostics, Boolean invoked, Boolean indexed) at Microsoft.CodeAnalysis.CSharp.Binder.BindExpression(ExpressionSyntax node, DiagnosticBag diagnostics, Boolean invoked, Boolean indexed) at Microsoft.CodeAnalysis.CSharp.Binder.BindExpressionBodyAsBlock(ArrowExpressionClauseSyntax expressionBody, DiagnosticBag diagnostics) at Microsoft.CodeAnalysis.CSharp.MethodBodySemanticModel.Bind(Binder binder, CSharpSyntaxNode node, DiagnosticBag diagnostics) at Microsoft.CodeAnalysis.CSharp.MemberSemanticModel.GetBoundNodes(CSharpSyntaxNode node) at Microsoft.CodeAnalysis.CSharp.MemberSemanticModel.GetLowerBoundNode(CSharpSyntaxNode node) at Microsoft.CodeAnalysis.CSharp.MemberSemanticModel.GetBoundNodes(CSharpSyntaxNode node, CSharpSyntaxNode& bindableNode, BoundNode& lowestBoundNode, BoundNode& highestBoundNode, BoundNode& boundParent) at Microsoft.CodeAnalysis.CSharp.MemberSemanticModel.GetSymbolInfoWorker(CSharpSyntaxNode node, SymbolInfoOptions options, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.SyntaxTreeSemanticModel.GetSymbolInfoWorker(CSharpSyntaxNode node, SymbolInfoOptions options, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.CSharpSemanticModel.GetSymbolInfo(ExpressionSyntax expression, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.CSharpExtensions.GetSymbolInfo(SemanticModel semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.Classification.Classifiers.NameSyntaxClassifier.ClassifyTypeSyntax(NameSyntax name, SemanticModel semanticModel, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.Classification.Classifiers.NameSyntaxClassifier.ClassifyNode(SyntaxNode syntax, SemanticModel semanticModel, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Classification.AbstractClassificationService.Worker.ClassifyNode(SyntaxNode syntax) at Microsoft.CodeAnalysis.Classification.AbstractClassificationService.Worker.ProcessNodes() at Microsoft.CodeAnalysis.Classification.AbstractClassificationService.Worker.Classify(Workspace workspace, SemanticModel semanticModel, TextSpan textSpan, List`1 list, Func`2 getNodeClassifiers, Func`2 getTokenClassifiers, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Classification.AbstractClassificationService.<AddSemanticClassificationsAsync>d__5.MoveNext() Stack: at System.Environment.FailFast(System.String, System.Exception)

GitHub | CyrusNajmabadi | 8 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Crash in binder when typing in IDE.

    GitHub | 8 months ago | CyrusNajmabadi
    System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.CodeAnalysis.CSharp.ConversionsBase.HasImplicitEnumerationConversion(BoundExpression source, TypeSymbol destination) at Microsoft.CodeAnalysis.CSharp.ConversionsBase.ClassifyImplicitBuiltInConversionFromExpression(BoundExpression sourceExpression, TypeSymbol source, TypeSymbol destination, HashSet`1& useSiteDiagnostics) at Microsoft.CodeAnalysis.CSharp.ConversionsBase.ClassifyImplicitConversionFromExpression(BoundExpression sourceExpression, TypeSymbol destination, HashSet`1& useSiteDiagnostics) at Microsoft.CodeAnalysis.CSharp.Binder.GenerateConversionForAssignment(TypeSymbol targetType, BoundExpression expression, DiagnosticBag diagnostics, Boolean isDefaultParameter, RefKind refKind) at Microsoft.CodeAnalysis.CSharp.Binder.ConvertPatternExpression(TypeSymbol inputType, CSharpSyntaxNode node, BoundExpression expression, ConstantValue& constantValue, DiagnosticBag diagnostics) at Microsoft.CodeAnalysis.CSharp.Binder.BindConstantPattern(CSharpSyntaxNode node, BoundExpression operand, TypeSymbol operandType, ExpressionSyntax patternExpression, Boolean hasErrors, DiagnosticBag diagnostics, Boolean& wasExpression, Boolean wasSwitchCase) at Microsoft.CodeAnalysis.CSharp.Binder.BindPattern(PatternSyntax node, BoundExpression operand, TypeSymbol operandType, Boolean hasErrors, DiagnosticBag diagnostics, Boolean wasSwitchCase) at Microsoft.CodeAnalysis.CSharp.Binder.BindIsPatternExpression(IsPatternExpressionSyntax node, DiagnosticBag diagnostics) at Microsoft.CodeAnalysis.CSharp.Binder.BindExpressionInternal(ExpressionSyntax node, DiagnosticBag diagnostics, Boolean invoked, Boolean indexed) at Microsoft.CodeAnalysis.CSharp.Binder.BindExpression(ExpressionSyntax node, DiagnosticBag diagnostics, Boolean invoked, Boolean indexed) at Microsoft.CodeAnalysis.CSharp.Binder.BindExpressionBodyAsBlock(ArrowExpressionClauseSyntax expressionBody, DiagnosticBag diagnostics) at Microsoft.CodeAnalysis.CSharp.MethodBodySemanticModel.Bind(Binder binder, CSharpSyntaxNode node, DiagnosticBag diagnostics) at Microsoft.CodeAnalysis.CSharp.MemberSemanticModel.GetBoundNodes(CSharpSyntaxNode node) at Microsoft.CodeAnalysis.CSharp.MemberSemanticModel.GetLowerBoundNode(CSharpSyntaxNode node) at Microsoft.CodeAnalysis.CSharp.MemberSemanticModel.GetBoundNodes(CSharpSyntaxNode node, CSharpSyntaxNode& bindableNode, BoundNode& lowestBoundNode, BoundNode& highestBoundNode, BoundNode& boundParent) at Microsoft.CodeAnalysis.CSharp.MemberSemanticModel.GetSymbolInfoWorker(CSharpSyntaxNode node, SymbolInfoOptions options, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.SyntaxTreeSemanticModel.GetSymbolInfoWorker(CSharpSyntaxNode node, SymbolInfoOptions options, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.CSharpSemanticModel.GetSymbolInfo(ExpressionSyntax expression, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.CSharpExtensions.GetSymbolInfo(SemanticModel semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.Classification.Classifiers.NameSyntaxClassifier.ClassifyTypeSyntax(NameSyntax name, SemanticModel semanticModel, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.Classification.Classifiers.NameSyntaxClassifier.ClassifyNode(SyntaxNode syntax, SemanticModel semanticModel, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Classification.AbstractClassificationService.Worker.ClassifyNode(SyntaxNode syntax) at Microsoft.CodeAnalysis.Classification.AbstractClassificationService.Worker.ProcessNodes() at Microsoft.CodeAnalysis.Classification.AbstractClassificationService.Worker.Classify(Workspace workspace, SemanticModel semanticModel, TextSpan textSpan, List`1 list, Func`2 getNodeClassifiers, Func`2 getTokenClassifiers, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Classification.AbstractClassificationService.<AddSemanticClassificationsAsync>d__5.MoveNext() Stack: at System.Environment.FailFast(System.String, System.Exception)
  2. 0

    NRE in Diagnostics UpdateMemberRange

    GitHub | 2 years ago | balajikris
    System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.CodeAnalysis.Text.TextSpan..ctor(Int32 start, Int32 length) at Microsoft.CodeAnalysis.Diagnostics.EngineV1.MemberRangeMap.UpdateMemberRange_NoLock(DictionaryData data, Document document, VersionStamp newVersion, Int32 memberId, TextSpan currentSpan, VersionStamp oldVersion) at Microsoft.CodeAnalysis.Diagnostics.EngineV1.MemberRangeMap.UpdateMemberRange(DiagnosticAnalyzer analyzer, Document document, VersionStamp newVersion, Int32 memberId, TextSpan span, MemberRanges oldRanges) at Microsoft.CodeAnalysis.Diagnostics.EngineV1.DiagnosticIncrementalAnalyzer.<AnalyzeBodyDocumentAsync>d__52.MoveNext() Stack: at System.Environment.FailFast(System.String, System.Exception)
  3. 0

    Trigging completion list in TypeScript crashes VS

    GitHub | 1 year ago | davkean
    System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.CodeAnalysis.Completion.AbstractCompletionService.<GetCompletionListAsync>d__16.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at Microsoft.CodeAnalysis.Completion.AbstractCompletionService.<GetCompletionListAsync>d__11.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.CodeAnalysis.Editor.Implementation.IntelliSense.Completion.Controller.Session.ModelComputer.<GetCompletionListAsync>d__14.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.CodeAnalysis.Editor.Implementation.IntelliSense.Completion.Controller.Session.ModelComputer.<DoInBackgroundAsync>d__13.MoveNext()<--- Stack: at System.Environment.FailFast(System.String, System.Exception)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. System.NullReferenceException

      Object reference not set to an instance of an object. at Microsoft.CodeAnalysis.CSharp.ConversionsBase.HasImplicitEnumerationConversion(BoundExpression source, TypeSymbol destination) at Microsoft.CodeAnalysis.CSharp.ConversionsBase.ClassifyImplicitBuiltInConversionFromExpression(BoundExpression sourceExpression, TypeSymbol source, TypeSymbol destination, HashSet`1& useSiteDiagnostics) at Microsoft.CodeAnalysis.CSharp.ConversionsBase.ClassifyImplicitConversionFromExpression(BoundExpression sourceExpression, TypeSymbol destination, HashSet`1& useSiteDiagnostics) at Microsoft.CodeAnalysis.CSharp.Binder.GenerateConversionForAssignment(TypeSymbol targetType, BoundExpression expression, DiagnosticBag diagnostics, Boolean isDefaultParameter, RefKind refKind) at Microsoft.CodeAnalysis.CSharp.Binder.ConvertPatternExpression(TypeSymbol inputType, CSharpSyntaxNode node, BoundExpression expression, ConstantValue& constantValue, DiagnosticBag diagnostics) at Microsoft.CodeAnalysis.CSharp.Binder.BindConstantPattern(CSharpSyntaxNode node, BoundExpression operand, TypeSymbol operandType, ExpressionSyntax patternExpression, Boolean hasErrors, DiagnosticBag diagnostics, Boolean& wasExpression, Boolean wasSwitchCase) at Microsoft.CodeAnalysis.CSharp.Binder.BindPattern(PatternSyntax node, BoundExpression operand, TypeSymbol operandType, Boolean hasErrors, DiagnosticBag diagnostics, Boolean wasSwitchCase) at Microsoft.CodeAnalysis.CSharp.Binder.BindIsPatternExpression(IsPatternExpressionSyntax node, DiagnosticBag diagnostics) at Microsoft.CodeAnalysis.CSharp.Binder.BindExpressionInternal(ExpressionSyntax node, DiagnosticBag diagnostics, Boolean invoked, Boolean indexed) at Microsoft.CodeAnalysis.CSharp.Binder.BindExpression(ExpressionSyntax node, DiagnosticBag diagnostics, Boolean invoked, Boolean indexed) at Microsoft.CodeAnalysis.CSharp.Binder.BindExpressionBodyAsBlock(ArrowExpressionClauseSyntax expressionBody, DiagnosticBag diagnostics) at Microsoft.CodeAnalysis.CSharp.MethodBodySemanticModel.Bind(Binder binder, CSharpSyntaxNode node, DiagnosticBag diagnostics) at Microsoft.CodeAnalysis.CSharp.MemberSemanticModel.GetBoundNodes(CSharpSyntaxNode node) at Microsoft.CodeAnalysis.CSharp.MemberSemanticModel.GetLowerBoundNode(CSharpSyntaxNode node) at Microsoft.CodeAnalysis.CSharp.MemberSemanticModel.GetBoundNodes(CSharpSyntaxNode node, CSharpSyntaxNode& bindableNode, BoundNode& lowestBoundNode, BoundNode& highestBoundNode, BoundNode& boundParent) at Microsoft.CodeAnalysis.CSharp.MemberSemanticModel.GetSymbolInfoWorker(CSharpSyntaxNode node, SymbolInfoOptions options, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.SyntaxTreeSemanticModel.GetSymbolInfoWorker(CSharpSyntaxNode node, SymbolInfoOptions options, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.CSharpSemanticModel.GetSymbolInfo(ExpressionSyntax expression, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.CSharpExtensions.GetSymbolInfo(SemanticModel semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.Classification.Classifiers.NameSyntaxClassifier.ClassifyTypeSyntax(NameSyntax name, SemanticModel semanticModel, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.Classification.Classifiers.NameSyntaxClassifier.ClassifyNode(SyntaxNode syntax, SemanticModel semanticModel, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Classification.AbstractClassificationService.Worker.ClassifyNode(SyntaxNode syntax) at Microsoft.CodeAnalysis.Classification.AbstractClassificationService.Worker.ProcessNodes() at Microsoft.CodeAnalysis.Classification.AbstractClassificationService.Worker.Classify(Workspace workspace, SemanticModel semanticModel, TextSpan textSpan, List`1 list, Func`2 getNodeClassifiers, Func`2 getTokenClassifiers, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Classification.AbstractClassificationService.<AddSemanticClassificationsAsync>d__5.MoveNext() Stack: at System.Environment.FailFast(System.String, System.Exception)

      at Microsoft.CodeAnalysis.FailFast.OnFatalException()
    2. Microsoft.CodeAnalysis
      FailFast.OnFatalException
      1. Microsoft.CodeAnalysis.FailFast.OnFatalException(System.Exception)
      1 frame