I’m using OpenCV, Windows 11 64-bit, and a Logitech C920 PRO USB camera. OpenCV 4.9.0 from https://opencv.org/releases/. Same behavior with version 4.12.0.
VideoCapture with CAP_DSHOW had been working reliably for several years until Windows installed the 2026-02 Security Update (KB5077181) (26100.7840).
Even before applying this update, there were occasional crashes in
C:\WINDOWS\SYSTEM32\ntdll.dll with a “freeing already freed memory” type of error.
After installing the update, this error now happens regularly:
(38c8.ce0): Access violation - code c0000005 (first chance)
HEAP[java.exe]: HEAP: Free Heap block 000002394A772F10 modified at 000002394A772F48 after it was freed
(38c8.ce0): Break instruction exception - code 80000003 (first chance)
ntdll!RtlpBreakPointHeap+0x16: 00007ffb
I switched from CAP_DSHOW to CAP_MSMF, and the regular crash stopped. However, I now get warnings in the log:
2026-02-12 08:39:15.643 [CameraWorker_video_cam-pos] INFO
c.d.duckserver.camera.CameraWorker -
The source for VideoCapture opens: ‘1’, backendName: ‘MSMF’, captureType: ‘1400’
[ WARN:10@570.361] global cap_msmf.cpp:475
`anonymous-namespace’::SourceReaderCB::OnReadSample
videoio(MSMF): OnReadSample() is called with error status: -1072873821
[ WARN:10@570.361] global cap_msmf.cpp:487
`anonymous-namespace’::SourceReaderCB::OnReadSample
videoio(MSMF): async ReadSample() call is failed with error status: -1072873821
Occasionally, the application also crashes even when using CAP_MSMF.
Has anyone experienced something similar? Any tips or ideas on how to ensure a stable stream?