Open ollie-dawes opened 5 months ago
Thanks for the report! I'll see if I can repro. There have been a number of fixes in Windows 11, are you able to reproduce there?
I'm afraid I don't have access to Win 11, if some of my colleagues have a few spare cycles they may be able to give it a test and give you an update here. So far it has only been me that has been able to reproduce this deadlock issue though within our code base, though others have seen the handle issue.
Background:
I am working on a C++ screen capture application and have been running into a few issues. One issue is occasionally our application hangs when we are tearing down our display capture logic. When I pause our application in the debugger I get the following trace for the main thread (cannot share full trace as it is a closed source product):
It looks like our
IGraphicsCaptureSession
is hanging when we delete the owning ComPtr.I decided to pull down the
ScreenCaptureforHWND
sample from this repo to see if I could reproduce the issue and I was able to reproduce the problem. Pausing the sample in Visual studio after getting into the hung state gives the following trace on the main thread:Not quite the same as what we are seeing but the same problem and same reproduction steps.
How to reproduce:
This is a tricky one to reproduce in both our app and in the
ScreenCaptureforHWND
sample so I suspect there is a timing issue at play.To reproduce the problem:
ScreenCaptureforHWND
sample.System info: