Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.0.0 Beta 1
-
None
-
Windows
-
cbf476242608a575595651a2eb8c40588a4631a4
Description
Calling QPainter.drawText with a rotated transform will leak a GDI handle for each glyph. On Windows 7, the application will crash when the GDI handle count reaches 10000. This can happen quite rapidly as shown in the attached demo project.
BUG FOUND IN:
/qtbase/src/plugins/platforms/windows/qwindowsfontengine.cpp (line 1113)
SOLUTION:
Change 'ReleaseDC(0, hdc);' to 'DeleteDC(hdc);'
A similar bug may also be found in:
/qtbase/src/plugins/platforms/windows/qwindowsfontdatabase.cpp (line 536)
Attachments
For Gerrit Dashboard: QTBUG-27812 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
38858,1 | Fix GDI leaks in fontengine | master | qt/qtbase | Status: MERGED | +2 | 0 |
39718,1 | Fix GDI leaks in fontengine | winrt | qt/qtbase | Status: ABANDONED | 0 | 0 |