Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
None
-
5.6.0
-
None
-
Visual Studio 2015 with Qt5Cored.dll linked with Microsoft's C-runtime library (I don't have the setup to check on valgrind, but I suspect it'll show up there)
-
31a971f727ecf0c6651689f052b9fb4c67872b58 (qt/qtbase/5.13)
Description
Use of the screen color picker in QColorDialog causes memory leaks.
Steps to Replicate:
- Run attached program in debug mode (it was run in Visual Studio 2015)
- open a QColorDialog
- click "Pick Screen Color"
- cancel pick mode (eg. escape key), cancel color dialog (eg. escape key), quit application
Results:
- Console output indicates:
Detected memory leaks! Dumping objects -> {22466} normal block at 0x0055B2F0, 12 bytes long. Data: < > 01 00 00 00 FF FF FF FF CD CD CD CD {22464} normal block at 0x0055CD80, 64 bytes long. Data: <x 9g U =g> 78 DC 39 67 B8 B2 55 00 00 00 00 00 20 F8 3D 67 {22463} normal block at 0x0055B2B8, 12 bytes long. Data: <d Re U O > 64 DC 52 65 80 CD 55 00 B0 99 4F 00 {16409} normal block at 0x00552180, 32 bytes long. Data: < > 01 00 00 00 00 00 00 00 04 00 00 00 10 00 00 00 {188} normal block at 0x004E2D48, 112 bytes long. Data: < ;g N =g> D4 E6 3B 67 08 1A 4E 00 00 00 00 00 20 F8 3D 67 {187} normal block at 0x004E1A08, 8 bytes long. Data: < ;gH-N > E0 E6 3B 67 48 2D 4E 00 {186} normal block at 0x004D08C8, 64 bytes long. Data: < !U <g> 01 00 00 00 00 00 00 00 80 21 55 00 98 8F 3C 67 Object dump complete.
- Expected results: not an issue.
Note: Memory leaks are detected via a custom built Qt5Cored.dll linked with Microsoft's C-runtime library (this is the only modification to an otherwise clean Qt 5.6 build).
- If you keep calling pick screen colors, more leaks appear.
- If you select a color without calling pick screen colors, no memory leaks appear.
- Tracing through, the leak appears around the call for q_pickScreenColor(), and before the first grabScreenColor call.
Attachments
For Gerrit Dashboard: QTBUG-53469 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
278402,3 | QColorDialog: Fix memory leak when picking screen colors | 5.13 | qt/qtbase | Status: MERGED | +2 | 0 |