You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EXEC : error : Object reference not set to an instance of an object. [C:\Users\david\source\repos\WebApplication35\WebApplication35\WebApplication35.csp
roj]
System.NullReferenceException: Object reference not set to an instance of an object.
at System.Collections.Concurrent.ConcurrentDictionary`2.TryGetValueInternal(TKey key, Int32 hashcode, TValue& value)
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
at ILCompiler.DependencyAnalysis.ConstructedEETypeNode.ComputeNonRelocationBasedDependencies(NodeFactory factory) in /_/src/coreclr/tools/aot/ILCom
piler.Compiler/Compiler/DependencyAnalysis/ConstructedEETypeNode.cs:line 64
at ILCompiler.DependencyAnalysis.ObjectNode.GetStaticDependencies(NodeFactory factory) in /_/src/coreclr/tools/Common/Compiler/DependencyAnalysis/O
bjectNode.cs:line 59
at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.GetStaticDependenciesImpl(DependencyNodeCore`1 node) in /_/src/coreclr/tools/aot/ILC
ompiler.DependencyAnalysisFramework/DependencyAnalyzer.cs:line 181
at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.GetStaticDependencies(DependencyNodeCore`1 node) in /_/src/coreclr/tools/aot/ILCompi
ler.DependencyAnalysisFramework/DependencyAnalyzer.cs:line 221
at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.ProcessMarkStack() in /_/src/coreclr/tools/aot/ILCompiler.DependencyAnalysisFramewor
k/DependencyAnalyzer.cs:line 256
at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.ComputeMarkedNodes() in /_/src/coreclr/tools/aot/ILCompiler.DependencyAnalysisFramew
ork/DependencyAnalyzer.cs:line 307
at ILCompiler.RyuJitCompilation.CompileInternal(String outputFile, ObjectDumper dumper) in /_/src/coreclr/tools/aot/ILCompiler.RyuJit/Compiler/RyuJ
itCompilation.cs:line 88
at ILCompiler.Compilation.ILCompiler.ICompilation.Compile(String outputFile, ObjectDumper dumper) in /_/src/coreclr/tools/aot/ILCompiler.Compiler/C
ompiler/Compilation.cs:line 526
at ILCompiler.Program.Run(String[] args) in /_/src/coreclr/tools/aot/ILCompiler/Program.cs:line 893
at ILCompiler.Program.Main(String[] args) in /_/src/coreclr/tools/aot/ILCompiler/Program.cs:line 1085
C:\Program Files\dotnet\sdk\7.0.100-preview.6.22314.18\Sdks\Microsoft.DotNet.ILCompiler\build\Microsoft.NETCore.Native.targets(273,5): error MSB3073: Th
e command ""C:\Users\david\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.0.0-preview.6.22312.1\tools\\ilc" @"obj\Release\net7.0\win-x64\
native\WebApplication35.ilc.rsp"" exited with code 1. [C:\Users\david\source\repos\WebApplication35\WebApplication35\WebApplication35.csproj]
Reproduction Steps
I only saw this once, a recompile worked but the code was here:
usingMicrosoft.AspNetCore.Mvc;usingMicrosoft.Extensions.Primitives;usingSystem.Diagnostics.CodeAnalysis;usingSystem.Linq.Expressions;usingSystem.Reflection;varbuilder=WebApplication.CreateBuilder(args);varapp=builder.Build();// This works//IQueryCollection q = default;// _ = q?["x"];// This works// _ = typeof(IQueryCollection).GetMember("Item");// This works// [DynamicDependency("get_Item(System.String)", typeof(IQueryCollection))]// This works// var getter = typeof(IQueryCollection).GetMethod("get_Item", BindingFlags.Public | BindingFlags.Instance, new[] { typeof(string) })!;// This works// var getter = typeof(IHeaderDictionary).GetProperty("Item");// var q = Expression.Parameter(typeof(IQueryCollection), "q");// var p = Expression.Property(q, getter);app.MapGet("/",()=>"Hello World");app.MapGet("/q",([FromHeader(Name="Accept")]stringaccept)=>accept);app.MapGet("/r/{id}",(intid)=>$"Hello {id}");// app.MapGet("/pq", (Person p) => $"Got a person with {p.Name}");app.MapGet("/p",()=>newPerson2("Name"));app.MapPost("/",(Person2p)=>p);app.MapPost("/async",async(Person2p)=>{awaitTask.Delay(1000);returnp;});app.Run();recordstructPerson(stringName){publicstaticboolTryParse(stringvalue,outPersonp){p=new(value);returntrue;}}recordPerson2(stringName)// : IBindableFromHttpContext<Person2>{publicstaticValueTask<Person2?>BindAsync(HttpContextcontext,ParameterInfoparameter){returnnew(newPerson2("From Bind async"));}}
Expected behavior
No null ref.
Actual behavior
Null reference
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response
The text was updated successfully, but these errors were encountered:
Description
Reproduction Steps
I only saw this once, a recompile worked but the code was here:
Expected behavior
No null ref.
Actual behavior
Null reference
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response
The text was updated successfully, but these errors were encountered: