I'm just getting started with CEF. I've successfully built and run cefclient on Windows 7 using VS2012 via the binary distribution 3.1453.1255.
Next, I tried integrating the cefclient files into my application, attempting to change as little as possible to just make it load a page within my application environment. I can see that CefInitialize() is called. CefBrowserHost::CreateBrowser() is called. And eventually it calls CefRunMessageLoop(). Then it breaks into an assertion.
The debugger output window shows:
- Code: Select all
[0605/154337:FATAL:thread_restrictions.cc(38)] Function marked as IO-only was called from a thread that disallows IO! If this thread really should be allowed to make IO calls, adjust the call to base::ThreadRestrictions::SetIOAllowed() in this thread's startup.
The thread that is running appears to be the main thread. The call stack is pasted below.
I've searched for this error but come up empty. Thanks in advance for any suggestions for what might be causing this!
Rob
- Code: Select all
libcef.dll!base::debug::BreakDebugger() Line 107 C++
libcef.dll!logging::LogMessage::~LogMessage() Line 650 C++
libcef.dll!base::ThreadRestrictions::AssertIOAllowed() Line 45 C++
libcef.dll!file_util::AbsolutePath(base::FilePath * path=0x01e7cc34) Line 43 C++
libcef.dll!PathService::Get(int key=5, base::FilePath * result=0x01e7d1e8) Line 220 C++
libcef.dll!content::PathProvider(int key=4000, base::FilePath * result=0x01e7d1e8) Line 16 C++
libcef.dll!PathService::Get(int key=4000, base::FilePath * result=0x01e7d280) Line 209 C++
libcef.dll!content::ChildProcessHost::GetChildPath(int flags=0) Line 107 C++
libcef.dll!content::RenderProcessHostImpl::Init() Line 460 C++
libcef.dll!content::RenderViewHostImpl::CreateRenderView(const std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > & frame_name={...}, int opener_route_id=-2, int max_page_id=-1) Line 234 C++
libcef.dll!content::WebContentsImpl::CreateRenderViewForRenderManager(content::RenderViewHost * render_view_host=0x03ee4f80, int opener_route_id=-2) Line 3391 C++
libcef.dll!content::RenderViewHostManager::InitRenderView(content::RenderViewHost * render_view_host=0x03ee4f80, int opener_route_id=-2) Line 690 C++
libcef.dll!content::RenderViewHostManager::Navigate(const content::NavigationEntryImpl & entry={...}) Line 140 C++
libcef.dll!content::WebContentsImpl::NavigateToEntry(const content::NavigationEntryImpl & entry={...}, content::NavigationController::ReloadType reload_type=NO_RELOAD) Line 1659 C++
libcef.dll!content::WebContentsImpl::NavigateToPendingEntry(content::NavigationController::ReloadType reload_type=NO_RELOAD) Line 1627 C++
libcef.dll!content::NavigationControllerImpl::NavigateToPendingEntry(content::NavigationController::ReloadType reload_type=NO_RELOAD) Line 1666 C++
libcef.dll!content::NavigationControllerImpl::LoadEntry(content::NavigationEntryImpl * entry=0x03ee3d80) Line 402 C++
libcef.dll!content::NavigationControllerImpl::LoadURLWithParams(const content::NavigationController::LoadURLParams & params={...}) Line 826 C++
libcef.dll!content::NavigationControllerImpl::LoadURL(const GURL & url={...}, const content::Referrer & referrer={...}, content::PageTransition transition=PAGE_TRANSITION_TYPED, const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & extra_headers={...}) Line 744 C++
libcef.dll!CefBrowserHostImpl::LoadURL(__int64 frame_id=-1, const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & url={...}) Line 1267 C++
libcef.dll!CefBrowserHost::CreateBrowserSync(const CefWindowInfo & windowInfo={...}, CefRefPtr<CefClient> client={...}, const CefStringBase<CefStringTraitsUTF16> & url={...}, const CefStructBase<CefBrowserSettingsTraits> & settings={...}) Line 311 C++
libcef.dll!`anonymous namespace'::CreateBrowserWithHelper(`anonymous-namespace'::CreateBrowserHelper * helper=0x03ef7c80) Line 76 C++
libcef.dll!base::internal::RunnableAdapter<void (__cdecl*)(`anonymous namespace'::CreateBrowserHelper *)>::Run(`anonymous-namespace'::CreateBrowserHelper * const & a1=0x03ef7c80) Line 171 C++
libcef.dll!base::internal::InvokeHelper<0,void,base::internal::RunnableAdapter<void (__cdecl*)(`anonymous namespace'::CreateBrowserHelper *)>,void __cdecl(`anonymous namespace'::CreateBrowserHelper * const &)>::MakeItSo(base::internal::RunnableAdapter<void (__cdecl*)(`anonymous namespace'::CreateBrowserHelper *)> runnable={...}, `anonymous-namespace'::CreateBrowserHelper * const & a1=0x03ef7c80) Line 872 C++
libcef.dll!base::internal::Invoker<1,base::internal::BindState<base::internal::RunnableAdapter<void (__cdecl*)(`anonymous namespace'::CreateBrowserHelper *)>,void __cdecl(`anonymous namespace'::CreateBrowserHelper *),void __cdecl(`anonymous namespace'::CreateBrowserHelper *)>,void __cdecl(`anonymous namespace'::CreateBrowserHelper *)>::Run(base::internal::BindStateBase * base=0x03f56e80) Line 1173 C++
libcef.dll!base::Callback<void __cdecl(void)>::Run() Line 396 C++
libcef.dll!MessageLoop::RunTask(const base::PendingTask & pending_task={...}) Line 478 C++
libcef.dll!MessageLoop::DeferOrRunPendingTask(const base::PendingTask & pending_task={...}) Line 491 C++
libcef.dll!MessageLoop::DoWork() Line 671 C++
libcef.dll!base::MessagePumpForUI::DoRunLoop() Line 241 C++
libcef.dll!base::MessagePumpWin::RunWithDispatcher(base::MessagePump::Delegate * delegate=0x03ef7dc0, base::MessagePumpDispatcher * dispatcher=0x00000000) Line 64 C++
libcef.dll!base::MessagePumpWin::Run(base::MessagePump::Delegate * delegate=0x03ef7dc0) Line 48 C++
libcef.dll!MessageLoop::RunInternal() Line 433 C++
libcef.dll!MessageLoop::RunHandler() Line 407 C++
libcef.dll!base::RunLoop::Run() Line 46 C++
libcef.dll!MessageLoop::Run() Line 314 C++
libcef.dll!CefBrowserMessageLoop::RunMessageLoop() Line 28 C++
libcef.dll!CefRunMessageLoop() Line 145 C++
libcef.dll!cef_run_message_loop() Line 259 C++
MyCefTest.exe!CefRunMessageLoop() Line 250 C++