Skip to content

ILLink.RoslynAnalyzer.DynamicallyAccessedMembersAnalyzer threw an exception of type 'System.IndexOutOfRangeException' #87647

Closed
@radical

Description

@radical

Using fe866e6 I can't build dotnet new wasmconsole projects:

  Microsoft (R) Visual C# Compiler version 4.7.0-3.23315.1 (7a7690ea) (TaskId:107)
  Copyright (C) Microsoft Corporation. All rights reserved. (TaskId:107)
CSC : error AD0001: Analyzer 'ILLink.RoslynAnalyzer.DynamicallyAccessedMembersAnalyzer' threw an exception of type 'System.IndexOutOfRangeException' with message 'Index was outside the bounds of the array.'. [/workspaces/runtime/artifacts/bin/Wasm.Build.Tests/Release/net8.0/browser-wasm/wbt/Debug_w1hn3hlk.m21/Debug_w1hn3hlk.m21.csproj]
  Exception occurred with following context: (TaskId:107)
  Compilation: Debug_w1hn3hlk.m21 (TaskId:107)
  ISymbol: <Main>$ (Method) (TaskId:107)
  System.IndexOutOfRangeException: Index was outside the bounds of the array. (TaskId:107)
  at ILLink.RoslynAnalyzer.DynamicallyAccessedMembersAnalyzer.<>c.<Initialize>b__7_3(SymbolAnalysisContext context) (TaskId:107)
  at Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor.ExecuteAndCatchIfThrows_NoLock[TArg](DiagnosticAnalyzer analyzer, Action`1 analyze, TArg argument, Nullable`1 info, CancellationToken cancellationToken) (TaskId:107)
  ----- (TaskId:107)
  Suppress the following diagnostics to disable this analyzer: IL2026, IL2032, IL2041, IL2043, IL2055, IL2057, IL2058, IL2059, IL2060, IL2062, IL2063, IL2064, IL2065, IL2066, IL2067, IL2068, IL2069, IL2070, IL2071, IL2072, IL2073, IL2074, IL2075, IL2076, IL2077, IL2078, IL2079, IL2080, IL2081, IL2082, IL2083, IL2084, IL2085, IL2086, IL2087, IL2088, IL2089, IL2090, IL2091, IL2092, IL2093, IL2094, IL2095, IL2096, IL2097, IL2098, IL2099, IL2103, IL2106, IL2110, IL2111 (TaskId:107)
  CompilerServer: server - server processed compilation - 9624bd43-5dab-4d62-9e51-fbed45800538 (TaskId:107)
Done executing task "Csc" -- FAILED. (TaskId:107)

  • The failing build uses microsoft.net.illink.tasks/8.0.0-preview.6.23314.14

  • The last passing build on CI was for 3c2ebd5

    • which used sdk 8.0.100-preview.6.23314.19 to build WBT
  • I tested with fe866e6

    • which used sdk 8.0.100-preview.6.23315.7 to build WBT
  • The changes in sdk (6ce52a339247f9a848ff97fa418070b65de92b4d..1a17b18064c9bbf7dcb2155a03f2c92fe657fba1) include:

+    <Dependency Name="Microsoft.NET.ILLink.Tasks" Version="8.0.0-preview.6.23314.14">
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>54dab738de58291ebefc8ff0569a799efaff5d82</Sha>
+      <Sha>0a0fa137097595ad8ec0e2aa9ecffb524cd5df95</Sha>
     </Dependency>

And that includes #87156 Fix trim analyzer warning for inferred type arguments #87156.

cc @sbomer

I will open a PR to use the older sdk for now, for Wasm.Build.Tests . And to trigger wasm jobs on linker changes.

Known Issue Error Message

Fill the error message using step by step known issues guidance.

{
  "ErrorMessage": "",
  "ErrorPattern": "Analyzer 'ILLink.RoslynAnalyzer.DynamicallyAccessedMembersAnalyzer' threw an exception of type 'System.IndexOutOfRangeException",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Known issue validation

Build: 🔎
Result validation: ⚠️ Validation could not be done without an Azure DevOps build URL on the issue. Please add it to the "Build: 🔎" line.

Report

Build Definition Test Pull Request
309611 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution
309003 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87285
309051 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #85796
309441 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87661
309359 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87659
309335 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87660
309319 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87260
309057 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution
309019 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #86722
308955 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87634
308892 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution
308854 dotnet/runtime Workloads-NoWebcil-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87260
308843 dotnet/runtime Workloads-Wasm.Build.Tests.WasmTemplateTests.WorkItemExecution #87629

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
3 13 13

Metadata

Metadata

Assignees

Labels

Known Build ErrorUse this to report build issues in the .NET Helix tabarch-wasmWebAssembly architecturearea-Tools-ILLink.NET linker development as well as trimming analyzerstest-failure

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions