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

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

Open
MLAEO02 opened this issue Dec 16, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@MLAEO02
Copy link

MLAEO02 commented Dec 16, 2024

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

@MLAEO02 MLAEO02 added the bug Something isn't working label Dec 16, 2024
Copy link

Hi, @MLAEO02!

It seems that your issue contains the word "crash". If you have not already, could you attach a crash dump as a comment?

WV2 crash dumps are located in a subfolder of the app's user data folder (UDF): <UDF>\EBWebView\Crashpad\reports\. By default, the user data folder is created in the app's folder with a name like <App Exe Name>.exe.WebView2. Refer to Crash Diagnostics for more information.

Thank you for your cooperation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant