Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shutdown crashes since CEF 77 #230

Closed
salvadordf opened this issue Oct 15, 2019 · 3 comments
Closed

Shutdown crashes since CEF 77 #230

salvadordf opened this issue Oct 15, 2019 · 3 comments
Labels
bug upstream Issue in the CEF libraries

Comments

@salvadordf
Copy link
Owner

salvadordf commented Oct 15, 2019

Some demos crash due to an access violation when they shutdown.

It looks like the CEF binaries are trying to reinitialize the network context after the PrefService has been cleared :
https://bitbucket.org/chromiumembedded/cef/issues/2703/crash-when-closing-if

This issue is much easier to detect if you use :

  • Demos that load an HTML file using a URL with a FILE scheme, especially if the file doesn't exist.
  • Demos that create URLRequests.
  • Demos that use the TChromiumWindow component.

Using the TCEFSentinel component seems to be a valid workaround for the rest of the demos. It adds an extra step to the destruction sequence and checks the number of child processes before triggering the TCEFSentinel.OnClose event. Read the code comments in the demos for more details.

Other CEF shutdown issues :
https://bitbucket.org/chromiumembedded/cef/issues/2316/crash-during-shutdown-due-to
https://bitbucket.org/chromiumembedded/cef/issues/2798/dcheck-exception-on-cefclient-shutdown

@salvadordf salvadordf added the bug label Oct 15, 2019
@salvadordf
Copy link
Owner Author

Use the latest CEF4Delphi stable release to avoid this issue :
https://github.com/salvadordf/CEF4Delphi/releases/tag/75.0.3770.100

@salvadordf salvadordf added the upstream Issue in the CEF libraries label Nov 12, 2019
@salvadordf
Copy link
Owner Author

Some demos in the last stable release don't disable the "Network Service". If you see shutdown issues with that release, add this before the GlobalCEFApp.StartMainProcess (or GlobalCEFApp.StartSubProcess) call in the DPR file :
GlobalCEFApp.DisableFeatures := 'NetworkService';

The MiniBrowser demo in that release already has that code line here :

GlobalCEFApp.DisableFeatures := 'NetworkService';

salvadordf added a commit that referenced this issue Nov 27, 2019
- Issue #230 fixed : Shutdown crashes since CEF 77
- Issue #214 fixed : OSR demos crash when resized since CEF 76
@salvadordf
Copy link
Owner Author

The update to CEF 78.3.9 fixed this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug upstream Issue in the CEF libraries
Projects
None yet
Development

No branches or pull requests

1 participant