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.

cef_shutdown() and TDBGrid bug

Post Reply
DaveLister
Posts: 3
Joined: Fri Nov 18, 2022 1:25 pm

cef_shutdown() and TDBGrid bug

Post by DaveLister »

Hi -

I am using delphi 10.4 with CEF4Delphi CEF 107.1.11 and I have an issue with a delay (about 10 seconds) when closing my application. I also noticed that I had no such delay when running the SimpleBrowser example project that comes with CEF4Delphi. After some destructive testing I found the cause. It appears that if your application makes use of TDBGrid, you will experience this delay in closing the program. This is also true of components derived from TDBGrid AFAIK (as I used the TvjDBGrid as a test.)

I have uploaded a version of the simpleBrowser2 application with a DBGrid added to demonstrate this bug. ANy feedback / workaround(s) would be much appreciated as it means I cannot use this component atm. Here is a link to the demo with bug :
https://www.synapsesoftware.co.uk/test/SimpleBrowserDBGridBug.zip

Many thanks..

Dave
User avatar
salvadordf
Posts: 4056
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: cef_shutdown() and TDBGrid bug

Post by salvadordf »

Hi,

Chromium uses several processes to render web pages and by default, Chromium uses the same EXE to execute those subprocesses.

Applications that open databases must be careful because the main process and all the subprocesses might open the same database.

The solution to this issue is to use a different EXE for the subprocesses. Try using the SubProcess demo as a template for your application.
DaveLister
Posts: 3
Joined: Fri Nov 18, 2022 1:25 pm

Re: cef_shutdown() and TDBGrid bug

Post by DaveLister »

ok thanks Salvador - will try that.

Cheers
DaveLister
Posts: 3
Joined: Fri Nov 18, 2022 1:25 pm

Re: cef_shutdown() and TDBGrid bug

Post by DaveLister »

That works! Thanks again Salvador - and thanks for a great (badly needed) VCL web solution :)

Cheers..
Post Reply