Skip to content

CefInitialize access violation for process singleton with multi-threaded-message-loop #3635

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

Closed
amaitland opened this issue Jan 26, 2024 · 3 comments
Labels
bug Bug report

Comments

@amaitland
Copy link
Contributor

Describe the bug

When using multi-threaded-message-loop a second call to CefInitialize with the same cache path causes an access violation in the second process.

To Reproduce
Steps to reproduce the behavior:

  1. Launch cefclient.exe --multi-threaded-message-loop
  2. launch second concurrent instance of cefclient.exe --multi-threaded-message-loop
  3. Observe application error in event log.

Expected behavior
Process should exit gracefully

Versions (please complete the following information):

  • OS: Windows 10
  • CEF Version: cef_binary_121.2.14+ga44b59f+chromium-121.0.6167.75_windows64_client

Additional context
Yes, reproduces with cefclient.

Add any other context about the problem here.

It only crashes with multi-threaded-message-loop

Last known working version 120.1.8+ge6b45b0+chromium-120.0.6099.109
Error starts occurring in 120.1.10+g3ce3184+chromium-120.0.6099.129

I've had multiple user reports in the context of CefSharp(cefsharp/CefSharp#4668)

Faulting application name: cefclient.exe, version: 121.2.14.0, time stamp: 0x65a70b09
Faulting module name: libcef.dll, version: 121.2.14.0, time stamp: 0x65a70b09
Exception code: 0xc0000005
Fault offset: 0x00000000010dff78
Faulting process ID: 0x5908
Faulting application start time: 0x01da4fff082769f1
Faulting application path: C:\Software\cef_binary_121.2.14+ga44b59f+chromium-121.0.6167.75_windows64_client\Release\cefclient.exe
Faulting module path: C:\Software\cef_binary_121.2.14+ga44b59f+chromium-121.0.6167.75_windows64_client\Release\libcef.dll
Report ID: bc2036e6-d902-439b-84f4-5995eb7d9b75
Faulting package full name: 
Faulting package-relative application ID: 
@magreenblatt
Copy link
Collaborator

magreenblatt commented Jan 26, 2024

Thanks for the report. Any chance you can get some CefSharp users testing with beta CEF versions so we can catch issues sooner? 😄

@amaitland
Copy link
Contributor Author

Any chance you can get some CefSharp users testing with beta CEF versions so we can catch issues sooner?

Happy to push out semi frequent beta builds, practically speaking might need to be when there's a major change like process singleton. I started a new job a little while back so I'm not working on the project nearly as actively as I was.

@magreenblatt magreenblatt changed the title alloy: CefInitialize access violation for process singleton with multi-threaded-message-loop CefInitialize access violation for process singleton with multi-threaded-message-loop Jan 30, 2024
@magreenblatt
Copy link
Collaborator

Crashes also occur with process singleton + Chrome runtime + multi-threaded message loop.

magreenblatt added a commit that referenced this issue Jan 30, 2024
…3635)

- Fix UI thread shutdown issues on early app exit.
- views: cefclient: Fix threading requirements in RootWindowViews::Init when
  called on the UI thread via OnAlreadyRunningAppRelaunch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug report
Projects
None yet
Development

No branches or pull requests

2 participants