Closed Bug 1175631 Opened 4 years ago Closed 4 years ago

5,436 instances of WARNING: No widget found in TabParent::UpdateDimensions during mochitest-e10s-browser-chrome linux tests

Categories

(Core :: DOM: Content Processes, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
e10s + ---
firefox41 --- fixed

People

(Reporter: erahm, Assigned: kats)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

In a recent test run on linux64 debug we see 'WARNING: No widget found in TabParent::UpdateDimensions: file dom/ipc/TabParent.cpp, line 974' emitted 5,436 times.

These are limited to the mochitest-e10s-browser-chrome tests, breakdown of tests:

> 2637 - browser/components/sessionstore/test/browser_595601-restore_hidden.js
> 1422 - browser/components/sessionstore/test/browser_586068-apptabs_ondemand.js
> 1017 - browser/components/sessionstore/test/browser_586068-apptabs.js
> 229 - browser/components/sessionstore/test/browser_615394-SSWindowState_events.js
>  96 - browser/components/sessionstore/test/browser_586068-window_state_override.js
>   9 - browser/components/sessionstore/test/browser_600545.js
>   9 - browser/components/sessionstore/test/browser_586068-multi_window.js
>   9 - browser/components/sessionstore/test/browser_586068-browser_state_interrupted.js
>   5 - browser/components/sessionstore/test/browser_701377.js
>   3 - browser/base/content/test/general/browser_bug817947.js
Switching to NS_ERROR and enabling stack traces I see the following stack locally when running:

> XPCOM_DEBUG_BREAK=stack-and-abort ./mach mochitest --e10s browser/components/sessionstore/test/browser_600545.js

> [Parent 15014] ###!!! ASSERTION: No widget found in TabParent::UpdateDimensions: 'Error', file /home/erahm/dev/mozilla-central/dom/ipc/TabParent.cpp, line 974
> #01: mozilla::dom::TabParent::UpdatePosition() (/home/erahm/dev/mozilla-central/dom/ipc/TabParent.cpp:953)
> #02: mozilla::dom::TabParent::HandleEvent(nsIDOMEvent*) (/home/erahm/dev/mozilla-central/dom/ipc/TabParent.cpp:3037)
> #03: mozilla::EventListenerManager::HandleEventSubType(mozilla::EventListenerManager::Listener*, nsIDOMEvent*, mozilla::dom::EventTarget*) (/home/erahm/dev/mozilla-central/dom/events/EventListenerManager.cpp:995)
> #04: mozilla::EventListenerManager::HandleEventInternal(nsPresContext*, mozilla::WidgetEvent*, nsIDOMEvent**, mozilla::dom::EventTarget*, nsEventStatus*) (/home/erahm/dev/mozilla-central/dom/events/EventListenerManager.cpp:1144)
> #05: mozilla::EventListenerManager::HandleEvent(nsPresContext*, mozilla::WidgetEvent*, nsIDOMEvent**, mozilla::dom::EventTarget*, nsEventStatus*) (/home/erahm/dev/mozilla-central/obj-x86_64-unknown-linux-gnu/dom/events/../../dist/include/mozilla/EventListenerManager.h:330)
> #06: mozilla::EventTargetChainItem::HandleEventTargetChain(nsTArray<mozilla::EventTargetChainItem>&, mozilla::EventChainPostVisitor&, mozilla::EventDispatchingCallback*, mozilla::ELMCreationDetector&) (/home/erahm/dev/mozilla-central/dom/events/EventDispatcher.cpp:299)
> #07: mozilla::EventDispatcher::Dispatch(nsISupports*, nsPresContext*, mozilla::WidgetEvent*, nsIDOMEvent*, nsEventStatus*, mozilla::EventDispatchingCallback*, nsTArray<mozilla::dom::EventTarget*>*) (/home/erahm/dev/mozilla-central/dom/events/EventDispatcher.cpp:640)
> #08: mozilla::EventDispatcher::DispatchDOMEvent(nsISupports*, mozilla::WidgetEvent*, nsIDOMEvent*, nsPresContext*, nsEventStatus*) (/home/erahm/dev/mozilla-central/dom/events/EventDispatcher.cpp:703)
> #09: nsContentUtils::DispatchChromeEvent(nsIDocument*, nsISupports*, nsAString_internal const&, bool, bool, bool*) (/home/erahm/dev/mozilla-central/dom/base/nsContentUtils.cpp:3753)
> #10: ~nsAString_internal (/home/erahm/dev/mozilla-central/obj-x86_64-unknown-linux-gnu/xpfe/appshell/../../dist/include/nsTSubstring.h:95)
> #11: nsBaseWidget::NotifyWindowMoved(int, int) (/home/erahm/dev/mozilla-central/widget/nsBaseWidget.cpp:1624)
> #12: nsWindow::OnConfigureEvent(_GtkWidget*, _GdkEventConfigure*) (/home/erahm/dev/mozilla-central/widget/gtk/nsWindow.cpp:2398)
> #13: configure_event_cb (/home/erahm/dev/mozilla-central/widget/gtk/nsWindow.cpp:5202)
> #14: gtk_marshal_VOID__UINT_STRING (/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0)
> #15: g_closure_invoke (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0)
> #16: g_signal_handler_disconnect (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0)
> #17: g_signal_emit_valist (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0)
> #18: g_signal_emit (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0)
> #19: gtk_widget_translate_coordinates (/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0)
> #20: gtk_main_do_event (/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0)
gdb backtrace is a little more sane:

> Breakpoint 2, mozilla::dom::TabParent::UpdateDimensions (this=this@entry=0x7fffbaf61000, rect=..., size=...)
>     at /home/erahm/dev/mozilla-central/dom/ipc/TabParent.cpp:974
> 974       NS_ERROR("No widget found in TabParent::UpdateDimensions");
> (gdb) bt
> #0  mozilla::dom::TabParent::UpdateDimensions (this=this@entry=0x7fffbaf61000, rect=..., size=...)
>     at /home/erahm/dev/mozilla-central/dom/ipc/TabParent.cpp:974
> #1  0x00007ffff1ccc245 in mozilla::dom::TabParent::UpdatePosition (this=this@entry=0x7fffbaf61000)
>     at /home/erahm/dev/mozilla-central/dom/ipc/TabParent.cpp:957
> #2  0x00007ffff1ccc2fc in mozilla::dom::TabParent::HandleEvent (this=0x7fffbaf61000, aEvent=<optimized out>)
>     at /home/erahm/dev/mozilla-central/dom/ipc/TabParent.cpp:3037
> #3  0x00007ffff189af41 in mozilla::EventListenerManager::HandleEventSubType (this=this@entry=0x7fffc383ff20, aListener=<optimized out>,
>     aListener@entry=0x7fffbaf764f8, aDOMEvent=0x7fffba14e6e0, aCurrentTarget=aCurrentTarget@entry=0x7fffbbad0480)
>     at /home/erahm/dev/mozilla-central/dom/events/EventListenerManager.cpp:995
> #4  0x00007ffff189b3b9 in mozilla::EventListenerManager::HandleEventInternal (this=0x7fffc383ff20, aPresContext=aPresContext@entry=0x0,
>     aEvent=aEvent@entry=0x7fffba13c400, aDOMEvent=aDOMEvent@entry=0x7fffffffb880, aCurrentTarget=<optimized out>,
>     aEventStatus=aEventStatus@entry=0x7fffffffb888) at /home/erahm/dev/mozilla-central/dom/events/EventListenerManager.cpp:1144
> #5  0x00007ffff18a1618 in HandleEvent (aEventStatus=0x7fffffffb888, aCurrentTarget=0x7fffbbad0480, aDOMEvent=0x7fffffffb880,
>     aEvent=0x7fffba13c400, aPresContext=0x0, this=<optimized out>) at ../../dist/include/mozilla/EventListenerManager.h:330
> #6  mozilla::EventTargetChainItem::HandleEvent (this=0x7fffd7ff4008, aVisitor=..., aCd=...)
>     at /home/erahm/dev/mozilla-central/dom/events/EventDispatcher.cpp:209
> #7  0x00007ffff189b654 in mozilla::EventTargetChainItem::HandleEventTargetChain (aChain=..., aVisitor=...,
>     aCallback=aCallback@entry=0x0, aCd=...) at /home/erahm/dev/mozilla-central/dom/events/EventDispatcher.cpp:299
> #8  0x00007ffff189bf74 in mozilla::EventDispatcher::Dispatch (aTarget=aTarget@entry=0x7fffbbad0480, aPresContext=aPresContext@entry=0x0,
>     aEvent=0x7fffba13c400, aDOMEvent=<optimized out>, aEventStatus=<optimized out>, aCallback=<optimized out>, aTargets=0x0)
>     at /home/erahm/dev/mozilla-central/dom/events/EventDispatcher.cpp:636
> #9  0x00007ffff189c3e1 in mozilla::EventDispatcher::DispatchDOMEvent (aTarget=0x7fffbbad0480, aEvent=<optimized out>,
>     aDOMEvent=0x7fffba14e6e0, aPresContext=0x0, aEventStatus=0x7fffffffb9c8)
>     at /home/erahm/dev/mozilla-central/dom/events/EventDispatcher.cpp:703
> #10 0x00007ffff0f6e128 in nsContentUtils::DispatchChromeEvent (aDoc=<optimized out>, aTarget=aTarget@entry=0x7fffbbad0480,
>     aEventName=..., aCanBubble=aCanBubble@entry=false, aCancelable=aCancelable@entry=false, aDefaultAction=aDefaultAction@entry=0x0)
>     at /home/erahm/dev/mozilla-central/dom/base/nsContentUtils.cpp:3752
> #11 0x00007ffff24194fc in nsWebShellWindow::WindowMoved (this=0x7fffc0f95ee0, aWidget=<optimized out>, x=<optimized out>,
>     y=<optimized out>) at /home/erahm/dev/mozilla-central/xpfe/appshell/nsWebShellWindow.cpp:268
> #12 0x00007ffff1e56c02 in nsBaseWidget::NotifyWindowMoved (this=this@entry=0x7fffc322bc80, aX=<optimized out>, aY=<optimized out>)
>     at /home/erahm/dev/mozilla-central/widget/nsBaseWidget.cpp:1621
> #13 0x00007ffff1e8e3ed in nsWindow::OnConfigureEvent (this=0x7fffc322bc80, aWidget=aWidget@entry=0x7fffdc27e950,
>     aEvent=aEvent@entry=0x7fffc1b89480) at /home/erahm/dev/mozilla-central/widget/gtk/nsWindow.cpp:2395
> #14 0x00007ffff1e8e43e in configure_event_cb (widget=0x7fffdc27e950, event=0x7fffc1b89480)
>     at /home/erahm/dev/mozilla-central/widget/gtk/nsWindow.cpp:5202
> #15 0x00007fffed99d815 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
> #16 0x00007fffee1c43b8 in g_closure_invoke () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
> #17 0x00007fffee1d5d3d in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
> #18 0x00007fffee1dd6f9 in g_signal_emit_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
> #19 0x00007fffee1ddce2 in g_signal_emit () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
> #20 0x00007fffedaad684 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
> #21 0x00007fffed99c57b in gtk_main_do_event () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
> #22 0x00007fffece6d1ec in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
> #23 0x00007fffedef4e04 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
> #24 0x00007fffedef5048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
> #25 0x00007fffedef50ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
> #26 0x00007ffff1e92773 in nsAppShell::ProcessNextNativeEvent (this=<optimized out>, mayWait=<optimized out>)
>     at /home/erahm/dev/mozilla-central/widget/gtk/nsAppShell.cpp:158
> #27 0x00007ffff1e71c88 in nsBaseAppShell::DoProcessNextNativeEvent (this=this@entry=0x7ffff6b48500, mayWait=mayWait@entry=false,
>     recursionDepth=recursionDepth@entry=0) at /home/erahm/dev/mozilla-central/widget/nsBaseAppShell.cpp:141
Presumbly the nsWindow up the stack (frame 13 or so) should be being returned as the widget for the TabParent. It may be that one of the links in the chain in TabParent::GetWidget() hasn't been initialized yet (e.g. the content element may not have a frame). I'll try to reproduce this locally and investigate.
Attached patch PatchSplinter Review
This seems to do the job, at least on browser/components/sessionstore/test/browser_595601-restore_hidden.js
Attachment #8623885 - Flags: review?(bugs)
Attachment #8623885 - Flags: feedback?(erahm)
Comment on attachment 8623885 [details] [diff] [review]
Patch

Could you add MOZ_ASSERT(mFrameElement); to TabParent::HandleEvent
Attachment #8623885 - Flags: review?(bugs) → review+
Comment on attachment 8623885 [details] [diff] [review]
Patch

Review of attachment 8623885 [details] [diff] [review]:
-----------------------------------------------------------------

If you do a linux64 debug try run against the e10s browser chrome mochitests I can pull the logs and verify, but really if it fixed things locally in the most verbose test for you I think you can just land w/o verifying.
Attachment #8623885 - Flags: feedback?(erahm) → feedback+
Addressed comment and landed.
Assignee: nobody → bugmail.mozilla
Blocks: e10s-tests
tracking-e10s: --- → +
I backed out the assertion that smaug requested I add since it caused crashes. I filed bug 1175924 as a follow-up for that since technically it's not related to the NS_WARNING fix in this bug.
https://hg.mozilla.org/mozilla-central/rev/8be645e0d2ce
https://hg.mozilla.org/mozilla-central/rev/db0f91911578
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
Depends on: 1181564
No longer depends on: 1181564
You need to log in before you can comment on or make changes to this bug.