Embedding dual CEF browsers

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.

Embedding dual CEF browsers

Postby dapu92 » Tue Apr 21, 2015 4:15 am

Hello, i am making an application in which the user is supposed to log in and then fetch list of url and then surf those url. So far i have managed to create two embedded browser by using CreateBrowserSync() and i am making the first browser go small once the user has logged in and then it surfs the pages in another browser which earlier was of size 0. Now the issue is if i close the application, the application crashes some times.

I am using following :

WM_CLOSE : CefQuitMessageLoop() return 0;
WM_DESTROY:return 0;

Please let me know what all information i need to provide other than this. This is my first question on this forum, so i am not sure how exactly to ask and what details are needed to be provided.
dapu92
Newbie
 
Posts: 7
Joined: Tue Apr 21, 2015 4:09 am

Re: Embedding dual CEF browsers

Postby magreenblatt » Tue Apr 21, 2015 1:19 pm

You should wait for OnBeforeClose to be called for all browsers before quitting the message loop.
magreenblatt
Site Admin
 
Posts: 12407
Joined: Fri May 29, 2009 6:57 pm

Re: Embedding dual CEF browsers

Postby dapu92 » Tue Apr 21, 2015 1:49 pm

Actually it crashes while surfing also, say after 8 hours or sometimes like 3 hrs and some times after 13 hrs. But onBeforeClose() will not solve it, can you suggest me any fix for that too.
dapu92
Newbie
 
Posts: 7
Joined: Tue Apr 21, 2015 4:09 am

Re: Embedding dual CEF browsers

Postby magreenblatt » Tue Apr 21, 2015 1:53 pm

dapu92 wrote:Actually it crashes while surfing also

What is the symbolized call stack for this crash?
magreenblatt
Site Admin
 
Posts: 12407
Joined: Fri May 29, 2009 6:57 pm

Re: Embedding dual CEF browsers

Postby dapu92 » Wed Apr 22, 2015 4:05 am

I will run it again using visual studio, and then will take screenshot once it crashes and will post here. Thanks for replying !
dapu92
Newbie
 
Posts: 7
Joined: Tue Apr 21, 2015 4:09 am

Re: Embedding dual CEF browsers

Postby dapu92 » Sat Apr 25, 2015 9:55 pm

Hello, i got dump of crash and this was the call stack of that. I got almost same dump 3 times and other than those 3 it had crashed earlier two times in those two other dump the call stack was referring to avcu32.dll(Bitdefender). So i uninstalled the AV and other stuff and then i got the following.

The issue i am facing is that it runs perfectly on Win7 but when it is running on Win8/Win8.1 then it is good until i maximize window and leave it for sometime. I tried on laptop with WIn8.1 installed and Win8 & win8.1 in a VM. If you want i can post my handler and main file code here too.

Code: Select all
    [External Code]   
>   libcef.dll!base::WaitableEvent::WaitMany(base::WaitableEvent * * events, unsigned int count) Line 91   C++
    libcef.dll!IPC::SyncChannel::WaitForReply(IPC::SyncChannel::SyncContext * context, base::WaitableEvent * pump_messages_event) Line 510   C++
    libcef.dll!IPC::SyncChannel::Send(IPC::Message * message) Line 494   C++
    libcef.dll!content::GpuChannelHost::Send(IPC::Message * msg) Line 121   C++
    libcef.dll!content::CommandBufferProxyImpl::InsertSyncPoint() Line 390   C++
    libcef.dll!cc::ResourceProvider::DeleteAndReturnUnusedResourcesToChild(std::_List_iterator<std::_List_val<std::_List_simple_types<std::pair<int const ,cc::ResourceProvider::Child> > > > child_it, cc::ResourceProvider::DeleteStyle style, const std::vector<unsigned int,std::allocator<unsigned int> > & unused) Line 1518   C++
    libcef.dll!cc::ResourceProvider::DeclareUsedResourcesFromChild(int child, const std::vector<unsigned int,std::allocator<unsigned int> > & resources_from_child) Line 1277   C++
    libcef.dll!cc::DelegatedRendererLayerImpl::SetFrameData(const cc::DelegatedFrameData * frame_data, const gfx::RectF & damage_in_frame) Line 146   C++
    libcef.dll!cc::DelegatedRendererLayer::PushPropertiesTo(cc::LayerImpl * impl) Line 74   C++
    libcef.dll!cc::TreeSynchronizer::PushPropertiesInternal<cc::Layer>(cc::Layer * layer, cc::LayerImpl * layer_impl, unsigned int * num_dependents_need_push_properties_for_parent) Line 203   C++
    libcef.dll!cc::TreeSynchronizer::PushPropertiesInternal<cc::Layer>(cc::Layer * layer, cc::LayerImpl * layer_impl, unsigned int * num_dependents_need_push_properties_for_parent) Line 219   C++
    libcef.dll!cc::TreeSynchronizer::PushPropertiesInternal<cc::Layer>(cc::Layer * layer, cc::LayerImpl * layer_impl, unsigned int * num_dependents_need_push_properties_for_parent) Line 219   C++
    libcef.dll!cc::TreeSynchronizer::PushPropertiesInternal<cc::Layer>(cc::Layer * layer, cc::LayerImpl * layer_impl, unsigned int * num_dependents_need_push_properties_for_parent) Line 219   C++
    libcef.dll!cc::TreeSynchronizer::PushPropertiesInternal<cc::Layer>(cc::Layer * layer, cc::LayerImpl * layer_impl, unsigned int * num_dependents_need_push_properties_for_parent) Line 219   C++
    libcef.dll!cc::TreeSynchronizer::PushPropertiesInternal<cc::Layer>(cc::Layer * layer, cc::LayerImpl * layer_impl, unsigned int * num_dependents_need_push_properties_for_parent) Line 219   C++
    libcef.dll!cc::TreeSynchronizer::PushPropertiesInternal<cc::Layer>(cc::Layer * layer, cc::LayerImpl * layer_impl, unsigned int * num_dependents_need_push_properties_for_parent) Line 219   C++
    libcef.dll!cc::TreeSynchronizer::PushProperties(cc::Layer * layer, cc::LayerImpl * layer_impl) Line 299   C++
    libcef.dll!cc::LayerTreeHost::FinishCommitOnImplThread(cc::LayerTreeHostImpl * host_impl) Line 312   C++
    libcef.dll!cc::SingleThreadProxy::DoCommit(const cc::BeginFrameArgs & begin_frame_args) Line 220   C++
    libcef.dll!cc::SingleThreadProxy::CompositeImmediately(base::TimeTicks frame_begin_time) Line 450   C++
    libcef.dll!cc::LayerTreeHost::Composite(base::TimeTicks frame_begin_time) Line 733   C++
    libcef.dll!ui::Compositor::Draw() Line 236   C++
    libcef.dll!base::internal::Invoker<1,base::internal::BindState<base::internal::RunnableAdapter<void (__thiscall net::WebSocketJob::*)(void)>,void __cdecl(net::WebSocketJob *),void __cdecl(base::WeakPtr<net::WebSocketJob>)>,void __cdecl(net::WebSocketJob *)>::Run(base::internal::BindStateBase * base) Line 1169   C++
    libcef.dll!base::debug::TaskAnnotator::RunTask(const char * queue_function, const char * run_function, const base::PendingTask & pending_task) Line 62   C++
    libcef.dll!base::MessageLoop::RunTask(const base::PendingTask & pending_task) Line 448   C++
    libcef.dll!base::MessageLoop::DoWork() Line 565   C++
    libcef.dll!base::MessagePumpForUI::DoRunLoop() Line 203   C++
    libcef.dll!base::MessagePumpWin::Run(base::MessagePump::Delegate * delegate) Line 34   C++
    libcef.dll!base::MessageLoop::RunHandler() Line 414   C++
    libcef.dll!base::RunLoop::Run() Line 55   C++
    libcef.dll!base::MessageLoop::Run() Line 308   C++
    libcef.dll!CefRunMessageLoop() Line 177   C++
    10khits-exchanger.exe!wWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, wchar_t * lpCmdLine, int nCmdShow) Line 125   C++
    10khits-exchanger.exe!__tmainCRTStartup() Line 275   C
    [External Code]   
dapu92
Newbie
 
Posts: 7
Joined: Tue Apr 21, 2015 4:09 am

Re: Embedding dual CEF browsers

Postby magreenblatt » Sun Apr 26, 2015 2:52 am

What CEF version are you using?
magreenblatt
Site Admin
 
Posts: 12407
Joined: Fri May 29, 2009 6:57 pm

Re: Embedding dual CEF browsers

Postby dapu92 » Sun Apr 26, 2015 2:58 am

magreenblatt wrote:What CEF version are you using?

I am using cef 3.2171.1979 which came with binary.

Also i have one more question, shall i create another one or ask here ? the question is how to disable web security, i tried passing commandline argument --disable-web-security but no use. Basically i am trying to show the facebook, youtube in iframe.So far i have learnt that I have to either disable web security or modify response headers to allow cross origin access. Thank you for quick replies.
dapu92
Newbie
 
Posts: 7
Joined: Tue Apr 21, 2015 4:09 am


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 39 guests