A
Andy De Filippo
Hello there, I've been suggested to post this here from the Visual Studio Developer community.
There seem to be a GDI Object leak issue when printing to certain printers, including (but not limited to), the Microsoft XPS Document Writer.
When rendering to the printer's graphics a 32 bpp bitmap with alpha components, there's a constant increase of GDI objects that never get released, obviously causing the application to crash when the count reaches the 10k limit.
Here's a detailed video reproducing the issue
2021-04-09_12-23-39.mp4
Here's a small vb.net project posted to the developer community that reproduces the problem.
GdiPrintLeakTest.zip
This is a vb.net project developed with VS2017, targeting Framework 4.7.1.
Here's the original post in the Visual Studio developer community:
When rendering an in-memory created bitmap with argb contents in Windows 10 19042.867 x64, GDI leak happens
The memory leak happens on Windows 10 19042.867 x64 and does not happen on Windows 7 (x64, x32).
It does not happen when the contents of the image being rendered do not contain any semi-transparent pixels.
Hoping to hear from you.
Thank you.
Continue reading...
There seem to be a GDI Object leak issue when printing to certain printers, including (but not limited to), the Microsoft XPS Document Writer.
When rendering to the printer's graphics a 32 bpp bitmap with alpha components, there's a constant increase of GDI objects that never get released, obviously causing the application to crash when the count reaches the 10k limit.
Here's a detailed video reproducing the issue
2021-04-09_12-23-39.mp4
Here's a small vb.net project posted to the developer community that reproduces the problem.
GdiPrintLeakTest.zip
This is a vb.net project developed with VS2017, targeting Framework 4.7.1.
Here's the original post in the Visual Studio developer community:
When rendering an in-memory created bitmap with argb contents in Windows 10 19042.867 x64, GDI leak happens
The memory leak happens on Windows 10 19042.867 x64 and does not happen on Windows 7 (x64, x32).
It does not happen when the contents of the image being rendered do not contain any semi-transparent pixels.
Hoping to hear from you.
Thank you.
Continue reading...