Skip to content

Plain WPF sample doesn't work - Cef::Initialize() failed #3416

@WrongBit

Description

@WrongBit

Hi! I have Win7x64, FW4.8, VS2019
I tried to create simple example(AnyCPU + not "prefer 32 bits"), but w/o any clownish nugets - we have strict policy to not deal with untested updates.
I unpacked all nuget packages and got x64 DLLs. Then I referenced DLLs in my WPF project + added necessary native libs (which come with cef.redist.x64.88.2.4.nupkg ). XAML code is quite simple:

<Window x:Class="ChromeEmbFrw.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:cef="clr-namespace:CefSharp.Wpf;assembly=CefSharp.Wpf"
        Title="MainWindow" Height="450" Width="800">
    <cef:ChromiumWebBrowser Name="brwMain" />
</Window>

And when I start application, got this error:

Cef::Initialize() failed
at CefSharp.Wpf.ChromiumWebBrowser.NoInliningConstructor() in 
C:\\projects\\cefsharp\\CefSharp.Wpf\\ChromiumWebBrowser.cs:line 530
at CefSharp.Wpf.ChromiumWebBrowser..ctor() in C:\\projects\\cefsharp\\CefSharp.Wpf\\ChromiumWebBrowser.cs:line 451

For me it's quite strange to see so unprofessional, obscure reports like "failed" - I have no idea what exactly going wrong.
Of course I tried to inspect ChromiumWebBrowser.cs:line 530, but found nothing, but empty line:

IsVisibleChanged += OnIsVisibleChanged;
// line 530
ToolTip = toolTip = new ToolTip();

Hardly assigning handler was reason, but anyway I cannot debug it.
This is list of binaries I got after build (and added from redist):

CefSharp.BrowserSubprocess.Core.dll
CefSharp.BrowserSubprocess.Core.pdb
CefSharp.BrowserSubprocess.exe
CefSharp.BrowserSubprocess.pdb
CefSharp.Core.dll
CefSharp.Core.pdb
CefSharp.Core.Runtime.dll
CefSharp.Core.Runtime.pdb
CefSharp.Core.Runtime.xml
CefSharp.Core.xml
CefSharp.dll
CefSharp.pdb
CefSharp.Wpf.dll
CefSharp.Wpf.pdb
CefSharp.Wpf.xml
CefSharp.xml
ChromeEmbFrw.exe   - my app
ChromeEmbFrw.exe.config
ChromeEmbFrw.pdb
chrome_elf.dll
icudtl.dat
libcef.dll
snapshot_blob.bin
v8_context_snapshot.bin

I debugged everything I could (I had no necessary files), but now it's complete set of binaries and I have no idea WHAT ELSE can be wrong. So I need help please what to do. Ideally if people takes "spaghetti", which produces error and UNHIDE internal problems - no any reason to hide it even from final user! We always must know what's wrong.
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions