CEF dll crashes at CefInitialize

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

CEF dll crashes at CefInitialize

Postby Nidhi » Mon Sep 12, 2016 10:07 am

Hi ,
I have created a dll in which I am initializing the CEF and including that dll into a win 32 console application, but the application crashes at CefInitialize(main_args, settings, app.get(), sandbox_info) function i.e at
int _retval = cef_initialize(
&args,
&settings,
CefAppCppToC::Wrap(application),
windows_sandbox_info);

of libcef_dll_wrapper.cc with stack trace [0912/070426:FATAL:icu_util.cc(225)] Check failed: result.

Complete code of the function CEF_GLOBAL bool CefInitialize(const CefMainArgs& args,
const CefSettings& settings, CefRefPtr<CefApp> application,
void* windows_sandbox_info) {
const char* api_hash = cef_api_hash(0);
if (strcmp(api_hash, CEF_API_HASH_PLATFORM)) {
// The libcef API hash does not match the current header API hash.
NOTREACHED();
return false;
}


int _retval = cef_initialize(
&args,
&settings,
CefAppCppToC::Wrap(application),
windows_sandbox_info);

// Return type: bool
return _retval?true:false;
}
Nidhi
Techie
 
Posts: 48
Joined: Fri Sep 02, 2016 6:23 am

Re: CEF dll crashes at CefInitialize

Postby magreenblatt » Mon Sep 12, 2016 10:37 am

The icudtl.dat file and others must be placed next to libcef.dll. See the README.txt file included with the binary distribution.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: CEF dll crashes at CefInitialize

Postby Nidhi » Mon Sep 12, 2016 10:49 am

Thanks,

Now when the URL is opened in new browser and when I am closing that particular browser, the application is crashing at
CEF_GLOBAL void CefShutdown() {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

// Execute
cef_shutdown();


following are stacktrace:
[0912/074558:ERROR:proxy_service_factory.cc(133)] Cannot use V8 Proxy resolver in single process mode.
[0912/074558:WARNING:histograms.cc(38)] Started multiple compositor clients (Browser, Renderer) in one process. Some metrics will be disabled.
[0912/074602:WARNING:raw_channel_win.cc(532)] WriteFile: The pipe is being closed. (0xE8)
[0912/074602:FATAL:browser_main.cc(187)] Check failed: 0 == CefBrowserContext::DebugObjCt (0 vs. 1)
Backtrace:
cef_time_to_timet [0x107D0871+3908001]
cef_time_to_timet [0x106EBD1B+2971211]
cef_time_to_timet [0x1055EC8C+1344956]
TerminateProcessWithoutDump [0x14DF7F7E+2459726]
TerminateProcessWithoutDump [0x14D0CFD7+1497255]
cef_time_to_timet [0x10468BC4+337140]
cef_string_list_value [0x10375225+154789]
cef_string_list_value [0x10376447+159431]
cef_string_list_value [0x10374F44+154052]
cef_shutdown [0x1027B913+67]
CefShutdown [0x59031FE8+72] (c:\cef\libcef_dll\wrapper\libcef_dll_wrapper.cc:180)
cefsimple_win::Functions::myFunction [0x59022644+468] (c:\cef\cefsimple\cefsimple_win.cc:350)
main [0x00D62396+38] (c:\cef\consoleapplication1\consoleapplication1.cpp:12)
invoke_main [0x00D62AFE+30] (f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:64)
__scrt_common_main_seh [0x00D62960+336] (f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:253)
__scrt_common_main [0x00D627FD+13] (f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:296)
mainCRTStartup [0x00D62B18+8] (f:\dd\vctools\crt\vcstartup\src\startup\exe_main.cpp:17)
BaseThreadInitThunk [0x759962C4+36]
RtlSubscribeWnfStateChangeNotification [0x76FB0609+1081]
RtlSubscribeWnfStateChangeNotification [0x76FB05D4+1028]
Nidhi
Techie
 
Posts: 48
Joined: Fri Sep 02, 2016 6:23 am

Re: CEF dll crashes at CefInitialize

Postby magreenblatt » Mon Sep 12, 2016 11:01 am

Nidhi wrote:[0912/074558:ERROR:proxy_service_factory.cc(133)] Cannot use V8 Proxy resolver in single process mode.

It looks like you're using single-process mode. Note that this mode is not supported.

Nidhi wrote:[0912/074602:FATAL:browser_main.cc(187)] Check failed: 0 == CefBrowserContext::DebugObjCt (0 vs. 1)

This debug assertion can be ignored.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: CEF dll crashes at CefInitialize

Postby Nidhi » Mon Sep 12, 2016 11:33 am

Thank you,

So apart from .dll file what other files are required to call that dll in an exe?
Nidhi
Techie
 
Posts: 48
Joined: Fri Sep 02, 2016 6:23 am

Re: CEF dll crashes at CefInitialize

Postby magreenblatt » Mon Sep 12, 2016 2:51 pm

Nidhi wrote:Thank you,

So apart from .dll file what other files are required to call that dll in an exe?

See the README.txt file included with the binary distribution.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: ElAndLivia and 101 guests