Is there an existing issue for this?
CefSharp Version
147.0.10
Operating System
Windows 11
Architecture
x64
.Net Version
.NET 8.0
Implementation
WPF HwndHost
Reproduction Steps
- Configure CefSharp to use the Chrome runtime style:
CefSharpSettings.RuntimeStyle = CefRuntimeStyle.Chrome;
- Add a
disable-features command-line argument, any value will crash the application: CefCommandLineArgs.Add("disable-features", "GlobalMediaControls");
- Initialize CEF.
- Create a ChromiumWebBrowser instance.
- Crash observed.
Made a minimal reproducable repository demonstrating this issue: https://github.com/SLT-World/CefSharpRuntimeCrash/blob/main/MainWindow.xaml.cs
Expected behavior
The browser should not crash when using Chrome runtime style together with the disable-features flag.
Perhaps related, the supplied disable-features list should be merged, similar to the behavior observed in cefclient.exe in Other information below.
Actual behavior
When using the Chrome runtime style, adding any value to disable-features causes the application to crash during browser creation.
Issue appears to be specific to the Chrome runtime style and does not occur when using the Alloy runtime style. App manifest does not have an effect.
Additionally, the disable-features list are not merged correctly with an existing list. There are 2 completedly separate disable-features.
Regression?
Unsure.
Known Workarounds
Avoid using the disable-features flag when running with the Chrome runtime style.
Using Alloy runtime style avoids the crash entirely, even with the disable-features flag.
Does this problem also occur in the CEF Sample Application
No
Other information
I was unable to replicate the issue with cefclient.exe on the same version 147.0.10 so I believe this may be a CefSharp issue.
I used the following command: cefclient.exe --multi-threaded-message-loop --no-sandbox --enable-chrome-runtime --disable-features=GlobalMediaControls.
I can assure that cefclient was running in Chrome runtime style as the chrome://extensions page exists.
Furthermore, in cefclient.exe, GlobalMediaControls is merged as --disable-features=GlicActorUi,AutofillActorMode,LensOverlay,GlobalMediaControls, seen in chrome://version.
The existing disable-features seems to originate from https://github.com/chromiumembedded/cef/blob/58fa5d380aeaf56691ed5652ccec9386a7cc7d19/libcef/common/chrome/chrome_main_delegate_cef.cc#L357
Unfortunately, I lack the skills to further investigate or debug it myself beyond this point.
Is there an existing issue for this?
CefSharp Version
147.0.10
Operating System
Windows 11
Architecture
x64
.Net Version
.NET 8.0
Implementation
WPF HwndHost
Reproduction Steps
CefSharpSettings.RuntimeStyle = CefRuntimeStyle.Chrome;disable-featurescommand-line argument, any value will crash the application:CefCommandLineArgs.Add("disable-features", "GlobalMediaControls");Made a minimal reproducable repository demonstrating this issue: https://github.com/SLT-World/CefSharpRuntimeCrash/blob/main/MainWindow.xaml.cs
Expected behavior
The browser should not crash when using Chrome runtime style together with the
disable-featuresflag.Perhaps related, the supplied
disable-featureslist should be merged, similar to the behavior observed in cefclient.exe in Other information below.Actual behavior
When using the Chrome runtime style, adding any value to
disable-featurescauses the application to crash during browser creation.Issue appears to be specific to the Chrome runtime style and does not occur when using the Alloy runtime style. App manifest does not have an effect.
Additionally, the
disable-featureslist are not merged correctly with an existing list. There are 2 completedly separatedisable-features.Regression?
Unsure.
Known Workarounds
Avoid using the
disable-featuresflag when running with the Chrome runtime style.Using Alloy runtime style avoids the crash entirely, even with the
disable-featuresflag.Does this problem also occur in the CEF Sample Application
No
Other information
I was unable to replicate the issue with cefclient.exe on the same version 147.0.10 so I believe this may be a CefSharp issue.
I used the following command:
cefclient.exe --multi-threaded-message-loop --no-sandbox --enable-chrome-runtime --disable-features=GlobalMediaControls.I can assure that cefclient was running in Chrome runtime style as the
chrome://extensionspage exists.Furthermore, in cefclient.exe,
GlobalMediaControlsis merged as--disable-features=GlicActorUi,AutofillActorMode,LensOverlay,GlobalMediaControls, seen inchrome://version.The existing
disable-featuresseems to originate from https://github.com/chromiumembedded/cef/blob/58fa5d380aeaf56691ed5652ccec9386a7cc7d19/libcef/common/chrome/chrome_main_delegate_cef.cc#L357Unfortunately, I lack the skills to further investigate or debug it myself beyond this point.