List index out of bounds while using CEF4 Delphi browser components

Post Reply
john.augustine
Posts: 48
Joined: Fri Jul 10, 2020 1:33 pm

List index out of bounds while using CEF4 Delphi browser components

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

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

Post 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.
john.augustine
Posts: 48
Joined: Fri Jul 10, 2020 1:33 pm

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

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

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

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