Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GraphicsCapturePicker breaks Windows Explorer after display is unplugged #31

Open
DonFreiling opened this issue Jan 20, 2021 · 4 comments
Labels
api-bug A bug in the underlying Windows APIs

Comments

@DonFreiling
Copy link

System Info: Windows 10 Pro x64 10.0.19041 running on Lenovo L540
Visusal Studio 2019 V16.8.2
Windows SDK: 10.0.19041.0
Platform Toolset: VS 2019 (v142)
Microsoft.Windows.CppWinRT nuget package v2.0.201217.4

Laptop has 2 external displays plugged in.

Repro Steps:

  1. Get and build Win32CaptureSample-master
  2. Start the app and press "Open Picker" to show the GraphicsCapturePicker popup
  3. Unplug one of the external displays
  4. Press cancel on the GraphicsCapturePicker popup

At this point Windows Explorer is in a bad state. Clicking Windows Icon in the task bar does not bring up the start menu. Right clicking any of the app icons in the task bar does not bring up the context menu. Clicking the "Open Picker" button on the Win32CaptureSample app brings up the GraphicsCapturePicker but with no content (see attached image). It was necessary to restart Windows Explorer from the Task Manager in order to recover.

Running the same steps as above with only 1 external display will result in Win32CaptureSample throwing an exception when the display is unplugged (see attached image)
CaptureSampleException
CaptureSampleBlankPicker

.

@robmikh
Copy link
Owner

robmikh commented Jan 21, 2021

Thanks for reporting this!

@robmikh robmikh added the api-bug A bug in the underlying Windows APIs label Jan 21, 2021
@robmikh
Copy link
Owner

robmikh commented Jan 22, 2021

Hmmm... I'm not able to reproduce this with my Surface Laptop. There is a problem, the application crashes for me, but it doesn't leave explorer in a bad state. I haven't attached a debugger yet, that might yield more answers.

@robmikh
Copy link
Owner

robmikh commented Jan 22, 2021

MonitorList has a pretty silly bug in it... but it's not something that should put Explorer in a bad state. I'll fix that issue first and we'll see if the other issue manifests.

@robmikh robmikh added the bug Something isn't working label Jan 22, 2021
@robmikh
Copy link
Owner

robmikh commented May 13, 2022

I think I can reproduce the original issue, I'll need to do some debugging to see if it's actually related. I'm not sure what I saw before, but I can't see the bug in MonitorList that I was convinced of.

@robmikh robmikh removed the bug Something isn't working label May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-bug A bug in the underlying Windows APIs
Projects
None yet
Development

No branches or pull requests

2 participants