Skip to content

System.Text.Json.SourceGeneration tests failing on netfx x86 #64071

@jkotas

Description

@jkotas
C:\h\w\B4A40A07\w\ADB2091D\e>xunit.console.exe System.Text.Json.SourceGeneration.Roslyn4.0.Unit.Tests.dll -xml testResults.xml -nologo -nocolor -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing  
  Discovering: System.Text.Json.SourceGeneration.Roslyn4.0.Unit.Tests (app domain = on [no shadow copy], method display = ClassAndMethod, method display options = None)
  Discovered:  System.Text.Json.SourceGeneration.Roslyn4.0.Unit.Tests (found 19 of 21 test cases)
  Starting:    System.Text.Json.SourceGeneration.Roslyn4.0.Unit.Tests (parallel test collections = on, max threads = 2)
    System.Text.Json.SourceGeneration.UnitTests.GeneratorTests.TypeDiscoveryPrimitivePOCO [FAIL]
      System.IndexOutOfRangeException : Index was outside the bounds of the array.
      Stack Trace:
           at System.Span`1..ctor(T[] array, Int32 start, Int32 length)
           at Roslyn.Utilities.StringTable.Add(Char[] chars, Int32 start, Int32 len)
           at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.SlidingTextWindow.GetText(Int32 position, Int32 length, Boolean intern)
           at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.Lexer.CreateWhitespaceTrivia()
           at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LexerCache.LookupTrivia(Char[] textBuffer, Int32 keyStart, Int32 keyLength, Int32 hashCode, Func`1 createTriviaFunction)
           at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.Lexer.ScanWhitespace()
           at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.Lexer.LexSyntaxTrivia(Boolean afterFirstToken, Boolean isTrailing, SyntaxListBuilder& triviaList)
           at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.Lexer.LexSyntaxToken()
           at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.Lexer.Lex(LexerMode mode)
           at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.SyntaxParser.PreLex()
           at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.SyntaxParser..ctor(Lexer lexer, LexerMode mode, CSharpSyntaxNode oldTree, IEnumerable`1 changes, Boolean allowModeReset, Boolean preLexIfNotIncremental, CancellationToken cancellationToken)
           at Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser..ctor(Lexer lexer, CSharpSyntaxNode oldTree, IEnumerable`1 changes, LexerMode lexerMode, CancellationToken cancellationToken)
           at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxTree.ParseText(SourceText text, CSharpParseOptions options, String path, ImmutableDictionary`2 diagnosticOptions, Nullable`1 isGeneratedCode, CancellationToken cancellationToken)
        /_/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/CompilationHelper.cs(66,0): at System.Text.Json.SourceGeneration.UnitTests.CompilationHelper.CreateCompilation(String source, MetadataReference[] additionalReferences, String assemblyName, Boolean includeSTJ)
        /_/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/JsonSourceGeneratorTests.cs(54,0): at System.Text.Json.SourceGeneration.UnitTests.GeneratorTests.TypeDiscoveryPrimitivePOCO()
    System.Text.Json.SourceGeneration.UnitTests.TypeWrapperTests.MetadataLoadFilePathHandle [FAIL]
      System.IO.FileLoadException : Could not load file or assembly 'System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Array subscript out of range. (Exception from HRESULT: 0x80131508)
      ---- System.IndexOutOfRangeException : Index was outside the bounds of the array.
      Stack Trace:
           at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
           at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
           at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
           at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
           at System.Reflection.Assembly.Load(String assemblyString)
        /_/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/CompilationHelper.cs(34,0): at System.Text.Json.SourceGeneration.UnitTests.CompilationHelper.CreateCompilation(String source, MetadataReference[] additionalReferences, String assemblyName, Boolean includeSTJ)
        /_/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/TypeWrapperTests.cs(32,0): at System.Text.Json.SourceGeneration.UnitTests.TypeWrapperTests.MetadataLoadFilePathHandle()
        ----- Inner Stack Trace -----
           at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
           at System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)
    System.Text.Json.SourceGeneration.UnitTests.GeneratorTests.NameClashCompilation [FAIL]
....

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.Text.Jsonblocking-clean-ciBlocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'untriagedNew 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