Closed GoogleCodeExporter closed 9 years ago
I can confirm this bug and experience the same issue with 39.0.2171.
Version 37.0.2062.94 was working fine though. (Maybe that helps to narrow it
down.)
Original comment by the.e...@gmail.com
on 10 Dec 2014 at 1:05
I also encountered the same issue with version 39.
After I insight the source code, I find that M39 use mojo to do IPC
communication.
When reload current crashed Tab with OnRenderProcessTerminated,
RenderProcessHost's mojo_application_host_ doesn't reset. I think that it
should reset mojo_application_host_ before ViewHostMsg_RenderProcessGone.
I change code like this:
--- a/browser/renderer_host/render_process_host_impl.cc
+++ b/browser/renderer_host/render_process_host_impl.cc
@@ -1926,6 +1926,12 @@ void RenderProcessHostImpl::ProcessDied(bool
already_dead) {
message_port_message_filter_ = NULL;
RemoveUserData(kSessionStorageHolderKey);
+ /// m:wbs reset mojo_application_host before ViewHostMsg_RenderProcessGone.
+ // Because ViewHostMsg_RenderProcessGone maybe restore current crashed tab,
it lead to mojo check failed.
+ // See: https://code.google.com/p/chromiumembedded/issues/detail?id=1429
+ mojo_application_host_.reset(new MojoApplicationHost);
+ mojo_activation_required_ = false;
+
IDMap<IPC::Listener>::iterator iter(&listeners_);
while (!iter.IsAtEnd()) {
iter.GetCurrentValue()->OnMessageReceived(
@@ -1935,9 +1941,6 @@ void RenderProcessHostImpl::ProcessDied(bool
already_dead) {
iter.Advance();
}
- mojo_application_host_.reset(new MojoApplicationHost);
- mojo_activation_required_ = false;
-
// It's possible that one of the calls out to the observers might have caused
// this object to be no longer needed.
if (delayed_cleanup_needed_)
It works fine.
Original comment by wbaoshen...@gmail.com
on 19 Dec 2014 at 3:59
Original comment by magreenb...@gmail.com
on 13 Jan 2015 at 4:34
This problem does not reproduce with current Chromium/CEF trunk. I'm getting a
different call stack when calling LoadURL (or Reload) from
OnRenderProcessTerminated with Chromium version 39.0.2171.95 (CEF revision
1970) on Windows 8.1:
[0113/115444:FATAL:mojo_application_host.cc(33)] Check failed:
!client_handle_.is_valid(). Already initialized!
> libcef.dll!content::MojoApplicationHost::Init() Line 35 C++
libcef.dll!content::RenderProcessHostImpl::Init() Line 587 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, int proxy_route_id, int max_page_id, bool window_was_created_with_opener) Line 267 C++
libcef.dll!content::WebContentsImpl::CreateRenderViewForRenderManager(content::RenderViewHost * render_view_host, int opener_route_id, int proxy_routing_id, bool for_main_frame_navigation) Line 4179 C++
libcef.dll!content::RenderFrameHostManager::InitRenderView(content::RenderViewHostImpl * render_view_host, int opener_route_id, int proxy_routing_id, bool for_main_frame_navigation) Line 1236 C++
libcef.dll!content::RenderFrameHostManager::Navigate(const content::NavigationEntryImpl & entry) Line 229 C++
libcef.dll!content::NavigatorImpl::NavigateToEntry(content::RenderFrameHostImpl * render_frame_host, const content::NavigationEntryImpl & entry, content::NavigationController::ReloadType reload_type) Line 331 C++
libcef.dll!content::NavigatorImpl::NavigateToPendingEntry(content::RenderFrameHostImpl * render_frame_host, content::NavigationController::ReloadType reload_type) Line 400 C++
libcef.dll!content::WebContentsImpl::NavigateToPendingEntry(content::NavigationController::ReloadType reload_type) Line 1953 C++
libcef.dll!content::NavigationControllerImpl::NavigateToPendingEntry(content::NavigationController::ReloadType reload_type) Line 1641 C++
libcef.dll!content::NavigationControllerImpl::LoadEntry(content::NavigationEntryImpl * entry) Line 416 C++
libcef.dll!content::NavigationControllerImpl::LoadURLWithParams(const content::NavigationController::LoadURLParams & params) Line 753 C++
libcef.dll!content::NavigationControllerImpl::LoadURL(const GURL & url, const content::Referrer & referrer, ui::PageTransition transition, const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & extra_headers) Line 648 C++
libcef.dll!CefBrowserHostImpl::LoadURL(__int64 frame_id, const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & url, const content::Referrer & referrer, ui::PageTransition transition, const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & extra_headers) Line 1588 C++
libcef.dll!CefFrameHostImpl::LoadURL(const CefStringBase<CefStringTraitsUTF16> & url) Line 140 C++
libcef.dll!frame_load_url(_cef_frame_t * self, const _cef_string_utf16_t * url) Line 190 C++
cefclient.exe!CefFrameCToCpp::LoadURL(const CefStringBase<CefStringTraitsUTF16> & url) Line 177 C++
cefclient.exe!ClientHandler::OnRenderProcessTerminated(CefRefPtr<CefBrowser> browser, cef_termination_status_t status) Line 580 C++
cefclient.exe!request_handler_on_render_process_terminated(_cef_request_handler_t * self, _cef_browser_t * browser, cef_termination_status_t status) Line 370 C++
libcef.dll!CefRequestHandlerCToCpp::OnRenderProcessTerminated(CefRefPtr<CefBrowser> browser, cef_termination_status_t status) Line 348 C++
libcef.dll!CefBrowserHostImpl::RenderProcessGone(base::TerminationStatus status) Line 2416 C++
libcef.dll!content::WebContentsImpl::RenderViewTerminated(content::RenderViewHost * rvh, base::TerminationStatus status, int error_code) Line 3651 C++
libcef.dll!content::RenderViewHostImpl::OnRenderProcessGone(int status, int exit_code) Line 1083 C++
libcef.dll!DispatchToMethod<content::RenderViewHostImpl,void (__thiscall content::RenderViewHostImpl::*)(int,int),int,int>(content::RenderViewHostImpl * obj, void (int, int) * method, const Tuple2<int,int> & arg) Line 556 C++
libcef.dll!ViewHostMsg_RenderProcessGone::Dispatch<content::RenderViewHostImpl,content::RenderViewHostImpl,void,void (__thiscall content::RenderViewHostImpl::*)(int,int)>(const IPC::Message * msg, content::RenderViewHostImpl * obj, content::RenderViewHostImpl * sender, void * parameter, void (int, int) * func) Line 1027 C++
libcef.dll!content::RenderViewHostImpl::OnMessageReceived(const IPC::Message & msg) Line 902 C++
libcef.dll!content::RenderProcessHostImpl::ProcessDied(bool already_dead) Line 1935 C++
libcef.dll!content::RenderProcessHostImpl::OnChannelError() Line 1424 C++
libcef.dll!IPC::ChannelProxy::Context::OnDispatchError() Line 297 C++
libcef.dll!base::internal::RunnableAdapter<void (__thiscall IPC::ChannelProxy::Context::*)(void)>::Run(IPC::ChannelProxy::Context * object) Line 134 C++
libcef.dll!base::internal::InvokeHelper<0,void,base::internal::RunnableAdapter<void (__thiscall IPC::ChannelProxy::Context::*)(void)>,void __cdecl(IPC::ChannelProxy::Context * const &)>::MakeItSo(base::internal::RunnableAdapter<void (__thiscall IPC::ChannelProxy::Context::*)(void)> runnable, IPC::ChannelProxy::Context * const & a1) Line 872 C++
libcef.dll!base::internal::Invoker<1,base::internal::BindState<base::internal::RunnableAdapter<void (__thiscall IPC::ChannelProxy::Context::*)(void)>,void __cdecl(IPC::ChannelProxy::Context *),void __cdecl(IPC::ChannelProxy::Context *)>,void __cdecl(IPC::ChannelProxy::Context *)>::Run(base::internal::BindStateBase * base) Line 1169 C++
libcef.dll!base::Callback<void __cdecl(void)>::Run() Line 401 C++
libcef.dll!base::debug::TaskAnnotator::RunTask(const char * queue_function, const char * run_function, const base::PendingTask & pending_task) Line 64 C++
libcef.dll!base::MessageLoop::RunTask(const base::PendingTask & pending_task) Line 448 C++
libcef.dll!base::MessageLoop::DeferOrRunPendingTask(const base::PendingTask & pending_task) Line 458 C++
libcef.dll!base::MessageLoop::DoWork() Line 564 C++
libcef.dll!base::MessagePumpForUI::DoRunLoop() Line 202 C++
libcef.dll!base::MessagePumpWin::RunWithDispatcher(base::MessagePump::Delegate * delegate, base::MessagePumpDispatcher * dispatcher) Line 49 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!CefBrowserMessageLoop::RunMessageLoop() Line 28 C++
libcef.dll!CefRunMessageLoop() Line 178 C++
libcef.dll!cef_run_message_loop() Line 285 C++
cefclient.exe!CefRunMessageLoop() Line 276 C++
cefclient.exe!wWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, wchar_t * lpCmdLine, int nCmdShow) Line 149 C++
Original comment by magreenb...@gmail.com
on 13 Jan 2015 at 5:03
@#4: There's a different crash in current Chromium/CEF trunk when
OnRenderProcessTerminated/LoadURL is called more than once:
[0113/121709:FATAL:channel_init.cc(25)] Check failed: !io_thread_task_runner_.
libcef.dll!base::debug::BreakDebugger() Line 21 C++
libcef.dll!logging::LogMessage::~LogMessage() Line 643 C++
> libcef.dll!mojo::embedder::ChannelInit::Init(void * file,
scoped_refptr<base::TaskRunner> io_thread_task_runner) Line 26 C++
libcef.dll!content::MojoApplicationHost::Init() Line 43 C++
libcef.dll!content::RenderProcessHostImpl::Init() Line 598 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, int proxy_route_id, int max_page_id, bool window_was_created_with_opener) Line 252 C++
libcef.dll!content::WebContentsImpl::CreateRenderViewForRenderManager(content::RenderViewHost * render_view_host, int opener_route_id, int proxy_routing_id, bool for_main_frame_navigation) Line 4189 C++
libcef.dll!content::RenderFrameHostManager::InitRenderView(content::RenderViewHostImpl * render_view_host, int opener_route_id, int proxy_routing_id, bool for_main_frame_navigation) Line 1267 C++
libcef.dll!content::RenderFrameHostManager::Navigate(const content::NavigationEntryImpl & entry) Line 208 C++
libcef.dll!content::NavigatorImpl::NavigateToEntry(content::RenderFrameHostImpl * render_frame_host, const content::NavigationEntryImpl & entry, content::NavigationController::ReloadType reload_type) Line 405 C++
libcef.dll!content::NavigatorImpl::NavigateToPendingEntry(content::RenderFrameHostImpl * render_frame_host, content::NavigationController::ReloadType reload_type) Line 477 C++
libcef.dll!content::WebContentsImpl::NavigateToPendingEntry(content::NavigationController::ReloadType reload_type) Line 1946 C++
libcef.dll!content::NavigationControllerImpl::NavigateToPendingEntry(content::NavigationController::ReloadType reload_type) Line 1623 C++
libcef.dll!content::NavigationControllerImpl::LoadEntry(content::NavigationEntryImpl * entry) Line 416 C++
libcef.dll!content::NavigationControllerImpl::LoadURLWithParams(const content::NavigationController::LoadURLParams & params) Line 755 C++
libcef.dll!content::NavigationControllerImpl::LoadURL(const GURL & url, const content::Referrer & referrer, ui::PageTransition transition, const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & extra_headers) Line 648 C++
libcef.dll!CefBrowserHostImpl::LoadURL(__int64 frame_id, const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & url, const content::Referrer & referrer, ui::PageTransition transition, const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & extra_headers) Line 1586 C++
libcef.dll!CefFrameHostImpl::LoadURL(const CefStringBase<CefStringTraitsUTF16> & url) Line 140 C++
libcef.dll!frame_load_url(_cef_frame_t * self, const _cef_string_utf16_t * url) Line 190 C++
cefclient.exe!CefFrameCToCpp::LoadURL(const CefStringBase<CefStringTraitsUTF16> & url) Line 177 C++
cefclient.exe!ClientHandler::OnRenderProcessTerminated(CefRefPtr<CefBrowser> browser, cef_termination_status_t status) Line 585 C++
cefclient.exe!request_handler_on_render_process_terminated(_cef_request_handler_t * self, _cef_browser_t * browser, cef_termination_status_t status) Line 370 C++
libcef.dll!CefRequestHandlerCToCpp::OnRenderProcessTerminated(CefRefPtr<CefBrowser> browser, cef_termination_status_t status) Line 348 C++
libcef.dll!CefBrowserHostImpl::RenderProcessGone(base::TerminationStatus status) Line 2430 C++
libcef.dll!content::WebContentsImpl::RenderViewTerminated(content::RenderViewHost * rvh, base::TerminationStatus status, int error_code) Line 3651 C++
libcef.dll!content::RenderViewHostImpl::OnRenderProcessGone(int status, int exit_code) Line 1063 C++
libcef.dll!DispatchToMethodImpl<content::RenderViewHostImpl,void (__thiscall content::RenderViewHostImpl::*)(int,int),int,int,0,1>(content::RenderViewHostImpl * obj, void (int, int) * method, const Tuple<int,int> & arg, IndexSequence<0,1> __formal) Line 200 C++
libcef.dll!DispatchToMethod<content::RenderViewHostImpl,void (__thiscall content::RenderViewHostImpl::*)(int,int),int,int>(content::RenderViewHostImpl * obj, void (int, int) * method, const Tuple<int,int> & arg) Line 207 C++
libcef.dll!ViewHostMsg_RenderProcessGone::Dispatch<content::RenderViewHostImpl,content::RenderViewHostImpl,void,void (__thiscall content::RenderViewHostImpl::*)(int,int)>(const IPC::Message * msg, content::RenderViewHostImpl * obj, content::RenderViewHostImpl * sender, void * parameter, void (int, int) * func) Line 1077 C++
libcef.dll!content::RenderViewHostImpl::OnMessageReceived(const IPC::Message & msg) Line 882 C++
libcef.dll!content::RenderProcessHostImpl::ProcessDied(bool already_dead) Line 2055 C++
libcef.dll!content::RenderProcessHostImpl::OnChannelError() Line 1534 C++
libcef.dll!IPC::ChannelProxy::Context::OnDispatchError() Line 305 C++
libcef.dll!base::internal::RunnableAdapter<void (__thiscall IPC::ChannelProxy::Context::*)(void)>::Run(IPC::ChannelProxy::Context * object) Line 185 C++
libcef.dll!base::internal::InvokeHelper<0,void,base::internal::RunnableAdapter<void (__thiscall IPC::ChannelProxy::Context::*)(void)>,void __cdecl(IPC::ChannelProxy::Context * const &)>::MakeItSo(base::internal::RunnableAdapter<void (__thiscall IPC::ChannelProxy::Context::*)(void)> runnable, IPC::ChannelProxy::Context * const & <args_0>) Line 382 C++
libcef.dll!base::internal::Invoker<1,base::internal::BindState<base::internal::RunnableAdapter<void (__thiscall IPC::ChannelProxy::Context::*)(void)>,void __cdecl(IPC::ChannelProxy::Context *),void __cdecl(IPC::ChannelProxy::Context *)>,void __cdecl(IPC::ChannelProxy::Context *)>::Run(base::internal::BindStateBase * base) Line 478 C++
libcef.dll!base::Callback<void __cdecl(void)>::Run() Line 396 C++
libcef.dll!base::debug::TaskAnnotator::RunTask(const char * queue_function, const char * run_function, const base::PendingTask & pending_task) Line 65 C++
libcef.dll!base::MessageLoop::RunTask(const base::PendingTask & pending_task) Line 438 C++
libcef.dll!base::MessageLoop::DeferOrRunPendingTask(const base::PendingTask & pending_task) Line 448 C++
libcef.dll!base::MessageLoop::DoWork() Line 553 C++
libcef.dll!base::MessagePumpForUI::DoRunLoop() Line 203 C++
libcef.dll!base::MessagePumpWin::RunWithDispatcher(base::MessagePump::Delegate * delegate, base::MessagePumpDispatcher * dispatcher) Line 50 C++
libcef.dll!base::MessagePumpWin::Run(base::MessagePump::Delegate * delegate) Line 34 C++
libcef.dll!base::MessageLoop::RunHandler() Line 404 C++
libcef.dll!base::RunLoop::Run() Line 56 C++
libcef.dll!base::MessageLoop::Run() Line 298 C++
libcef.dll!CefBrowserMessageLoop::RunMessageLoop() Line 28 C++
libcef.dll!CefRunMessageLoop() Line 178 C++
libcef.dll!cef_run_message_loop() Line 287 C++
cefclient.exe!CefRunMessageLoop() Line 278 C++
cefclient.exe!wWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, wchar_t * lpCmdLine, int nCmdShow) Line 149 C++
Original comment by magreenb...@gmail.com
on 13 Jan 2015 at 5:19
Issue 1438 has been merged into this issue.
Original comment by magreenb...@gmail.com
on 13 Jan 2015 at 5:20
Original comment by magreenb...@gmail.com
on 13 Jan 2015 at 5:20
@#4/#5: Both crashes are fixed by the change proposed in #2. Patches added in
trunk revision 1971 and 2171 branch revision 1972.
Original comment by magreenb...@gmail.com
on 13 Jan 2015 at 5:41
Filed with Chromium as http://crbug.com/448435.
Original comment by marshall@chromium.org
on 13 Jan 2015 at 6:01
Original issue reported on code.google.com by
thomas...@gmail.com
on 11 Nov 2014 at 6:55