Skip to content

Test failure: Microsoft.Gen.OptionsValidation.Test.EmitterTests.TestEmitter #112847

Open
@v-wenyuxu

Description

Failed in: runtime-coreclr libraries-pgo 20250223.1

Failed tests:

net10.0-windows-Release-x86-jitosr_stress-Windows.10.Amd64.Open
    - Microsoft.Gen.OptionsValidation.Test.EmitterTests.TestEmitter
net10.0-windows-Release-x86-jitosr_stress_random-Windows.10.Amd64.Open
    - Microsoft.Gen.OptionsValidation.Test.EmitterTests.TestEmitter
net10.0-windows-Release-x86-jitoldlayout-Windows.10.Amd64.Open
    - Microsoft.Gen.OptionsValidation.Test.EmitterTests.TestEmitter

Error message:

 Assert.Empty() Failure: Collection was not empty
Collection: [warning CS8785: Generator 'OptionsValidatorGenerator' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'NullReferenceException' with message 'Object reference not set to an instance of an object.'.
System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.CodeAnalysis.CSharp.Symbols.SourceMemberContainerTypeSymbol.ToNameKeyedDictionary(ImmutableArray`1 symbols)
   at Microsoft.CodeAnalysis.CSharp.Symbols.SourceMemberContainerTypeSymbol.MakeAllMembers()
   at Microsoft.CodeAnalysis.CSharp.Symbols.SourceMemberContainerTypeSymbol.GetMembersByNameSlow()
   at Microsoft.CodeAnalysis.CSharp.Symbols.SourceMemberContainerTypeSymbol.GetMembersByName()
   at Microsoft.CodeAnalysis.CSharp.Symbols.SourceMemberContainerTypeSymbol.GetMembers(String name)
   at Microsoft.CodeAnalysis.CSharp.SyntaxTreeSemanticModel.GetDeclaredMember(NamespaceOrTypeSymbol container, TextSpan declarationSpan, Boolean isKnownToBeANamespace, String name)
   at Microsoft.CodeAnalysis.CSharp.SyntaxTreeSemanticModel.GetDeclaredNamedType(CSharpSyntaxNode declarationSyntax, String name)
   at Microsoft.CodeAnalysis.CSharp.SyntaxTreeSemanticModel.GetDeclaredType(BaseTypeDeclarationSyntax declarationSyntax)
   at Microsoft.CodeAnalysis.CSharp.SyntaxTreeSemanticModel.GetDeclaredNamespaceOrType(CSharpSyntaxNode declarationSyntax)
   at Microsoft.CodeAnalysis.CSharp.SyntaxTreeSemanticModel.GetDeclaredTypeMemberContainer(CSharpSyntaxNode memberDeclaration)
   at Microsoft.CodeAnalysis.CSharp.SyntaxTreeSemanticModel.GetDeclaredNamedType(CSharpSyntaxNode declarationSyntax, String name)
   at Microsoft.CodeAnalysis.CSharp.SyntaxTreeSemanticModel.GetDeclaredType(BaseTypeDeclarationSyntax declarationSyntax)
   at Microsoft.CodeAnalysis.CSharp.SyntaxTreeSemanticModel.GetDeclaredSymbol(BaseTypeDeclarationSyntax declarationSyntax, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.CSharp.CSharpSemanticModel.GetDeclaredSymbolCore(SyntaxNode node, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.SyntaxValueProvider.<>c__DisplayClass10_0`1.<ForAttributeWithMetadataName>b__0(ValueTuple`2 tuple, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.TransformNode`2.UpdateStateTable(Builder builder, NodeStateTable`1 previousTable, CancellationToken cancellationToken)
-----
]

Stack trace:

   at Microsoft.Gen.OptionsValidation.Test.EmitterTests.TestEmitter() in /_/src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/EmitterTests.cs:line 46
--- End of stack trace from previous location ---

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    arch-x86area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIblocking-clean-ci-optionalBlocking optional rolling runsos-windowsuntriagedNew issue has not been triaged by the area owner

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions