Description
Description
I am working on a PR here: https://github.com/dotnet/maui/pull/14846/files and I see a test failure that is an exception inside ConditionalWeakTable. I am semi-sure that my changes don't have anything to do with it and the test that is failing does not really use anything that I am working on.
However, since this is an exception inside CWT, I think that there may be an issue there at least:
System.NullReferenceException : Object reference not set to an instance of an object.
Stack Trace:
at System.Runtime.CompilerServices.ConditionalWeakTable`2.Remove(TKey key)
As far as I can see, the only things in that Remove method that can be null is _container... Bu that should not be null, so this is scary-ish.
Reproduction Steps
This is the hard part and I am trying to find something.
Expected behavior
No exception.
Actual behavior
Exception.
Regression?
No response
Known Workarounds
No response
Configuration
.NET 7.0.201 on macOS. Seems to work fine on Windows.
Onlyfailing on CI, cannot reproduce this on local Windows/macOS.
Other information
No response