-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[Release/5.0] Fix GDI handle leak in Graphics.DrawIcon #48189
Conversation
Tagging subscribers to this area: @safern, @tannergooding Issue DetailsBackport of #47836 Customer ImpactIn any application that draws a lot of icons to a graphics object associated to the current device context we would leak GDI+ handles as observed in the issue, which could potentially cause application crashes if we exceed the GDI handles limit imposed by the OS. Regression?Yes, caused by dotnet/corefx@f807df6 in 5.0. TestingManual testing and also included a regression test which was failing before the fix, the test and fix have been in master for about a week already and the test is pretty stable, we haven't seen failures from it or any other System.Drawing test. RiskLow, the fix is just making sure we call GDI.DeleteObject on a handle that is no longer used. cc: @danmoseley @ericstj @Anipik
|
Updated template to note this was customer reported. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was approved over email |
Failures are unrelated. |
Backport of #47836
Fixes #46789
Customer Impact
Customer reported a GDI resource leak in their WinForms application after they targeted it to NET 5.0.
In any application that draws a lot of icons to a graphics object associated to the current device context we would leak GDI+ handles as observed in the issue, which could potentially cause application crashes if we exceed the GDI handles limit imposed by the OS.
This impacts winforms as System.Drawing.Common is part of their shared framework.
Regression?
Yes, caused by dotnet/corefx@f807df6 in 5.0.
Testing
Manual testing and also included a regression test which was failing before the fix, the test and fix have been in master for about a week already and the test is pretty stable, we haven't seen failures from it or any other System.Drawing test.
Risk
Low, the fix is just making sure we call GDI.DeleteObject on a handle that is no longer used.
cc: @danmoseley @ericstj @Anipik