chromiumembedded / cef

Chromium Embedded Framework (CEF). A simple framework for embedding Chromium-based browsers in other applications.
https://bitbucket.org/chromiumembedded/cef/
Other
3.09k stars 450 forks source link

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

Closed amaitland closed 5 months ago

amaitland commented 5 months ago

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):

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(https://github.com/cefsharp/CefSharp/issues/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 commented 5 months ago

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

amaitland commented 5 months ago

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 commented 5 months ago

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