Page 1 of 1

List index out of bounds while using CEF4 Delphi browser components

Posted: Wed Sep 16, 2020 2:51 pm
by john.augustine
Hi,

We have two screens like screen 1 and screen 2.

Screen 1 > Used TChromium and CEFWindowParent
Screen 1 > Loaded HTML data with Hyperlink text
Screen 1 > Click on Hyperlink text which will launch Screen 2

Screen 2 > Screen 2 launched successfully (here also we are using TChromium and CEFWindowParent)
Screen 2 > Trying to close Screen 2 > Now, we are getting "list index out of bounds" error with number as 175

Is this due to using CEF4 components in both of the screens?

What could be the root cause for this? Could you please please help me to solve this issue?

Thanks & Regards,
John Augustine

Re: List index out of bounds while using CEF4 Delphi browser components

Posted: Wed Sep 16, 2020 4:24 pm
by salvadordf
Please, use the Delphi IDE to show the code line where the error has occured.
If it's inside a CEF4Delphi unit then provide all the detials you can in order to fix this issue.

Re: List index out of bounds while using CEF4 Delphi browser components

Posted: Thu Sep 17, 2020 11:44 am
by john.augustine
Hi,

Here i am attaching code of Screen 1 (OnBeforeBrowse) and Screen 2.

Now, Screen 2 is launching properly but without any data. Here, we have used "BrowserCreatedMsg" logic. But browser is not at all created hence rendering is failing.

Screen 1 & Screen 2 > Used "BrowserCreatedMsg" logic.

Thanks & Regards,
John

Re: List index out of bounds while using CEF4 Delphi browser components

Posted: Thu Sep 17, 2020 3:27 pm
by salvadordf
The TChromium.OnBeforeBrowse event is executed in a CEF thread that is different than the main application thread.

The VCL is not thread safe and your application should only create, destroy or modify VCL controls inside the main application thread.