You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
local investigation rather than relying on the Task Manager snapshot.
TL;DR: this is not harmless background CPU. Cap 0.5.9 on Windows continuously enumerates cameras while idle and leaks DirectShow resources on each poll. This is the same defect diagnosed and fixed by #2129.
On my i7-12800H system with 20 logical processors, I measured the hidden/tray process using 0.52 to 1.21 CPU cores, which Task Manager reports as roughly 2.6% to 6.0% total CPU. A 5% reading on this machine is one fully occupied logical core.
After 4 hours 16 minutes idle, Cap.exe had reached:
3,345 threads
223,563 handles
3.43 GB private memory
838 MB working set
Cap's own periodic memory log went from virtual_mb=589 after the first minute to virtual_mb=3424 after 4h16m, a sustained increase of about 11 MB/minute. The thread count implies approximately one leaked thread every 4.64 seconds, matching the device-enumeration polling cadence.
The concrete cause is that Windows VideoInputDevice::new() calls IMoniker::BindToObject during plain camera enumeration. That instantiates each DirectShow capture filter and opens it through the KS driver. Those resources are not reclaimed when the temporary filter is released. Cap runs the enumeration repeatedly (spawn_devices_snapshot_emitter, plus the frontend device poll), so it leaks threads and dozens of handles for the lifetime of the process. My settings have cameraId: null; no selected or active camera is required.
PR #2129 defers BindToObject until formats or capture are actually requested and reports the same signature: approximately one thread and dozens of handles leaked per enumeration, scaling with the number of camera/virtual-camera devices.
At 223k handles and 3.3k threads this is also a reliability problem, not only an efficiency issue: it can lead to handle exhaustion and the Windows crashes described in #2115.
Could this issue be reopened or linked to #2129 until that fix ships? The current stable build, 0.5.9, still contains the leaking path.
Activity
linear commentedon Aug 17, 2026
CAP-789
richiemcilroy commentedon Aug 17, 2026
1.1%? Seems very low. Just quit the app 😁
Hona commentedon Aug 19, 2026
@richiemcilroy I did a slop
local investigation rather than relying on the Task Manager snapshot.
TL;DR: this is not harmless background CPU. Cap 0.5.9 on Windows continuously enumerates cameras while idle and leaks DirectShow resources on each poll. This is the same defect diagnosed and fixed by #2129.
On my i7-12800H system with 20 logical processors, I measured the hidden/tray process using 0.52 to 1.21 CPU cores, which Task Manager reports as roughly 2.6% to 6.0% total CPU. A 5% reading on this machine is one fully occupied logical core.
After 4 hours 16 minutes idle,
Cap.exehad reached:Cap's own periodic memory log went from
virtual_mb=589after the first minute tovirtual_mb=3424after 4h16m, a sustained increase of about 11 MB/minute. The thread count implies approximately one leaked thread every 4.64 seconds, matching the device-enumeration polling cadence.The concrete cause is that Windows
VideoInputDevice::new()callsIMoniker::BindToObjectduring plain camera enumeration. That instantiates each DirectShow capture filter and opens it through the KS driver. Those resources are not reclaimed when the temporary filter is released. Cap runs the enumeration repeatedly (spawn_devices_snapshot_emitter, plus the frontend device poll), so it leaks threads and dozens of handles for the lifetime of the process. My settings havecameraId: null; no selected or active camera is required.PR #2129 defers
BindToObjectuntil formats or capture are actually requested and reports the same signature: approximately one thread and dozens of handles leaked per enumeration, scaling with the number of camera/virtual-camera devices.At 223k handles and 3.3k threads this is also a reliability problem, not only an efficiency issue: it can lead to handle exhaustion and the Windows crashes described in #2115.
Could this issue be reopened or linked to #2129 until that fix ships? The current stable build,
0.5.9, still contains the leaking path.Hona commentedon Aug 19, 2026
forgive the slop details but this should give a lot more context :)