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

Since v120.1.80: Cefsharp only supports one instance of WinForms desktop app and closes other instances of the app #4686

Closed
1 task done
Skorpjun161 opened this issue Jan 20, 2024 · 2 comments

Comments

@Skorpjun161
Copy link

Skorpjun161 commented Jan 20, 2024

Is there an existing issue for this?

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

CefSharp Version

v120.2.7

Operating System

Windows 11

Architecture

AnyCPU

.Net Version

.Net 4.8.1

Implementation

WinForms

Reproduction Steps

  • Create a new C# Windows Desktop project .Net Framework 4.8.1 with one Form1
  • Code:

using CefSharp;
using CefSharp.WinForms;
using cefsharpcpp.Properties;
using System;
using System.Windows.Forms;

namespace cefsharpcpp
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

    private void Form1_Load(object sender, EventArgs e)
    {
        Cef.Initialize(new CefSettings()); // This closes the app. No errors or anything. The code after this line is simply not executed.
        ChromiumWebBrowser web;
        Cef.Initialize(new CefSettings());
        web = new ChromiumWebBrowser();
        web.Dock = DockStyle.Fill;
        this.Controls.Add(web);
        web.LoadUrl("https://www.google.com");
    }
}

}

  • Compile as release and run the exe
  • Then run the app from Visual Studio as debug.
  • The debugged program just stops without any errors (at least none that I could find).

Expected behavior

Running multiple instances of the same app should not cause issues as far I know as it worked prior to v120.

Actual behavior

Running multiple instances of the same app causes any other instance than the first one to automatically close.

Regression?

It worked prior to v120, so up to and including v119.4.30

Known Workarounds

None that I know of

Does this problem also occur in the CEF Sample Application

No

Other information

No response

@campersau
Copy link
Contributor

See #4668 (comment) / #4668 (comment)

@Skorpjun161
Copy link
Author

I can confirm that using different cachepaths for each instance works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants