I am attempting to integrate CEF with my Juce application(https://juce.com/).
The full code is here: https://github.com/abhijitnandy2011/Juc ... ster/glcef
I am trying this in Visual Studio 2015 with the 64 bit version of the CEF framework (cef_binary_3.3202.1683.gb095524_windows64)
My aim is to use the CEF offline rendering feature to render into a texture in OpenGL mode similar to what https://github.com/gotnospirit/cef3-sdl2 does with the SDL framework. But before that I just want to get CEF running with the Juce message loop.
Currently I have just written a simple function to create a browser(https://github.com/abhijitnandy2011/Juc ... f.cpp#L187) and then start a while loop that repeatedly calls CefDoMessageLoopWork() (https://github.com/abhijitnandy2011/Juc ... in.cpp#L36)
I have implemented a custom render handler derived from CefRenderHandler and a custom BrowserClient deriving from CefClient, CefLifeSpanHandler, CefLoadHandler. This is all similar to https://github.com/gotnospirit/cef3-sdl2 which does work.
I request window less operation, so I am not expecting any window to be created by CEF or any GPU related code to run.
Yet I get a crash with this trace after about 10 seconds of running the application:
- Code: Select all
> libcef.dll!logging::LogMessage::~LogMessage() Line 791 C++
libcef.dll!logging::Win32ErrorLogMessage::~Win32ErrorLogMessage() Line 912 C++
libcef.dll!base::GetTerminationStatus(void * handle, int * exit_code) Line 59 C++
libcef.dll!content::BrowserChildProcessHostImpl::GetTerminationStatus(bool known_dead, int * exit_code) Line 325 C++
libcef.dll!content::GpuProcessHost::~GpuProcessHost() Line 528 C++
[External Code]
libcef.dll!content::GpuProcessHost::Get(content::GpuProcessHost::GpuProcessKind kind, bool force_create) Line 411 C++
libcef.dll!content::BrowserGpuChannelHostFactory::EstablishRequest::EstablishOnIO() Line 106 C++
libcef.dll!content::BrowserGpuChannelHostFactory::EstablishRequest::OnEstablishedOnIO(const IPC::ChannelHandle & channel_handle, const gpu::GPUInfo & gpu_info, content::GpuProcessHost::EstablishChannelStatus status) Line 133 C++
libcef.dll!base::internal::Invoker<base::internal::BindState<void (__cdecl content::BrowserGpuChannelHostFactory::EstablishRequest::*)(IPC::ChannelHandle const & __ptr64,gpu::GPUInfo const & __ptr64,enum content::GpuProcessHost::EstablishChannelStatus) __ptr64,scoped_refptr<content::BrowserGpuChannelHostFactory::EstablishRequest> >,void __cdecl(IPC::ChannelHandle const & __ptr64,gpu::GPUInfo const & __ptr64,enum content::GpuProcessHost::EstablishChannelStatus)>::RunImpl<void (__cdecl content::BrowserGpuChannelHostFactory::EstablishRequest::*const & __ptr64)(IPC::ChannelHandle const & __ptr64,gpu::GPUInfo const & __ptr64,enum content::GpuProcessHost::EstablishChannelStatus) __ptr64,std::tuple<scoped_refptr<content::BrowserGpuChannelHostFactory::EstablishRequest> > const & __ptr64,0>(void(content::BrowserGpuChannelHostFactory::EstablishRequest::*)(const IPC::ChannelHandle &, const gpu::GPUInfo &, content::GpuProcessHost::EstablishChannelStatus) & functor, const std::tuple<scoped_refptr<content::BrowserGpuChannelHostFactory::EstablishRequest> > & bound, std::integer_sequence<unsigned __int64,0> __formal, const IPC::ChannelHandle & <unbound_args_0>, const gpu::GPUInfo & <unbound_args_1>, content::GpuProcessHost::EstablishChannelStatus && <unbound_args_2>) Line 353 C++
libcef.dll!base::internal::Invoker<base::internal::BindState<void (__cdecl content::BrowserGpuChannelHostFactory::EstablishRequest::*)(IPC::ChannelHandle const & __ptr64,gpu::GPUInfo const & __ptr64,enum content::GpuProcessHost::EstablishChannelStatus) __ptr64,scoped_refptr<content::BrowserGpuChannelHostFactory::EstablishRequest> >,void __cdecl(IPC::ChannelHandle const & __ptr64,gpu::GPUInfo const & __ptr64,enum content::GpuProcessHost::EstablishChannelStatus)>::Run(base::internal::BindStateBase * base, const IPC::ChannelHandle & <unbound_args_0>, const gpu::GPUInfo & <unbound_args_1>, content::GpuProcessHost::EstablishChannelStatus && <unbound_args_2>) Line 334 C++
libcef.dll!content::GpuProcessHost::SendOutstandingReplies() Line 1080 C++
libcef.dll!content::GpuProcessHost::OnProcessCrashed(int exit_code) Line 835 C++
libcef.dll!content::BrowserChildProcessHostImpl::OnChildDisconnected() Line 409 C++
libcef.dll!IPC::ChannelMojo::OnPipeError() Line 383 C++
libcef.dll!IPC::internal::MessagePipeReader::OnPipeError(unsigned int error) Line 125 C++
libcef.dll!base::internal::Invoker<base::internal::BindState<void (__cdecl IPC::internal::MessagePipeReader::*)(unsigned int) __ptr64,base::internal::UnretainedWrapper<IPC::internal::MessagePipeReader>,unsigned int>,void __cdecl(void)>::RunImpl<void (__cdecl IPC::internal::MessagePipeReader::*const & __ptr64)(unsigned int) __ptr64,std::tuple<base::internal::UnretainedWrapper<IPC::internal::MessagePipeReader>,unsigned int> const & __ptr64,0,1>(void(IPC::internal::MessagePipeReader::*)(unsigned int) & functor, const std::tuple<base::internal::UnretainedWrapper<IPC::internal::MessagePipeReader>,unsigned int> & bound, std::integer_sequence<unsigned __int64,0,1> __formal) Line 353 C++
libcef.dll!mojo::InterfaceEndpointClient::NotifyError(const base::Optional<mojo::DisconnectReason> & reason) Line 320 C++
libcef.dll!IPC::`anonymous namespace'::ChannelAssociatedGroupController::NotifyEndpointOfError(IPC::`anonymous-namespace'::ChannelAssociatedGroupController::Endpoint * endpoint, bool force_async) Line 648 C++
libcef.dll!IPC::`anonymous namespace'::ChannelAssociatedGroupController::OnPipeError() Line 630 C++
libcef.dll!base::internal::Invoker<base::internal::BindState<void (__cdecl IPC::`anonymous namespace'::ChannelAssociatedGroupController::*)(void) __ptr64,base::internal::UnretainedWrapper<IPC::`anonymous namespace'::ChannelAssociatedGroupController> >,void __cdecl(void)>::RunImpl<void (__cdecl IPC::`anonymous namespace'::ChannelAssociatedGroupController::*const & __ptr64)(void) __ptr64,std::tuple<base::internal::UnretainedWrapper<IPC::`anonymous namespace'::ChannelAssociatedGroupController> > const & __ptr64,0>(void(IPC::`anonymous-namespace'::ChannelAssociatedGroupController::*)() & functor, const std::tuple<base::internal::UnretainedWrapper<IPC::`anonymous namespace'::ChannelAssociatedGroupController> > & bound, std::integer_sequence<unsigned __int64,0> __formal) Line 353 C++
libcef.dll!mojo::Connector::HandleError(bool force_pipe_reset, bool force_async_handler) Line 534 C++
libcef.dll!mojo::Connector::OnHandleReadyInternal(unsigned int result) Line 371 C++
libcef.dll!base::internal::Invoker<base::internal::BindState<void (__cdecl mojo::Connector::*)(unsigned int) __ptr64,base::internal::UnretainedWrapper<mojo::Connector> >,void __cdecl(unsigned int)>::RunImpl<void (__cdecl mojo::Connector::*const & __ptr64)(unsigned int) __ptr64,std::tuple<base::internal::UnretainedWrapper<mojo::Connector> > const & __ptr64,0>(void(mojo::Connector::*)(unsigned int) & functor, const std::tuple<base::internal::UnretainedWrapper<mojo::Connector> > & bound, std::integer_sequence<unsigned __int64,0> __formal, unsigned int && <unbound_args_0>) Line 353 C++
libcef.dll!base::MemoryPressureListener::Notify(base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level) Line 83 C++
libcef.dll!base::internal::Invoker<base::internal::BindState<void (__cdecl*)(base::RepeatingCallback<void __cdecl(unsigned int)> const & __ptr64,unsigned int,mojo::HandleSignalsState const & __ptr64),base::RepeatingCallback<void __cdecl(unsigned int)> >,void __cdecl(unsigned int,mojo::HandleSignalsState const & __ptr64)>::RunImpl<void (__cdecl*const & __ptr64)(base::RepeatingCallback<void __cdecl(unsigned int)> const & __ptr64,unsigned int,mojo::HandleSignalsState const & __ptr64),std::tuple<base::RepeatingCallback<void __cdecl(unsigned int)> > const & __ptr64,0>(void(*)(const base::RepeatingCallback<void __cdecl(unsigned int)> &, unsigned int, const mojo::HandleSignalsState &) & functor, const std::tuple<base::RepeatingCallback<void __cdecl(unsigned int)> > & bound, std::integer_sequence<unsigned __int64,0> __formal, unsigned int && <unbound_args_0>, const mojo::HandleSignalsState & <unbound_args_1>) Line 353 C++
libcef.dll!base::internal::Invoker<base::internal::BindState<void (__cdecl*)(base::RepeatingCallback<void __cdecl(unsigned int)> const & __ptr64,unsigned int,mojo::HandleSignalsState const & __ptr64),base::RepeatingCallback<void __cdecl(unsigned int)> >,void __cdecl(unsigned int,mojo::HandleSignalsState const & __ptr64)>::Run(base::internal::BindStateBase * base, unsigned int && <unbound_args_0>, const mojo::HandleSignalsState & <unbound_args_1>) Line 334 C++
libcef.dll!mojo::SimpleWatcher::OnHandleReady(int watch_id, unsigned int result, const mojo::HandleSignalsState & state) Line 277 C++
libcef.dll!mojo::SimpleWatcher::Context::Notify(unsigned int result, MojoHandleSignalsState signals_state, unsigned int flags) Line 108 C++
libcef.dll!mojo::SimpleWatcher::Context::CallNotify(unsigned __int64 context_value, unsigned int result, MojoHandleSignalsState signals_state, unsigned int flags) Line 61 C++
libcef.dll!mojo::edk::WatcherDispatcher::InvokeWatchCallback(unsigned __int64 context, unsigned int result, const mojo::HandleSignalsState & state, unsigned int flags) Line 95 C++
libcef.dll!mojo::edk::Watch::InvokeCallback(unsigned int result, const mojo::HandleSignalsState & state, unsigned int flags) Line 79 C++
libcef.dll!mojo::edk::RequestContext::~RequestContext() Line 67 C++
libcef.dll!mojo::edk::NodeChannel::OnChannelError(mojo::edk::Channel::Error error) Line 794 C++
libcef.dll!mojo::edk::Channel::OnError(mojo::edk::Channel::Error error) Line 734 C++
libcef.dll!mojo::edk::`anonymous namespace'::ChannelWin::OnIOCompleted(base::MessagePumpForIO::IOContext * context, unsigned long bytes_transfered, unsigned long error) Line 234 C++
libcef.dll!base::MessagePumpForIO::WaitForIOCompletion(unsigned long timeout, base::MessagePumpForIO::IOHandler * filter) Line 542 C++
libcef.dll!base::MessagePumpForIO::DoRunLoop() Line 483 C++
libcef.dll!base::MessagePumpWin::Run(base::MessagePump::Delegate * delegate) Line 58 C++
libcef.dll!base::RunLoop::Run() Line 124 C++
libcef.dll!content::BrowserThreadImpl::IOThreadRun(base::RunLoop * run_loop) Line 279 C++
libcef.dll!content::BrowserThreadImpl::Run(base::RunLoop * run_loop) Line 313 C++
libcef.dll!base::Thread::ThreadMain() Line 341 C++
libcef.dll!base::`anonymous namespace'::ThreadFunc(void * params) Line 89 C++