2023-03-15, 13:58:01
Hi,
There is only one msedgewebview2 browser process AFAIK.
You can however have multiple renderer processes. You should not have to close those by killing them manually.
Perhaps it would help if you can use suspend so that these processes use less memory when form2 is closed? That's currently not exposed, but I can add it if you think it helps.
Note that you would have to then handle suspended browsers and resume them on re-opening the form again.
If the main browser process crashes.. you certainly have a problem.
There can be several reasons for that, lack of resources is one, but bad GPU drivers is another one.
As a first step I would suggest to try and disable GPU hardware acceleration.
You can do so by setting environment variables "--ignore-gpu-blocklist --disable-gpu-driver-bug-workarounds" via the AdditionalBrowserArguments property.
The MS Edge browser will handle this by itself, but for WebView2 it is up to us to handle this with more grace.
Are you currently using the OnProcessFailed event? If not then do as it helps tracking when things go bad.
For customers having issues it might also help to turn on the logging feature so that you can get some more details.
See: https://doc.antview.dev/hs190.htm
There's 2 log levels that you can use.
--
Wil
There is only one msedgewebview2 browser process AFAIK.
You can however have multiple renderer processes. You should not have to close those by killing them manually.
Perhaps it would help if you can use suspend so that these processes use less memory when form2 is closed? That's currently not exposed, but I can add it if you think it helps.
Note that you would have to then handle suspended browsers and resume them on re-opening the form again.
If the main browser process crashes.. you certainly have a problem.
There can be several reasons for that, lack of resources is one, but bad GPU drivers is another one.
As a first step I would suggest to try and disable GPU hardware acceleration.
You can do so by setting environment variables "--ignore-gpu-blocklist --disable-gpu-driver-bug-workarounds" via the AdditionalBrowserArguments property.
The MS Edge browser will handle this by itself, but for WebView2 it is up to us to handle this with more grace.
Are you currently using the OnProcessFailed event? If not then do as it helps tracking when things go bad.
For customers having issues it might also help to turn on the logging feature so that you can get some more details.
See: https://doc.antview.dev/hs190.htm
There's 2 log levels that you can use.
--
Wil