Webview2 gpu related error and some questions

현욱 김 0 Reputation points
2024-08-07T10:08:18.8666667+00:00
  1. When users use my webview2 application, some users reports abnormal behavior related webview2. When I check webview2 log, it was gpu process crash error.

It's like below

[12404:11960:0731/173916.555:ERROR:gpu_process_host.cc(1037)] GPU process launch failed: error_code=40
[12404:11960:0731/173916.556:WARNING:gpu_process_host.cc(1496)] The GPU process has crashed 9 time(s)
[12404:11960:0731/173916.556:FATAL:gpu_data_manager_impl_private.cc(459)] GPU process isn't usable. Goodbye.

I found many experience about above. They recommended --no-sandbox option, and it works in my case also. But as I understand, --no-sandbox option is disabling security setting and it's guided that it should be used for only test. I tried --disable-gpu. But it didn't work. I want to know root cause of problem and safe measure for this....

  1. And regarding switch like --no-sandbox, I wonder scope of switch when I use it C# webview2 library. I'm using switch through CoreWebView2Environment.CreateAsync method. I wonder if effect is limited within my application when I use switch in my webview2 application or not.
Microsoft Edge Microsoft Edge development
Developer technologies C#
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 77,686 Reputation points Volunteer Moderator
    2024-08-07T19:28:56.4366667+00:00

    the real issue is probably the display driver. your own real option is to disable gpu;

    https://github.com/MicrosoftEdge/WebView2Feedback/issues/725


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.