Skip to content

explorer.exe registry-Key handle-leak runaway (millions of handles, one CPU core pegged, desktop-icon flicker) on 25H2 Win10-taskbar — reliably triggered by a font-metrics WM_SETTINGCHANGE, stopped by uninstalling EP #5176

Description

@doitamd

Before reporting your issue

  • I have confirmed that this issue does not happen when ExplorerPatcher is not installed
  • I do not have "register as shell extension" enabled
  • I have tried my best to check existing issues

Repro ExplorerPatcher versions

26100.8457.70.4 (latest). Same behaviour on earlier 26100.8457.70.x this month.
Installed from ep_setup.exe from the GitHub releases page.

Repro Windows Versions

Windows 11 Pro, 25H2, build 26200.9278, x64

Third-party tweak software installed

  • Open-Shell 4.4.198 (Classic Explorer toolbar + Classic Start menu)
  • ATOK (third-party IME)
  • Baidu Netdisk shell extension
  • PikPak + WinFsp virtual drive
  • Virtual Desktop Streamer (adds an AppInit_DLL, for VR; unrelated)

Display: one 4K 3840x2160 monitor at 150% scaling.

Note: the control test below (EP removed) was run with ALL of the above still installed and unchanged — only ExplorerPatcher was uninstalled.

Describe the bug

With the Windows 10 taskbar enabled (OldTaskbar=2) on 25H2, explorer.exe intermittently enters a loop where it leaks Key-type handles (visible in Process Explorer / handle.exe / (Get-Process explorer).HandleCount).

The leaked handles almost all point at:

  • HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion (OS build lookup)
  • HKLM\…\Explorer\CommandStore (context-menu rebuild)

Growth is 100–700 handles/sec and, left alone, climbs into the millions. While it is leaking:

  • one CPU core is pegged (~90%) by explorer.exe
  • desktop icons flicker continuously (a redraw loop)
  • the whole shell (menus, window creation) is sluggish

Restarting explorer.exe clears it instantly and does not re-trigger it by itself.

Triggers

  1. Spontaneously, ~3–4 minutes after a clean boot.
  2. Reliably by any font-metrics / WindowMetrics WM_SETTINGCHANGE broadcast — e.g. BetterClearTypeTuner → Apply, or changing the UI fonts. rundll32 user32.dll,UpdatePerUserSystemParameters alone only adds ~300 handles; the font-metrics broadcast produces the full runaway.

EP config: OldTaskbar=2, FileExplorerCommandUI=1, UseClassicDriveGrouping=1. DisableImmersiveContextMenu and ClassicThemeMitigations were both 1; setting both to 0 stops the spontaneous post-boot ignition (trigger 1) but not the WM_SETTINGCHANGE trigger (trigger 2).

This looks like the known Windows FileExplorerCommandSource::GetCommand() refcount leak (~140 Key handles per Explorer window open/close on 23H2/24H2, ref https://bugs.fish/) being driven in a loop by EP whenever it rebuilds the context-menu CommandStore / re-detects the OS version on those broadcast events.

Expected outcome

explorer.exe handle count stays stable when a WM_SETTINGCHANGE / font-metrics change is broadcast; no CPU-bound redraw loop; desktop and taskbar icons do not flicker.

Actual outcome

A single BetterClearTypeTuner Apply (GDI contrast change — confirmed to change HKCU\…\Desktop\FontSmoothingGamma, so the broadcast really fires) sends explorer.exe straight into the runaway: measured 12,000 → 13,600 handles in 15 s, one core pegged, desktop icons flickering. If not interrupted the handle count reaches the millions.

Control test — full EP uninstall. Uninstalled EP completely (ep_setup.exe /uninstall, exit 0; C:\Program Files\ExplorerPatcher gone, no EP DLL in explorer.exe, only the inert HKCU\SOFTWARE\ExplorerPatcher config key left). Rebooted. Everything else left in place.

EP installed (both flags = 0) EP uninstalled
idle after boot plateau ~5–6k handles; sporadic multi-thousand bursts plateau ~3.3k; one one-time bump to ~5.9k around boot+4 min, then flat — capped, cleared by a single explorer restart, no recurrence in 25+ min
BetterClearTypeTuner Apply (GDI contrast 1800), clicked repeatedly for 2.5 min instant full runaway (above) nothing — handles flat ~3.3k (actually drifting down), explorer CPU +1.3 s over 137 s (~1 %), no flicker

So the exact operation that reliably triggers the runaway with EP installed is completely inert once EP is removed.

Additional info

  • Possibly the same root cause as Taskbar icons are blinking/refreshing in Win10 style mode #4667 (taskbar icons blinking in Win10-taskbar mode, also 25H2 / build 26200; display scaling was raised there as a factor — I run 150 %). My case additionally shows the registry-Key handle leak and the reproducible font-metrics trigger.
  • Recovery: taskkill /f /im explorer.exe (or "Restart Explorer") always clears it and does not re-trigger by itself.
  • I can reproduce the WM_SETTINGCHANGE trigger on demand and collect the EP console log / an ETW trace / a handle stack (!htrace) if that would help — just say what to capture.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions