Skip to content

[Problem/Bug]: When --single-process is on, print with ShowPrintUI crash #4996

Open
@MLAEO02

Description

What happened?

We recently added the ability to launch the embedded WebView2 browser with the "--single-process" parameter to optimize system resource usage for viewing static HTML files. We also made it possible to print the HTML file by calling the ShowPrintUI method. The print parameters screen displays correctly, but the WebView2 instance crashes without generating a dump file when printing is initiated. This results in a completely black screen being displayed instead of the embedded browser.
CrashWebView2

After invoking printing from ShowPrintUI, the ProcessFailed event is called.

We understood that the problem is the fact that the ShowPrintUI method is an asynchronous method and, with the --single-process parameter, it isn't possible to call it. For this reason, we have temporarily removed the --single-process parameter.

We expected asynchronous methods to work regardless of the presence of the --single-process parameter, as we were convinced that they were called with a multi-threaded structure.
Is this behavior intended?

Importance

Moderate. My app's user experience is affected, but still usable.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

131.0.2903.99

SDK Version

1.0.2792.45

Framework

Win32

Operating System

Windows 10, Windows 11, Windows Server

OS Version

No response

Repro steps

  • Call the creation of the WebView2's istance with the --single-process in the Additional Arguments.
  • Call the ShowPrintUI (COREWEBVIEW2_PRINT_DIALOG_KIND_SYSTEM or COREWEBVIEW2_PRINT_DIALOG_KIND_BROWSER).
  • Print the page.

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

Don't know

Last working version (if regression)

No response

AB#55622366

Metadata

Assignees

Labels

bugSomething isn't workingtrackedWe are tracking this work internally.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions