microsoft / microsoft/PowerToys

Color Picker: ColorPickerUI leaks virtual memory

Open
#47,892 3 comments 0 reactions 1 assignee Claimed by @daverayment View on GitHub
Issue-Bug Needs-Team-Response Needs-Triage Product-Color Picker
Dominant language
C
Stars
139k
Forks
8.6k
PR merge metrics
PR metrics pending

Description

### Microsoft PowerToys version

0.98.0.0

### Installation method

WinGet

### Area(s) with issue?

ColorPicker

### Steps to reproduce

1. Start color picker and dont touch it
2. Leave powertoys running idle for several hours
4. After 4 hours, private bytes reaches somewhere around 700 MB with no sign of stabilizing

### ✔️ Expected Behavior

that not happening

### ❌ Actual Behavior

inDbg analysis of a full memory dump shows:

- MEM_PRIVATE: 760 regions — 263.198 GB
- MEM_RESERVE: 477 regions — 2.256 TB
- PAGE_READWRITE | PAGE_WRITECOMBINE: 8 regions — 418 MB

eap analysis shows continuous VirtualAlloc with no frees:
Virtual blocks: 10 — total 37,932 KB
VirtAlloc bytes: 0x000018c55ac6c110

Call stack (WinDbg !analyze -v):
DirectWriteForwarder!ILStubClass.IL_STUB_PInvoke(MSG ByRef, HandleRef, Int32, Int32)
user32!GetMessageW
win32u!NtUserGetMessage

PAGE_WRITECOMBINE flag suggests leak originates in DirectWrite/WPF rendering pipeline
graphics buffers allocated each render cycle and never freed.

### Upload Bug Report ZIP-file

_No response_

### Additional Information

OS: Windows 11 Build 26100.8457 x64
.NET version: CoreCLR 9.0.1426.11910
System language: English
Installation type: User installation
Running as admin: No

If you want the the .dmp feel free to reach out

0:000> !address -summary

--- Usage Summary ---------------- RgnCount ----------- Total Size -------- %ofBusy %ofTotal
Free 249 7dbe`183a1000 ( 125.743 TB) 98.24%
1145 241`c7f9e000 ( 2.257 TB) 99.98% 1.76%
Image 960 0`14590000 ( 325.562 MB) 0.01% 0.00%
Heap 68 0`0658b000 ( 101.543 MB) 0.00% 0.00%
Stack 216 0`04f40000 ( 79.250 MB) 0.00% 0.00%
Other 19 0`001c5000 ( 1.770 MB) 0.00% 0.00%
TEB 72 0`00090000 ( 576.000 kB) 0.00% 0.00%
PEB 1 0`00001000 ( 4.000 kB) 0.00% 0.00%

--- Type Summary (for busy) ------ RgnCount ----------- Total Size -------- %ofBusy %ofTotal
MEM_MAPPED 650 200`06af0000 ( 2.000 TB) 88.60% 1.56%
MEM_PRIVATE 760 41`ccb27000 ( 263.198 GB) 11.39% 0.20%
MEM_IMAGE 1071 0`14638000 ( 326.219 MB) 0.01% 0.00%

--- State Summary ---------------- RgnCount ----------- Total Size -------- %ofBusy %ofTotal
MEM_FREE 249 7dbe`183a1000 ( 125.743 TB) 98.24%
MEM_RESERVE 477 241`9f88f000 ( 2.256 TB) 99.95% 1.76%
MEM_COMMIT 2004 0`483c0000 ( 1.129 GB) 0.05% 0.00%

--- Protect Summary (for commit) - RgnCount ----------- Total Size -------- %ofBusy %ofTotal
PAGE_READWRITE | PAGE_WRITECOMBINE 8 0`1a20b000 ( 418.043 MB) 0.02% 0.00%
PAGE_READWRITE 726 0`1026d000 ( 258.426 MB) 0.01% 0.00%
PAGE_EXECUTE_READ 257 0`0c23d000 ( 194.238 MB) 0.01% 0.00%
PAGE_READONLY 639 0`0b0f3000 ( 176.949 MB) 0.01% 0.00%
PAGE_NOACCESS 103 0`052f7000 ( 82.965 MB) 0.00% 0.00%
PAGE_WRITECOPY 126 0`017fd000 ( 23.988 MB) 0.00% 0.00%
PAGE_READWRITE | PAGE_GUARD 72 0`000da000 ( 872.000 kB) 0.00% 0.00%
PAGE_READONLY | PAGE_GUARD 72 0`00048000 ( 288.000 kB) 0.00% 0.00%
PAGE_EXECUTE_READWRITE 1 0`00002000 ( 8.000 kB) 0.00% 0.00%

--- Largest Region by Usage ----------- Base Address -------- Region Size ----------
Free 2ba`ff3c4000 7b39`e7b1c000 ( 123.226 TB)
7e00`d5180000 1f4`eef06000 ( 1.957 TB)
Image 7ff8`85221000 0`01f32000 ( 31.195 MB)
Heap 27a`04bb0000 0`00dbf000 ( 13.746 MB)
Stack ca`20f00000 0`0017b000 ( 1.480 MB)
Other 27a`68d10000 0`00181000 ( 1.504 MB)
TEB ca`20a00000 0`00002000 ( 8.000 kB)
PEB ca`20b65000 0`00001000 ( 4.000 kB)

### Other Software

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.