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.

Error c0000005 after multiple loadurl in the same browser

Post Reply
User avatar
salvadordf
Posts: 4016
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Error c0000005 after multiple loadurl in the same browser

Post by salvadordf »

Hi,

There's a known issue at shutdown :
https://github.com/salvadordf/CEF4Delphi/issues/230

That issue is present in CEF since the version 77 but it will also cause problems with CEF 75 and 76 if you don't disable the "Network Service".

If you use the latest CEF4Delphi version which includes CEF 77 then this issue seems to cause less problems if you use a TCEFSentinel component.

It's recommended to use the latest stable release version of CEF4Delphi which includes CEF 75 :
https://github.com/salvadordf/CEF4Delph ... 0.3770.100

Add this code line to the SimpleBrowser demo before the GlobalCEFApp.StartMainProcess call in the DPR file :

Code: Select all

GlobalCEFApp.DisableFeatures := 'NetworkService';
User avatar
salvadordf
Posts: 4016
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Error c0000005 after multiple loadurl in the same browser

Post by salvadordf »

I'm a little confused. If I understand you correctly, your application follows this sequence of events :
  • The app is executed.
  • It calls LoadURL and waits 20 seconds.
  • Then the app takes a snapshot.
  • And the application shuts down.
The application repeats this sequence 16 times but the 17th it crashes when it shuts down.

If this is what's happening and you use a directory in your hard drive for the cache then check that you the application is fully closed before executing it again.

CEF can't share the same cache directory with several applications at the same time and perhaps you are running another application instance before the previous one is fully closed.
User avatar
salvadordf
Posts: 4016
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Error c0000005 after multiple loadurl in the same browser

Post by salvadordf »

Use a browser in OSR mode to take snapshots. Use the SimpleOSRBrowser demo as a template for your app.
Post Reply