CreateBrowserSync call doesn't return

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.

Re: CreateBrowserSync call doesn't return

Postby magreenblatt » Wed Dec 18, 2013 11:13 pm

As mentioned in the above link check that you don't have any '..' in your project configuration file paths.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: CreateBrowserSync call doesn't return

Postby zpucky » Thu Dec 19, 2013 4:28 am

As @magreenblatt said, the answer is in http://magpcss.org/ceforum/viewtopic.php?f=6&t=10725. $(TargetPath), cannot have ".." in its value. :?

Fixed! Thanks!
zpucky
Newbie
 
Posts: 2
Joined: Wed Dec 18, 2013 11:47 am

Re: CreateBrowserSync call doesn't return

Postby hymerman » Tue Jan 28, 2014 5:25 pm

I just ran into the same issue (CreateBrowserSync hanging) but the solution for me was to replace backslashes with forward slashes in the "Command" and "Working Dir" options under "Properties -> General -> Debugging". Note that they're included at the end of some Visual Studio macro expansions (e.g. "$(ProjectDir)"), so make sure those are followed immediately by a forward slash. I did this, and left some ".." in my paths, and now it works.

Presumably CEF or Chromium is interpreting the backslashes as escape characters? Even so, I'd have thought it would cope with this by returning an error, or asserting or crashing, but not hanging. Is there a bug reported for this? Should there be?
hymerman
Techie
 
Posts: 11
Joined: Tue Jan 28, 2014 5:13 pm

Re: CreateBrowserSync call doesn't return

Postby andpad » Mon Apr 02, 2018 2:36 pm

Hello,

I'm looking for some assistance to debug a similar issue where the CreateBrowserSync function call hangs. I'm posting the call to the TID_UI thread and it works sometimes, but by the 2nd or third call this issue occurs.

Some context:
In my testing I'm simply creating a new host window, then creating a new browser window and placing it on the host window, and then destroying the host window by calling DestroyWindow().
Using multi_threaded_message_loop.
Using cef_binary_3.3163.1671.g700dc25_windows32.
Using VS 2013.

CrBrowserMain call stack:
[External Code]
[Frames below may be incorrect and/or missing, no symbols loaded for win32u.dll]
libcef.dll!views::HWNDMessageHandler::Activate() Line 697 C++
libcef.dll!views::HWNDMessageHandler::ShowWindowWithState(ui::WindowShowState show_state) Line 651 C++
libcef.dll!views::HWNDMessageHandler::Show() Line 602 C++
> libcef.dll!aura::WindowTreeHost::Show() Line 216 C++
libcef.dll!views::DesktopNativeWidgetAura::Show() Line 737 C++
libcef.dll!views::Widget::Show() Line 641 C++
libcef.dll!CefBrowserPlatformDelegateNativeWin::CreateHostWindow() Line 182 C++
libcef.dll!CefBrowserHostImpl::CreateHostWindow() Line 3006 C++
libcef.dll!CefBrowserHostImpl::CreateInternal(const CefStructBase<CefBrowserSettingsTraits> & settings, scoped_refptr<CefClient> client, content::WebContents * web_contents, scoped_refptr<CefBrowserInfo> browser_info, scoped_refptr<CefBrowserHostImpl> opener, bool is_devtools_popup, scoped_refptr<CefRequestContext> request_context, std::unique_ptr<CefBrowserPlatformDelegate,std::default_delete<CefBrowserPlatformDelegate> > platform_delegate) Line 367 C++
libcef.dll!CefBrowserHostImpl::Create(CefBrowserHostImpl::CreateParams & create_params) Line 322 C++
libcef.dll!CefBrowserHost::CreateBrowserSync(const CefWindowInfo & windowInfo, scoped_refptr<CefClient> client, const CefStringBase<CefStringTraitsUTF16> & url, const CefStructBase<CefBrowserSettingsTraits> & settings, scoped_refptr<CefRequestContext> request_context) Line 267 C++
libcef.dll!cef_browser_host_create_browser_sync(const _cef_window_info_t * windowInfo, _cef_client_t * client, const _cef_string_utf16_t * url, const _cef_browser_settings_t * settings, _cef_request_context_t * request_context) Line 93 C++
micefintegration.dll!CefBrowserHost::CreateBrowserSync(const CefWindowInfo & windowInfo, scoped_refptr<CefClient> client, const CefStringBase<CefStringTraitsUTF16> & url, const CefStructBase<CefBrowserSettingsTraits> & settings, scoped_refptr<CefRequestContext> request_context) Line 61 C++
micefintegration.dll!<lambda_3b71d62448c902a106a300743b4c085f>::<helper_func_cdecl>(HWND__ * hwndWin, std::promise<scoped_refptr<CefBrowser> > * promise) Line 243 C++
micefintegration.dll!base::cef_internal::RunnableAdapter<void (__cdecl*)(HWND__ *,std::promise<scoped_refptr<CefBrowser> > *)>::Run(HWND__ * const & a1, std::promise<scoped_refptr<CefBrowser> > * const & a2) Line 230 C++
micefintegration.dll!base::cef_internal::InvokeHelper<0,void,base::cef_internal::RunnableAdapter<void (__cdecl*)(HWND__ *,std::promise<scoped_refptr<CefBrowser> > *)>,void __cdecl(HWND__ * const &,std::promise<scoped_refptr<CefBrowser> > * const &)>::MakeItSo(base::cef_internal::RunnableAdapter<void (__cdecl*)(HWND__ *,std::promise<scoped_refptr<CefBrowser> > *)> runnable, HWND__ * const & a1, std::promise<scoped_refptr<CefBrowser> > * const & a2) Line 972 C++
micefintegration.dll!base::cef_internal::Invoker<2,base::cef_internal::BindState<base::cef_internal::RunnableAdapter<void (__cdecl*)(HWND__ *,std::promise<scoped_refptr<CefBrowser> > *)>,void __cdecl(HWND__ *,std::promise<scoped_refptr<CefBrowser> > *),void __cdecl(HWND__ *,std::promise<scoped_refptr<CefBrowser> > *)>,void __cdecl(HWND__ *,std::promise<scoped_refptr<CefBrowser> > *)>::Run(base::cef_internal::BindStateBase * base) Line 1402 C++
micefintegration.dll!base::Callback<void __cdecl(void)>::Run() Line 435 C++
micefintegration.dll!`anonymous namespace'::CefClosureTask::Execute() Line 17 C++
micefintegration.dll!`anonymous namespace'::task_execute(_cef_task_t * self) Line 29 C++
libcef.dll!CefCompletionCallbackCToCpp::OnComplete() Line 28 C++
libcef.dll!base::internal::FunctorTraits<void (__thiscall `anonymous namespace'::CefAuthCallbackImpl::*)(void),void>::Invoke<scoped_refptr<`anonymous namespace'::CefAuthCallbackImpl> const &>(void (void) * method, const scoped_refptr<`anonymous namespace'::CefAuthCallbackImpl> & receiver_ptr) Line 210 C++
libcef.dll!base::internal::Invoker<base::internal::BindState<void (__thiscall CefCompletionCallback::*)(void),scoped_refptr<CefCompletionCallback> >,void __cdecl(void)>::Run(base::internal::BindStateBase * base) Line 329 C++
libcef.dll!base::debug::TaskAnnotator::RunTask(const char * queue_function, base::PendingTask * pending_task) Line 59 C++
libcef.dll!base::MessageLoop::RunTask(base::PendingTask * pending_task) Line 423 C++
libcef.dll!base::MessageLoop::DoWork() Line 540 C++
libcef.dll!base::MessagePumpForUI::DoRunLoop() Line 174 C++
libcef.dll!base::MessagePumpWin::Run(base::MessagePump::Delegate * delegate) Line 58 C++
libcef.dll!base::MessageLoop::Run() Line 369 C++
libcef.dll!base::RunLoop::Run() Line 112 C++
libcef.dll!base::Thread::Run(base::RunLoop * run_loop) Line 256 C++
libcef.dll!base::Thread::ThreadMain() Line 341 C++
libcef.dll!base::`anonymous namespace'::ThreadFunc(void * params) Line 91 C++
[External Code]


Any help is appreciated.

Thanks.
Last edited by andpad on Tue Apr 03, 2018 11:49 am, edited 2 times in total.
andpad
Techie
 
Posts: 29
Joined: Mon Oct 23, 2017 1:57 pm

Re: CreateBrowserSync call doesn't return

Postby ndesktop » Tue Apr 03, 2018 5:52 am

VS2010 debugger *sometimes* confuses subprocesses. Run it from outside, and add code immediately on WinMain like
Code: Select all
#ifdef _DEBUG
  while(!IsDebuggerPresent())
    ;
#endif
int breakpoint__ = 0;

or use a timeout, registry HKCU setting etc.
Then set a breakpoint on the "int breakpoint__ = 0;" line, start client, attach debugger from VS2010 and you'll break in debugger without starting the client from the VS2010 debugger.
ndesktop
Master
 
Posts: 756
Joined: Thu Dec 03, 2015 10:10 am

Re: CreateBrowserSync call doesn't return

Postby andpad » Tue Apr 03, 2018 11:24 am

This also occurs with a release version running outside the debugger :(
andpad
Techie
 
Posts: 29
Joined: Mon Oct 23, 2017 1:57 pm

Previous

Return to Support Forum

Who is online

Users browsing this forum: No registered users and 99 guests