MacViews: Check failed: !view || !compositor_widget_ via InkDropHostView::RemoveInkDropLayer under [window close] |
||
Issue description
Chrome Version : 57.0.2946.0
OS Version: OS X 10.12.1
What steps will reproduce the problem?
1. E.g. Occasionally/flakily when closing a permission dialog using the close button
What is the expected result?
No DCHECK
What happens instead of that?
Clicking the close button starts an InkDrop ripple effect, then Widget::Close() is calls. Part of the contract of Widget::Close is that it will immediately Hide() the Widget, then Close it asynchronously.
While closing, we want to suppress repaints and other unnecessary stuff, so before the orderOut: in NativeWidgetMac, the compositor is destroyed. But then the orderOut happens which emits visibility changes to Views. The InkDrop sees that it is now hidden and tries to animate to a hidden state. This *sometimes* tries to remove the layer, which calls View::ReorderLayers and NativeWidgetMac::ReorderNativeViews, which tries to re-add the compositor.
* thread #1: tid = 0x13857e4, 0x00000001154f6284 libbase.dylib`base::debug::BreakDebugger() + 20 at debugger_posix.cc:262, name = 'CrBrowserMain', queue = 'com.apple.main-thread', stop reason = EXC_BREAKPOINT (code=EXC_I386_BPT, subcode=0x0)
* frame #0: 0x00000001154f6284 libbase.dylib`base::debug::BreakDebugger() + 20 at debugger_posix.cc:262
frame #1: 0x0000000115591533 libbase.dylib`logging::LogMessage::~LogMessage(this=0x00007fff5fbfbc00) + 4387 at logging.cc:760
frame #2: 0x000000011558df65 libbase.dylib`logging::LogMessage::~LogMessage(this=0x00007fff5fbfbc00) + 21 at logging.cc:534
frame #3: 0x0000000128c7c6dd libviews.dylib`views::BridgedNativeWidget::SetRootView(this=0x0000000157c1f010, view=0x0000000157c0bdd0) + 413 at bridged_native_widget.mm:532
frame #4: 0x0000000128dec8f5 libviews.dylib`views::NativeWidgetMac::ReorderNativeViews(this=0x000000014bb2af40) + 133 at native_widget_mac.mm:201
frame #5: 0x0000000128e015ed libviews.dylib`views::Widget::ReorderNativeViews(this=0x0000000157c16360) + 29 at widget.cc:914
frame #6: 0x0000000128dd96ad libviews.dylib`views::View::ReorderLayers(this=0x0000000157c0c6b0) + 285 at view.cc:1579
frame #7: 0x0000000128dcee9b libviews.dylib`views::View::DestroyLayer(this=0x0000000157c0c6b0) + 315 at view.cc:2189
frame #8: 0x0000000128dcf6d4 libviews.dylib`views::View::SetPaintToLayer(this=0x0000000157c0c6b0, paint_to_layer=false) + 180 at view.cc:501
frame #9: 0x0000000128c408a0 libviews.dylib`views::InkDropHostView::RemoveInkDropLayer(this=0x0000000157c0c6b0, ink_drop_layer=0x000000014f5745b0) + 256 at ink_drop_host_view.cc:151
frame #10: 0x0000000128c4b9a9 libviews.dylib`views::InkDropImpl::RemoveRootLayerFromHostIfNeeded(this=0x000000014f505300) + 169 at ink_drop_impl.cc:731
frame #11: 0x0000000128c4a535 libviews.dylib`views::InkDropImpl::DestroyInkDropRipple(this=0x000000014f505300) + 389 at ink_drop_impl.cc:692
frame #12: 0x0000000128c4af93 libviews.dylib`views::InkDropImpl::DestroyHiddenTargetedAnimations(this=0x000000014f505300) + 179 at ink_drop_impl.cc:673
frame #13: 0x0000000128c4ae75 libviews.dylib`views::InkDropImpl::AnimateToState(this=0x000000014f505300, ink_drop_state=HIDDEN) + 69 at ink_drop_impl.cc:646
frame #14: 0x0000000128c4288f libviews.dylib`views::InkDropHostView::VisibilityChanged(this=0x0000000157c0c6b0, starting_from=0x0000000157c0bdd0, is_visible=false) + 127 at ink_drop_host_view.cc:233
frame #15: 0x0000000128ca52e6 libviews.dylib`views::CustomButton::VisibilityChanged(this=0x0000000157c0c6b0, starting_from=0x0000000157c0bdd0, visible=false) + 54 at custom_button.cc:357
frame #16: 0x0000000128ddb6d1 libviews.dylib`views::View::VisibilityChangedImpl(this=0x0000000157c0c6b0, starting_from=0x0000000157c0bdd0, is_visible=false) + 65 at view.cc:1933
frame #17: 0x0000000128dcea41 libviews.dylib`views::View::PropagateVisibilityNotifications(this=0x0000000157c0c6b0, start=0x0000000157c0bdd0, is_visible=false) + 129 at view.cc:1929
frame #18: 0x0000000128dcea1e libviews.dylib`views::View::PropagateVisibilityNotifications(this=0x0000000157c0b230, start=0x0000000157c0bdd0, is_visible=false) + 94 at view.cc:1928
frame #19: 0x0000000128dcea1e libviews.dylib`views::View::PropagateVisibilityNotifications(this=0x0000000157c298c0, start=0x0000000157c0bdd0, is_visible=false) + 94 at view.cc:1928
frame #20: 0x0000000128dcea1e libviews.dylib`views::View::PropagateVisibilityNotifications(this=0x0000000157c0bdd0, start=0x0000000157c0bdd0, is_visible=false) + 94 at view.cc:1928
frame #21: 0x0000000128e01e79 libviews.dylib`views::Widget::OnNativeWidgetVisibilityChanged(this=0x0000000157c16360, visible=false) + 89 at widget.cc:1046
frame #22: 0x0000000128c81b82 libviews.dylib`views::BridgedNativeWidget::OnVisibilityChanged(this=0x0000000157c1f010) + 610 at bridged_native_widget.mm:870
frame #23: 0x0000000128c99c78 libviews.dylib`::-[ViewsNSWindowDelegate onWindowOrderChanged:](self=0x000000014bb1c540, _cmd="onWindowOrderChanged:", notification=0x0000000000000000) + 40 at views_nswindow_delegate.mm:39
frame #24: 0x0000000128c987b7 libviews.dylib`::-[NativeWidgetMacNSWindow orderWindow:relativeTo:](self=0x0000000157c241d0, _cmd="orderWindow:relativeTo:", orderingMode=NSWindowOut, otherWindowNumber=0) + 135 at native_widget_mac_nswindow.mm:158
frame #25: 0x0000000128dedf41 libviews.dylib`views::NativeWidgetMac::Close(this=0x000000014bb2af40) + 353 at native_widget_mac.mm:373
frame #26: 0x0000000128dffb08 libviews.dylib`views::Widget::Close(this=0x0000000157c16360) + 456 at widget.cc:584
frame #27: 0x0000000128c69871 libviews.dylib`views::BubbleFrameView::ButtonPressed(this=0x0000000157c0b230, sender=0x0000000157c0c6b0, event=0x00007fff5fbfcda0) + 81 at bubble_frame_view.cc:380
frame #28: 0x0000000128ca2017 libviews.dylib`views::Button::NotifyClick(this=0x0000000157c0c6b0, event=0x00007fff5fbfcda0) + 87 at button.cc:83
frame #29: 0x0000000128ca5c27 libviews.dylib`views::CustomButton::NotifyClick(this=0x0000000157c0c6b0, event=0x00007fff5fbfcda0) + 87 at custom_button.cc:465
frame #30: 0x0000000128ca4a14 libviews.dylib`views::CustomButton::OnMouseReleased(this=0x0000000157c0c6b0, event=0x00007fff5fbfcda0) + 212 at custom_button.cc:198
frame #31: 0x0000000128dd3e82 libviews.dylib`views::View::ProcessMouseReleased(this=0x0000000157c0c6b0, event=0x00007fff5fbfcda0) + 50 at view.cc:2281
frame #32: 0x0000000128dd36b7 libviews.dylib`views::View::OnMouseEvent(this=0x0000000157c0c6b0, event=0x00007fff5fbfcda0) + 231 at view.cc:1038
frame #33: 0x0000000128c42a84 libviews.dylib`views::InkDropHostView::OnMouseEvent(this=0x0000000157c0c6b0, event=0x00007fff5fbfcda0) + 292 at ink_drop_host_view.cc:262
frame #34: 0x00000001296eb433 libevents.dylib`ui::EventHandler::OnEvent(this=0x0000000157c0c6b0, event=0x00007fff5fbfcda0) + 147 at event_handler.cc:27
frame #35: 0x00000001296f5b1d libevents.dylib`ui::ScopedTargetHandler::OnEvent(this=0x0000000157c103f0, event=0x00007fff5fbfcda0) + 93 at scoped_target_handler.cc:32
,
Dec 14 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c8701123a47788c2dcd15f957ac02492d1138fa4 commit c8701123a47788c2dcd15f957ac02492d1138fa4 Author: tapted <tapted@chromium.org> Date: Wed Dec 14 22:34:28 2016 MacViews: Be robust against Views manipulating Layers during Widget::Close(). An InkDropHostView may manipulate layers in response the Widget::Hide(). A Hide() occurs synchronously in Widget::Close(), followed by tear down that occurs asynchronously. Mac's BridgedNativeWidget (and aura::Window::~Window()) suppress repaints during a close. BridgedNativeWidget does this by clearing out the compositor. We shouldn't try to subsequently recreate the compositor (there's a DCHECK for that). Manipulating Layers may call Widget::ReorderNativeViews. And NativeWidgetMac::ReorderNativeViews() currently calls BridgedNativeWidget::SetRootView() (which updates the compositor). It's done this since before ReorderChildViews() was implemented, but it's no longer necessary. It should always be a no-op: the RootView can't change. BUG= 673991 , 674003 Review-Url: https://codereview.chromium.org/2577593002 Cr-Commit-Position: refs/heads/master@{#438653} [modify] https://crrev.com/c8701123a47788c2dcd15f957ac02492d1138fa4/ui/views/cocoa/bridged_native_widget.mm [modify] https://crrev.com/c8701123a47788c2dcd15f957ac02492d1138fa4/ui/views/view_unittest.cc [modify] https://crrev.com/c8701123a47788c2dcd15f957ac02492d1138fa4/ui/views/widget/native_widget_mac.mm
,
Dec 14 2016
|
||
►
Sign in to add a comment |
||
Comment 1 by tapted@chromium.org
, Dec 14 2016