Page 1 of 1

Screen goes white on weak cpu

Posted: Wed Mar 06, 2024 7:41 pm
by 3vr
I'm using cef version 122, for automated scraping.
Everything runs smoothly when running on stable machines.
But when I run it on computers with less processing power, a weaker CPU, after a while of operation, the browser screen goes white.
But when I interact with the application (by clicking on the form), it starts working again for a while, and then freezes again.

I ask if there is any setting to improve this.
I've tried using HighEfficiencyModeState as true, and I've also tried it as false. But I didn't get any better.

Re: Screen goes white on weak cpu

Posted: Thu Mar 07, 2024 8:28 am
by salvadordf
Hi,

If a computer has limited resources all you can do is to reduce the number of browsers running at the same time and lower the frequency the application navigates to webpages.

Re: Screen goes white on weak cpu

Posted: Thu Mar 07, 2024 11:01 am
by 3vr
Hi, thanks for getting back to us.
I use a single browser, which performs the query every 5 minutes.
What's strange is the fact that it stays with a white screen in the browser, and only starts working again when the application receives focus again.
I thought there was some additional configuration for this.

Re: Screen goes white on weak cpu

Posted: Thu Mar 07, 2024 11:32 am
by salvadordf
It's hard to guess what could be happening without some code to reproduce the issue in my computer.

I would suggest building the application in 64 bits because 32 bits browsers require the IMAGE_FILE_LARGE_ADDRESS_AWARE flag in the DPR file in order to use up to 3GB of RAM. Large images may cause white screen issues in 32 bits browsers.

If the application uses a JavaScript extension it might have white screen issues if there's an exception in the render process.

Enable the CEF log and perhaps the log shows a clue of what's happening in that application.

Re: Screen goes white on weak cpu

Posted: Thu Mar 07, 2024 9:58 pm
by 3vr
For some situations (weak PC), with the options below I had no more problems.

Code: Select all

GlobalCEFApp.EnableGPU:=False;

Code: Select all

GlobalCEFApp.NoSandbox:=True;
Additionally, I added it to try to improve (I didn't test it individually):

Code: Select all

GlobalCEFApp.AddCustomCommandLine('num-raster-threads', '4');

Code: Select all

GlobalCEFApp.AddCustomCommandLine('enable-tcp-fastopen', '1');
I still had problems in just 1 environment.
I will continue the tests by activating the logs and then return.
Thanks.

Re: Screen goes white on weak cpu

Posted: Sat Mar 09, 2024 10:26 pm
by 3vr
Hello, I have reached my attempt limit. I believe I have tried everything.

One of the things that improved (but didn't solve) was removing the sandbox:

Code: Select all

GlobalCEFApp.NoSandbox:=True
After repeated queries (from 500 onwards), the pages start to take an excessively long time to load, resulting in a white screen.
Reinforcing that this does not occur on machines with good processing.

Below I have attached some logs. Any light so I can try here is greatly appreciated.
log.zip

Re: Screen goes white on weak cpu

Posted: Sun Mar 10, 2024 8:24 am
by salvadordf
Try using the official CEF sample application to navigate to the same web site :
https://cef-builds.spotifycdn.com/cef_binary_122.1.12%2Bg6e69d20%2Bchromium-122.0.6261.112_windows32_client.tar.bz2

I see certificate and frame errors but no errors marked as "FATAL" by Chromium. Perhaps the graphics card is not completely compatible.

Re: Screen goes white on weak cpu

Posted: Mon Mar 11, 2024 9:08 am
by 3vr
Attached are logs.

Re: Screen goes white on weak cpu

Posted: Mon Mar 11, 2024 9:46 am
by salvadordf
The logs don't show any serious issue with Chromium.

Please, modify one of the CEF4Delphi demos and post it here in order to replicate this issue in my computer.