Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.

Screen goes white on weak cpu

Post Reply
3vr
Posts: 9
Joined: Mon Feb 26, 2024 7:56 pm

Screen goes white on weak cpu

Post 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.
User avatar
salvadordf
Posts: 4056
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Screen goes white on weak cpu

Post 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.
3vr
Posts: 9
Joined: Mon Feb 26, 2024 7:56 pm

Re: Screen goes white on weak cpu

Post 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.
User avatar
salvadordf
Posts: 4056
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Screen goes white on weak cpu

Post 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.
3vr
Posts: 9
Joined: Mon Feb 26, 2024 7:56 pm

Re: Screen goes white on weak cpu

Post 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.
3vr
Posts: 9
Joined: Mon Feb 26, 2024 7:56 pm

Re: Screen goes white on weak cpu

Post 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
You do not have the required permissions to view the files attached to this post.
User avatar
salvadordf
Posts: 4056
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Screen goes white on weak cpu

Post 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.
3vr
Posts: 9
Joined: Mon Feb 26, 2024 7:56 pm

Re: Screen goes white on weak cpu

Post by 3vr »

Attached are logs.
You do not have the required permissions to view the files attached to this post.
User avatar
salvadordf
Posts: 4056
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Screen goes white on weak cpu

Post 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.
Post Reply