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
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
-
- Posts: 48
- Joined: Fri Jul 10, 2020 1:33 pm
while using "LoadRequest" - Getting Access Violation error
You do not have the required permissions to view the files attached to this post.
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: while using "LoadRequest" - Getting Access Violation error
The TChromium.LoadRequest procedure has these code comments :
https://github.com/salvadordf/CEF4Delph ... .pas#L2431
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".
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).
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".
-
- Posts: 48
- Joined: Fri Jul 10, 2020 1:33 pm
Re: while using "LoadRequest" - Getting Access Violation error
Sure, Thanks so much for your detailed information!
John
John