-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ItemsDictionary - NullReferenceException - Merge into AspNetCore 3.1.0? #17068
Comments
3.1.0 is only accepting critical patches at this point. Anything with an easy workaround is unlikely to qualify for patching. |
Gotcha. So, putting 3.1.0 to the side, the bug still exists in the 3.X releases. Is there a way to apply the fix somewhere within the 3.X roadmap? |
It's a similar bar to patch any released component. It needs to be a high impact issue that's difficult to work around. The workaround in this scenario is first checking if the collection is empty? |
Yeah, it definitely possible, but it's not as straight forward as we both might hope. I ran into the bug when I was trying to use Elmah with an AspNetCore website. The original bug report can be found here, ElmahCore/ElmahCore#51. In the code snippet below, the code is using reflection to get the public properties from the In an updated Pull Request for Elmah Core (#57) I've got it setup to cast the original https://github.com/ElmahCore/ElmahCore/blob/a97886f54a20fce5fa6b96b5ab283b96911bd40b/ElmahCore/Error.cs#L155-L177 But, here's the part that lingers with me. The |
You're right, this is a regression introduced in 3.0 by PR #9284. That is one of the servicing criteria. |
Yep, this seems like a significant enough issue and a regression from 3.0, so I think it meets the 3.1.x bar. Given that there is a workaround, and 3.1.0 is locked down tight prior to the upcoming release, I think it would be a 3.1.1 patch candidate. The workaround (for those looking until it's patched) is to check the count of the items collection prior to enumerating and to avoid enumerating it if the collection is empty. |
(Clearing milestone just to put it on our triage radar) |
Thanks everyone |
@Tratcher go ahead and open a PR to fix this in 3.1 when you're ready. |
Recently, a pull request (#16947) was merged to fix #16938.
In the details of the merge, there was a line describing that the merge would be applied to 5.0.0-preview1.
However, the issue is occurring in the current release of AspNetCore 3.0.0. I was wondering what I might be able to do to help this fix/patch become a part of the AspNetCore 3.1.0 release?
The text was updated successfully, but these errors were encountered: