-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
🪲 bugProduct bug (most likely)Product bug (most likely)💥 regression-previewRegression from a preview releaseRegression from a preview releasetenet-performanceImprove performance, flag performance regressions across core releasesImprove performance, flag performance regressions across core releases
Description
-
.NET Core Version: 5.0.3 - 5.0.6 tested.
-
Have you experienced this same bug with .NET Framework?: NO. Also this bug is not present in .net core 3.1
Problem description:
For several months I am was investigating huge (up to critical 10000) GDI leak in our app (beginning after switching from .net core 3.1 to .Net 5). And finally found it out (I am happy 🙄). Facts:
- Leaking are DC and Bitmap in approximately the same proportions.
- This is not managed leaks - managed heap have not any increasing elements. So GC not helping here and if
PropertyGrid
inside childe window, closing it will not help too. - Leaks are not reproduce on local machine. Only when you connect to rdp session. So if your rdp session is open - all is fine, to leak you need close rdp window and connect again. Tested on Win10 1909/20H2 hosts.
I think amount of leaks are some how related to displaying property's, because some window leak more than others.
GDI.mp4
Our scenario was: we have an mdi app with many child windows that's have PropertyGrid
, for one rdp connect we losing about 100 GDI objects. So, after ~80 connects, our app was crushing. For now we monitor GDI objects count and restarting app when needed.
Expected behavior:
No GDI leak.
Minimal repro:
GDI_test.zip
Metadata
Metadata
Assignees
Labels
🪲 bugProduct bug (most likely)Product bug (most likely)💥 regression-previewRegression from a preview releaseRegression from a preview releasetenet-performanceImprove performance, flag performance regressions across core releasesImprove performance, flag performance regressions across core releases