Page 1 of 1

Blank pages in some machines

Posted: Tue Oct 03, 2017 4:08 pm
by thefunkyjoint
Hi,

I'm trying to find out what is causing this issue : in some machines (usually Windows 7 machines), when i open any website, it never shows anything in TChromium, only a blank page. Any site, google.com, facebook.com and so on. In my environment this problem never happened. What could i do to find out what is causing this and how to solve ?

Thanks !

Re: Blank pages in some machines

Posted: Tue Oct 03, 2017 5:28 pm
by salvadordf
Hi,

Are you using the latest CEF4Delphi?

I updated CEF4Delphi today with an alternative method to initialize the browser.

Please read this message :
https://www.briskbard.com/forum/viewtop ... p=597#p597

Re: Blank pages in some machines

Posted: Wed Oct 04, 2017 12:09 pm
by thefunkyjoint
Hi,

Thanks for your reply ; actually i'm still in the process from migrating from DCEF3 to CEF4, this problem is happening in DCEF3 ; i thought it could be related to CEF itself, that's why i ask here...

I still have some issues from the migration, i think i'll get it working properly in the next weeks.

Re: Blank pages in some machines

Posted: Mon Nov 27, 2017 5:24 pm
by thefunkyjoint
I could identify the cause of this problem , so i'll share here just in case anyone needs.

The problem was i create the components in runtime and i discovered i need to wait some seconds to the components be ready for use , to then load a webpage. This is why the problem won't happen in all machines : in faster machines, no problem , the components are created fast and ready to use right away. In slower machines the bug happened.

So now i create the components and wait 2 seconds to load a page :)

Re: Blank pages in some machines

Posted: Mon Nov 27, 2017 5:35 pm
by salvadordf
Hi,

I added some changes in the component initialization in the last weeks/months.

Now TChromium.CreateBrowser checks if GlobalCEFApp.GlobalContextInitialized is True.

The new demos include a timer to call TChromium.CreateBrowser again if GlobalCEFApp.GlobalContextInitialized was False the first time.

Re: Blank pages in some machines

Posted: Tue Jan 30, 2018 10:08 am
by salvadordf
GlobalCEFApp needs to be created in the DPR file even if the user doesn't use the browser.

If you create GlobalCEFApp after the Application.Initialize call then CEF3 may not be correctly initialized.

Re: Blank pages in some machines

Posted: Tue Jan 30, 2018 1:18 pm
by salvadordf
AlexandreP wrote: Tue Jan 30, 2018 12:11 pm Even if all flag are okay ?
It's the recommended way to initialize CEF.

The CEF3 project also recommends to do it in the main application entry-point function :
https://bitbucket.org/chromiumembedded/ ... t-function

If you try to change the initialization and destruction order you may have problems like access violations, initialization failures, etc.