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 | 3 months ago
  1. 0

    Crash in binder when typing in IDE.

    GitHub | 3 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 | 1 year 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 | 9 months 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

  5. 0

    vbc crashes on RELEASE Build (error MSB6006: "vbc.exe" exited with code -2146232797)

    GitHub | 1 year ago | ChristopherStamm
    System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.CodeAnalysis.CodeGen.ILBuilder.ForwardLabelsNoLeaving() at Microsoft.CodeAnalysis.CodeGen.ILBuilder.RealizeBlocks() at Microsoft.CodeAnalysis.CodeGen.ILBuilder.Realize() at Microsoft.CodeAnalysis.VisualBasic.CodeGen.CodeGenerator.GenerateImpl() at Microsoft.CodeAnalysis.VisualBasic.MethodCompiler.GenerateMethodBody(PEModuleBuilder moduleBuilder, MethodSymbol method, Int32 methodOrdinal, BoundStatement block, ImmutableArray`1 lambdaDebugInfo, ImmutableArray`1 closureDebugInfo, StateMachineTypeSymbol stateMachineTypeOpt, VariableSlotAllocator variableSlotAllocatorOpt, DebugDocumentProvider debugDocumentProvider, DiagnosticBag diagnostics, Boolean emittingPdb) at Microsoft.CodeAnalysis.VisualBasic.MethodCompiler.LowerAndEmitMethod(MethodSymbol method, Int32 methodOrdinal, BoundBlock block, Binder binderOpt, TypeCompilationState compilationState, DiagnosticBag diagsForCurrentMethod, ProcessedFieldOrPropertyInitializers processedInitializers, SynthesizedSubmissionFields previousSubmissionFields, MethodSymbol constructorToInject, Int32& delegateRelaxationIdDispenser) at Microsoft.CodeAnalysis.VisualBasic.MethodCompiler.CompileMethod(MethodSymbol method, Int32 methodOrdinal, Int32& withEventPropertyIdDispenser, Int32& delegateRelaxationIdDispenser, Predicate`1 filter, TypeCompilationState compilationState, ProcessedFieldOrPropertyInitializers processedInitializers, Binder containingTypeBinder, SynthesizedSubmissionFields previousSubmissionFields, MethodSymbol& referencedConstructor) at Microsoft.CodeAnalysis.VisualBasic.MethodCompiler.CompileNamedType(NamedTypeSymbol containingType, Predicate`1 filter) at Microsoft.CodeAnalysis.VisualBasic.MethodCompiler._Closure$__30-0._Lambda$__0() Stack: at System.Environment.FailFast(System.String, System.Exception) at Microsoft.CodeAnalysis.FatalError.Report(System.Exception, System.Action`1<System.Exception>)
  6. 0

    NullReferenceException in AppenderSkeleton.get_Name()

    logging-log4net-user | 1 decade ago | Kevin Krueger
    System.NullReferenceException: Object reference not set to an instance of an object. at log4net.Appender.AppenderSkeleton.get_Name()

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    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