Closed alervd closed 3 months ago
Maybe it's some setting inside of my app which causes CEF to behave so weirdly.
How does your app differ from the CEF sample apps?
Maybe it's some setting inside of my app which causes CEF to behave so weirdly.
How does your app differ from the CEF sample apps?
I don't know really. I've tried to find this difference which could be causing this issue and failed.
The only I can say is that my app's GPU process is launched using this command line:
D:\Work\Source\myapp\x64\Debug\myapp.exe" --type=gpu-process --no-sandbox --log-severity=disable --user-agent="Mozilla/5.0 (Windows NT 10.0; CEF/3.2272.2035) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 SoftwareInformer/1.6.1400" --lang=en-US --user-data-dir="C:\Users\user\AppData\Roaming\My App\WbaCache\CEF" --gpu-preferences=WAAAAAAAAADgAAAMAAAAAAAAAAAAAAAAAABgAAEAAAA4AAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAYAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAA== --field-trial-handle=2644,i,7482553779535433432,1946915803014080895,262144 --disable-features=BackForwardCache,CalculateNativeWinOcclusion,DocumentPictureInPictureAPI --variations-seed-version --mojo-platform-channel-handle=2628 /prefetch:2
while the cefclient's one is launched using this one:
"D:\Work\Source\1\build\tests\cefclient\Debug\cefclient.exe" --type=gpu-process --start-stack-profiler --enable-chrome-runtime --user-data-dir="C:\Users\user\AppData\Local\CEF\User Data" --gpu-preferences=WAAAAAAAAADgAAAMAAAAAAAAAAAAAAAAAABgAAEAAAA4AAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAYAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAA== --field-trial-handle=1924,i,7649616447415122149,783464029087748152,262144 --variations-seed-version --enable-logging=handle --log-file=1756 --mojo-platform-channel-handle=1920 /prefetch:2
Maybe this is caused by --disable-features
thing? I don't know where it comes from and how to remove it.
It looks like you're running with --no-sandbox
and Alloy bootstrap (lack of --enable-chrome-runtime
flag). The Alloy bootstrap is deprecated, see #3685.
Can you reproduce the issue in CEF sample apps using --no-sandbox --disable-chrome-runtime
?
Closing this issue as WontFix for the following reasons:
--use-angle
command line switch).Can you reproduce the issue in CEF sample apps using
--no-sandbox --disable-chrome-runtime
?
No, I can't.
Hello, the CEF CAPI example project appears to be affected by this bug. This is not using the alloy bootstrap (I don't think the alloy bootstrap is an option in 129?). The crash happens in the same place mentioned by @alervd. The debugger shows that CreateWindowEx
returns NULL
but GetLastError()
returns ERROR_SUCCESS
. --use-angle
prevents the crash.
I am able to reproduce on a Windows 10 computer with an NVidia graphics card, compiling the example project under Visual Studio 2022. cefsimple does not have the same bug, nor does the CAPI example project when compiling under MinGW. Another bizarre difference between the two compilers is that only the MinGW build respects the system dark mode preference, but I don't know if that's related, since --use-angle
doesn't affect it.
You can test this using my fork of the CAPI example project by commenting out the line in cef_app.h
that adds use-angle
to the list of switches.
GPU detection
on windows requires an app.manifest
with a Windows 10
compatibility entry.
Thanks a bunch! Adding a manifest seems to have fixed the issue. I'm not sure how I would have figured that out on my own, though. Is this requirement documented somewhere?
@amaitland Thank you! This solves issue.
Is this requirement documented somewhere?
The compatibility.manifest is included as part of the CEF binary distribution and mentioned in the Tutorial.
In my project, I've updated CEF from 3.1979 (2015 year) to the latest 127.1.5.3024 (35f74ccdefd23b2d3b00129dc781fc429675ec79).
And now GPU process is crashing with the following stack trace:
So, it's crashing itself on a purpose here: https://chromium.googlesource.com/chromium/src/+/refs/heads/main/ui/gl/child_window_win.cc#108. Because
CreateWindowEx
returns NULL due to an unknown reason.I've tried to use
--use-angle
command line switch and it works fine now.Unfortunately, this issue can't be reproduced using cefclient/cefsimple projects. Maybe it's some setting inside of my app which causes CEF to behave so weirdly. Unfortunately, I was not able to find it out. Anyway, I still do believe that it's some sort of CEF/Chromium bug. Any ideas why CreateWindowEx fails to create a window? It's very weird. Is it possible that cefclient/cefsimple projects uses some setting which avoids the use of this CreateWindowEx?
Versions (please complete the following information):
I'm using CEF Automated Builds (Standard Distribution). (https://cef-builds.spotifycdn.com/index.html).