dotnet / wpf

WPF is a .NET Core UI framework for building Windows desktop applications.
MIT License
7.08k stars 1.17k forks source link

WPF application is crashed when Discord captures its screen #8167

Open Dev-Taehui opened 1 year ago

Dev-Taehui commented 1 year ago

Description

All wpf apps is crashed when user starts capturing its screen with using "Use our advanced technology to capture your screen" option of Discord. It is regardless of .NET framework, .NET Core 3.x or .NET. I think that it is relative to WPF DirectX 9 hardware acceleration. Because when I turned off HW acceleration, it doesn't crash anymore.

Reproduction Steps

  1. Create any wpf project.
  2. Build and start.
  3. Execute Discord and start screen sharing of wpf app.

Expected behavior

Not crashed

Actual behavior

Crashed

Regression?

No, Visual Studio 2022 that is based on .NET framework is crashed when Discord hooks it to capture screen

Known Workarounds

No

Impact

I don't know

Configuration

Other information

No response

miloush commented 1 year ago

Do you have a stack trace or details from Event Viewer?

Dev-Taehui commented 1 year ago

@miloush No, it is native code crash. No managed exception was thrown.

Dev-Taehui commented 1 year ago

I found that it doesn't crash when turning off WPF HW acceleration. I updated issue.