Open sschultze opened 1 week ago
Tagging subscribers to this area: @tarekgh, @tommcdon, @pjanotti See info in area-owners.md if you want to be subscribed.
The CDSCollectionETWBCLProvider does have a Guid property contrary to the exception System.Reflection.CustomAttributeFormatException: 'Guid' property specified was not found.
https://github.com/dotnet/runtime/blob/10ee2b11e94acf23fe17fe36d2dbc2db588f06ec/src/libraries/System.Collections.Concurrent/src/System/Collections/Concurrent/CDSCollectionETWBCLProvider.cs#L21-L24
maybe this has something to do with reflection?
Tagging subscribers to this area: @tarekgh, @tommcdon, @pjanotti See info in area-owners.md if you want to be subscribed.
Tagging subscribers to this area: @dotnet/area-system-reflection See info in area-owners.md if you want to be subscribed.
Description
In an application under the configuration described below, one log shows that a
TypeInitializationException
was thrown when the type initializer forCDSCollectionETWBCLProvider
ran (because of aNullReferenceException
inInvokeStub_EventSourceAttribute.set_Guid
). It was thrown when the ASP.NET Core app is shutting down (ApplicationLifetime.StopApplication
). As it occurs in the type initializer ofCDSCollectionETWBCLProvider
, I'm filing it here in the .NET runtime repository.Reproduction Steps
I am unfortunately not able to reproduce the error. But maybe looking at the stack trace in combination with the source code leads to some realization.
Expected behavior
The type initializer for
CDSCollectionETWBCLProvider
should not throw an exception.Actual behavior
The type initializer for
CDSCollectionETWBCLProvider
threw an exception.Regression?
No response
Known Workarounds
No response
Configuration
mcr.microsoft.com/dotnet/aspnet:8.0.8
linux/amd64
version of the image ran under Docker Desktop on macOS 15.0.1 (Apple M2 Pro), Rosetta enabledOther information
No response