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.

while using "LoadRequest" - Getting Access Violation error

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

while using "LoadRequest" - Getting Access Violation error

Post by john.augustine »

Hi,

I am getting access violation error when i try with "LoadRequest". Please refer the attached screenshot for code and call stack.

Please let me know your thoughts on this.

Used CEFWindowParent, TChromium and Timer.

Thanks & Regards,
John
You do not have the required permissions to view the files attached to this post.
User avatar
salvadordf
Posts: 4016
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: while using "LoadRequest" - Getting Access Violation error

Post by salvadordf »

The TChromium.LoadRequest procedure has these code comments :
https://github.com/salvadordf/CEF4Delph ... .pas#L2431

Code: Select all

// WARNING: This function will fail with "bad IPC message" reason
// INVALID_INITIATOR_ORIGIN (213) unless you first navigate to the request
// origin using some other mechanism (LoadURL, link click, etc).
If you just need to send a POST request then use the URLRequest demo.
https://github.com/salvadordf/CEF4Delph ... t.pas#L256

CEF applications need to handle interface references carefully to avoid crashes. You have to be extremely careful if you use pointers instead of interface references because it's easy to break the reference count. Personally, I wouldn't use a message to send browser pointers to avoid those problems.

Set the interface variables to NIL instead of using "FreeAndNil".
john.augustine
Posts: 48
Joined: Fri Jul 10, 2020 1:33 pm

Re: while using "LoadRequest" - Getting Access Violation error

Post by john.augustine »

Sure, Thanks so much for your detailed information!

John
Post Reply