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

Cef.Initialize fails when another process is using the same CachePath setting #4799

Closed
1 task done
lukaszm opened this issue May 8, 2024 · 1 comment
Closed
1 task done
Labels

Comments

@lukaszm
Copy link

lukaszm commented May 8, 2024

Is there an existing issue for this?

  • I have searched both open/closed issues, no issue already exists.

CefSharp Version

124.3.20

Operating System

Windows 10

Architecture

x64

.Net Version

.Net 6.0

Implementation

WPF

Reproduction Steps

CefSharpCacheTest.zip

Build the attached project, run 2 instances of the application. In the first window set cache options, then click Initialize CEF. In the second window, set the options to the same values and click Initialize CEF.

Expected behavior

Cef should initialize in both instances.

Actual behavior

First instance intitializes correctly (RESULT: True, Cef.IsInitialized: True), but in the second instance initialization fails (RESULT: False, Cef.IsInitialized: False) and if you click the button to try initializing again, the application crashes.

As a result, it is impossible for 2 instances of the application to share the same CachePath (also applies to the memory cache used when CachePath == null).

Regression?

Works fine with CefSharp versions < 120.1.80
With versions < 121.3.70 the second instance crashes on first CEF initialization attempt.
From 121.3.70 on, the behavior is as described above (first initialization returns False, second crashes).

Known Workarounds

Use different CachePath setting when initializing CEF instances.

Does this problem also occur in the CEF Sample Application

No

Other information

log file doesn't contain any relevant info

@amaitland
Copy link
Member

CEF now supports the Chromium process singleton, this brings with it changes to how CachePath/RootCachePath are accessed from multiple processes. See #4668 for more details

What you are seeing is the expected behaviour.

@amaitland amaitland closed this as not planned Won't fix, can't repro, duplicate, stale May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants