Page 1 of 1

CEF runs out of memory early after startup

PostPosted: Tue Dec 15, 2020 11:38 am
by digory
One of our clients has a problem with our product, which uses CEF 87.1.12+g03f9336 (Windows).
The product runs fine in our company, but it crashes on some PCs of our client.
Early when starting up, some thread of CEF seems to allocate more and more memory until Windows terminates the process.
CEF doesn't log anything suspicous to cef_log.
The problem also occurs with CEF 80.0.8+gf96cd1d.
The problem does not occur with CEF 75.0.14+g3b211d4.
I could successfully reproduce the problem with the unmodified cefclient demo from 87.1.12+g03f9336.
I suspect there might be some third-party software that might interact with CEF, such as an antivirus or firewall tool.
However, it's very hard for me to track it down since I'm not allowed to uninstall any software from these productive PCs.
The problem happens after ::CefExecuteProcess, but before any call to CefBrowserHost::CreateBrowser.
Any ideas what might have changed between CEF 75 and CEF 80 that might lead to the problem?

Re: CEF runs out of memory early after startup

PostPosted: Tue Dec 15, 2020 2:24 pm
by amaitland
Can you confirm if this sounds like https://bitbucket.org/chromiumembedded/ ... of-cpu-and

Re: CEF runs out of memory early after startup

PostPosted: Wed Dec 16, 2020 3:13 am
by digory
Indeed. I've put my vote.

Re: CEF runs out of memory early after startup

PostPosted: Wed Dec 16, 2020 5:00 am
by digory
CEF 78.3.9+gc7345f2 has the problem, too.
Command line arguments --enable-gpu=false and --disable-gpu do not prevent the issue from happening.

Re: CEF runs out of memory early after startup

PostPosted: Wed Dec 16, 2020 5:37 am
by digory
CEF 77.1.18+g8e8d602 runs fine. So the first version with the problem was 78.3.9+gc7345f2.

Re: CEF runs out of memory early after startup

PostPosted: Wed Dec 16, 2020 6:06 am
by digory
I noticed these warnings in cef_log:
Code: Select all
[1216/120154.356:ERROR:dxva_video_decode_accelerator_win.cc(1368)] DXVAVDA fatal error: could not LoadLibrary: mf.dll: The specified module could not be found. (0x7E)
[1216/120154.356:ERROR:dxva_video_decode_accelerator_win.cc(1368)] DXVAVDA fatal error: could not LoadLibrary: mfplat.dll: The specified module could not be found. (0x7E)
[1216/120154.371:ERROR:dxva_video_decode_accelerator_win.cc(1368)] DXVAVDA fatal error: could not LoadLibrary: msmpeg2vdec.dll: The specified module could not be found. (0x7E)
[1216/120154.371:ERROR:dxva_video_decode_accelerator_win.cc(1376)] DXVAVDA fatal error: could not LoadLibrary: msvproc.dll: The specified module could not be found. (0x7E)

I'm not sure if this has anything to do with the issue, though. It may simply be a result of me trying to track down the bug remotely on a PC of our customer, through Citrix.

Re: CEF runs out of memory early after startup

PostPosted: Tue Jan 26, 2021 9:40 am
by digory

Re: CEF runs out of memory early after startup

PostPosted: Mon Mar 29, 2021 3:53 am
by digory
Apparently, the issue was solved. https://bitbucket.org/chromiumembedded/cef/issues/3066/starting-cef-takes-lots-of-cpu-and.
Has this been merged in the current binary CEF distribution? Where can I see this in bitbucket?

Re: CEF runs out of memory early after startup

PostPosted: Mon Mar 29, 2021 8:56 am
by ndesktop
The changes are at the end of the issue 3066:
master commit
[url=https://bitbucket.org/chromiumembedded/cef/commits/317059b72a94]4389[/url/ commit.
The previous issue comment says:
We’ll include the patch from http://crbug.com/1167149#c7 in M89 and newer.,
so I suppose one can merge the #c7 patch into the desired branch, if applicable, and make a build.
Most likely it will not be officially backported into older, unsupported branches.