salvadordf / CEF4Delphi

CEF4Delphi is an open source project to embed Chromium-based browsers in applications made with Delphi or Lazarus/FPC for Windows, Linux and MacOS.
https://www.briskbard.com/forum/
Other
1.19k stars 363 forks source link

Classes in uCEFTask.pas contain pointers to interfaces of objects that can be destroyed #487

Closed mterrisse closed 7 months ago

mterrisse commented 8 months ago

Erratically I have crashes in uCEFTask.pas because pointers point to released objects. I have an alternative to pointers than works on my projects, see the patch attached.

Regards,

Michel Terrisse NoPointerInTasks.patch

salvadordf commented 8 months ago

Thanks for reporting this issue!

I see some generics in the patch and CEF4Delphi must work with old Delphi versions. I'll try to adapt your suggestions to keep backwards compatibility.

salvadordf commented 7 months ago

The latest commit includes an alternative way to fix this issue. I had to add the TCEFComponentIdList class for backwards compatibility reasons. I also had to make several changes to the classes that handle CEF tasks.