MicrosoftEdge / MicrosoftEdge/WebView2Feedback

WinUI3 with WebView2 on a secondary window crash in remote desktop session

Open
#3,820 2 comments 0 reactions 1 assignee View on GitHub

@champnic is already working on this.

Since Sep 27, 2023.

bug
Dominant language
PowerShell
Stars
526
Forks
67
PR merge metrics
No merged PRs in 30d

Description

Description
When there is second Microsoft.UI.Xaml.Window instance and there is a WebView2 on it, the app crash when I connect it to the pc with remote desktop (Note: The host and the pc I'm using to connect to it has different dpi monitors).

Version
SDK: Bundled with image
Runtime: 117.0.2045.36
Framework: WinUI3
OS: Windows 11

Repro Steps

  1. Create a new C++ WinUI3 app (packaged), upgrade windows app sdk nuget to the latest (or the version I screenshot)
  2. In MainWindow.xaml
<Window ...>
    <WebView2 Source="https://www.google.com" Width="500" Height="500"/>
</Window>
  1. Add a member instance Window window2; in App.xaml.h. In App.xaml.cpp, modify the App::OnLaunch function
void App::OnLaunched(LaunchActivatedEventArgs const&)
{
    window = WinUI3Cpp::MainWindow{};
    window.Activate();
    window2 = WinUI3Cpp::MainWindow{};
    window2.Activate();
}
  1. Build and run. Then connect the pc with another pc, see app crash.

Screenshots
image

https://github.com/MicrosoftEdge/WebView2Feedback/assets/42881734/b4f314aa-32e8-4f85-9b88-2ffbc69b09a3

This crash seems to only happens when the cursor is put into a textbox in the website.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.