Initialization is always failed. No exception is showing

1,602 views
Skip to first unread message

Mat

unread,
Mar 5, 2013, 12:25:31 AM3/5/13
to cef...@googlegroups.com
I want to use CefBrowser with my WPF application . I tried the following steps

Starts a new WPF project (3.5 framework  and Activex86 platform)
Add a  reference to    Xilium.CefGlue dlll
Copy the Libcef.dll , locals folder, cef.pak file to the debug folder.

On the App.cs page i added the below code

                CefRuntime.Load();
                var mainArgs = new CefMainArgs(new string[] { });
                var app = new DemoApp();
                var exitCode = CefRuntime.ExecuteProcess(mainArgs, app);
                if (exitCode != -1)
                    return; // FMT: throw exception??
                CefSettings cefSettings = new CefSettings
                {                   
                    SingleProcess = false,
                    MultiThreadedMessageLoop = true                   
                };
             CefRuntime.Initialize(mainArgs, cefSettings, app);

where DemoApp class looks like

 internal sealed class DemoApp : CefApp
    {
        protected override void OnBeforeCommandLineProcessing(string processType, CefCommandLine commandLine)
        {
            ;
        }
    }

I have been able to build the project without any error. and while running the project its not initializing , so i put a break point and what i can see is  on this line
 CefRuntime.Initialize(mainArgs, cefSettings, app);  the control stops execution . NO exceptions or no other messages it shows.

Any idea how to solve this? I try to run exe from bin\debug folder and it shows  app has encounterd a user defined break point

How to solve this error? What exactly is the problem . Itry to run the sample project downloaded form the site and copy the libcef.dll to bin folder , but same thing happends (on Initialize() the execution stops)




Wladimir Coka

unread,
Mar 5, 2013, 1:25:47 AM3/5/13
to cef...@googlegroups.com
Did you tried with SingleProcess = True or disabling Visual Studio hosting process from Debug tab?

Mat

unread,
Mar 5, 2013, 1:29:08 AM3/5/13
to cef...@googlegroups.com
Tried with SingleProcess=true but same problem still exists
I can see this line from the debug.log file

[0305/115744:FATAL:content_main_runner.cc(697)] Check failed: icu_util::Initialize().

Wladimir Coka

unread,
Mar 5, 2013, 1:41:11 AM3/5/13
to cef...@googlegroups.com
Was googling and read that "could be a problem loading the ICU DLL due to a bad install or antivirus interference"

Do you have an antivirus active? Disable it for a while and try again

Mat

unread,
Mar 5, 2013, 1:49:36 AM3/5/13
to cef...@googlegroups.com
I disabled the antivirus , but still same problem exists .Now code is like


  
                CefRuntime.Load();
                var mainArgs = new CefMainArgs(new string[] { });
                var app = new DemoApp();
                var exitCode = CefRuntime.ExecuteProcess(mainArgs, app);
                if (exitCode != -1)
                    return; // FMT: throw exception??
                CefSettings cefSettings = new CefSettings
                {                   
                    SingleProcess = true,

                    MultiThreadedMessageLoop = true                   
                };
                CefRuntime.Initialize(mainArgs, cefSettings, app);

 Is any good resources that explains how to use CEFGlue webbrowser with WPF/Desktop applications?

Wladimir Coka

unread,
Mar 5, 2013, 1:58:01 AM3/5/13
to cef...@googlegroups.com
I'm also new to CEF/CefGlue but learning from the examples and reading at this forum from previous threads.

I'm using CefGlue just for winforms now, haven't use with WPF yet.

There is a compiled client, are you able to open/use it? (cefclient.exe)

Message has been deleted

Wladimir Coka

unread,
Mar 5, 2013, 2:16:43 AM3/5/13
to cef...@googlegroups.com
I can compiled and run correctly winform example from code, I did this also:

- change build platform to x86
- disable Visual Studio hosting Process
- copy CEF binaries to debug directory

Recheck the antivirus and disable all protections you have, also try to run from other computer the example, since from mine I'm compiling/running correctly

Message has been deleted

Wladimir Coka

unread,
Mar 5, 2013, 2:35:32 AM3/5/13
to cef...@googlegroups.com
Download CEF Binaries from here http://xilium.bitbucket.org/cefglue/

Unzip and copy all the content from Release folder to your project's debug folder

PD: I think your are missing icudt.dll


El martes, 5 de marzo de 2013 02:20:08 UTC-5, Mat escribió:
In my debug folder these are the files {locales, cef.pak, libcef.dll } and under references I had Xilium.CefGlue. Can you update me any other CEF binaries  is required to initialize the browser



--
You received this message because you are subscribed to the Google Groups "CefGlue" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cefglue+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.





--
Thanks & Regards

Jibin Mathew
9910103540

Mat

unread,
Mar 6, 2013, 4:28:43 AM3/6/13
to cef...@googlegroups.com
That helps a lot , now i can run my WPF application and for the first time i show one browser with a webpage on that . I am facing few more problems related to placing browser in WPF window i will  start a new discussion on those . Thanks for the help and your suggestion helps me to solve the problem
Reply all
Reply to author
Forward
0 new messages