mash: DCHECK in ui::PointerEvent constructor when closing task_viewer window |
|||
Issue descriptionRepro: * Launch mash_session * Type "task_viewer" into QuickLaunch * Click the close box in the Task Viewer window DCHECK: [7440:7440:0328/073316:942618685370:FATAL:event.cc(756)] Check failed: false. #0 0x7fb82194e03e base::debug::StackTrace::StackTrace() #1 0x7fb8219a3c3c logging::LogMessage::~LogMessage() #2 0x7fb81c3891c7 ui::PointerEvent::PointerEvent() #3 0x7fb81e0d7304 mash::wm::MoveEventHandler::ProcessLocatedEvent() #4 0x7fb81e0d772d mash::wm::MoveEventHandler::OnMouseEvent() #5 0x7fb81c396a07 ui::EventHandler::OnEvent() #6 0x7fb81c392480 ui::EventDispatcher::DispatchEvent() #7 0x7fb81c392235 ui::EventDispatcher::DispatchEventToEventHandlers() #8 0x7fb81c391d44 ui::EventDispatcher::ProcessEvent() #9 0x7fb81c391b72 ui::EventDispatcherDelegate::DispatchEventToTarget() #10 0x7fb81c391a52 ui::EventDispatcherDelegate::DispatchEvent() #11 0x7fb81c2e7e09 aura::WindowEventDispatcher::UpdateCapture() #12 0x7fb81c2c520b aura::client::DefaultCaptureClient::SetCapture() #13 0x7fb81c2c525b aura::client::DefaultCaptureClient::ReleaseCapture() #14 0x7fb81c2d32c8 aura::Window::ReleaseCapture() #15 0x7fb81ba9d6d2 views::NativeWidgetMus::ReleaseCapture() #16 0x7fb81c19c93b views::Widget::OnMouseEvent() #17 0x7fb81ba9f2ae views::NativeWidgetMus::OnMouseEvent() #18 0x7fb81c396a07 ui::EventHandler::OnEvent() #19 0x7fb81c392480 ui::EventDispatcher::DispatchEvent() #20 0x7fb81c391ddb ui::EventDispatcher::ProcessEvent() #21 0x7fb81c391b72 ui::EventDispatcherDelegate::DispatchEventToTarget() #22 0x7fb81c391a52 ui::EventDispatcherDelegate::DispatchEvent() #23 0x7fb81c3976bb ui::EventProcessor::OnEventFromSource() #24 0x7fb81c398725 ui::EventSource::DeliverEventToProcessor() #25 0x7fb81c3983ac ui::EventSource::SendEventToProcessor() #26 0x7fb81c2f7f4b aura::WindowTreeHostPlatform::DispatchEvent() #27 0x7fb81babb016 views::WindowTreeHostMus::DispatchEvent() #28 0x7fb81baa6bab views::PlatformWindowMus::OnWindowInputEvent() #29 0x7fb81e1271e9 mus::WindowTreeClientImpl::OnWindowInputEvent() #30 0x7fb81e1e62fe mus::mojom::WindowTreeClientStub::Accept() #31 0x7fb81e149f8b mojo::internal::InterfaceEndpointClient::HandleValidatedMessage() #32 0x7fb81e149bd1 mojo::internal::InterfaceEndpointClient::HandleIncomingMessageThunk::Accept() #33 0x7fb81e1e7b4c mus::mojom::WindowTreeClientRequestValidator::Accept() #34 0x7fb81e14b082 mojo::internal::InterfaceEndpointClient::HandleIncomingMessage() #35 0x7fb81e153b5b mojo::internal::MultiplexRouter::ProcessIncomingMessage() #36 0x7fb81e15375b mojo::internal::MultiplexRouter::Accept() #37 0x7fb81e1511bd mojo::internal::MessageHeaderValidator::Accept() #38 0x7fb81e144578 mojo::internal::Connector::ReadSingleMessage() #39 0x7fb81e1450dc mojo::internal::Connector::ReadAllAvailableMessages() #40 0x7fb81e145003 mojo::internal::Connector::OnHandleReadyInternal() #41 0x7fb81e144edb mojo::internal::Connector::OnWatcherHandleReady() #42 0x7fb81e146050 _ZN4base8internal15RunnableAdapterIMN4mojo8internal9ConnectorEFvjEE3RunIJjEEEvPS4_DpOT_ #43 0x7fb81e145fa1 _ZN4base8internal12InvokeHelperILb0EvNS0_15RunnableAdapterIMN4mojo8internal9ConnectorEFvjEEEE8MakeItSoIJPS5_jEEEvS8_DpOT_ #44 0x7fb81e145f4d _ZN4base8internal7InvokerINS_13IndexSequenceIJLm0EEEENS0_9BindStateINS0_15RunnableAdapterIMN4mojo8internal9ConnectorEFvjEEEFvPS8_jEJNS0_17UnretainedWrapperIS8_EEEEENS0_12InvokeHelperILb0EvSB_EEFvjEE3RunEPNS0_13BindStateBaseEOj #45 0x7fb81e167182 base::Callback<>::Run() #46 0x7fb81e16c4f1 mojo::Watcher::OnHandleReady() #47 0x7fb81e1464e0 _ZN4base8internal15RunnableAdapterIMN4mojo8internal9ConnectorEFvjEE3RunIJRKjEEEvPS4_DpOT_ #48 0x7fb81e146435 _ZN4base8internal12InvokeHelperILb1EvNS0_15RunnableAdapterIMN4mojo8internal9ConnectorEFvjEEEE8MakeItSoINS_7WeakPtrIS5_EEJRKjEEEvS8_T_DpOT0_ #49 0x7fb81e16cb68 _ZN4base8internal7InvokerINS_13IndexSequenceIJLm0ELm1EEEENS0_9BindStateINS0_15RunnableAdapterIMN4mojo7WatcherEFvjEEEFvPS7_jEJRNS_7WeakPtrIS7_EERjEEENS0_12InvokeHelperILb1EvSA_EEFvvEE3RunEPNS0_13BindStateBaseE #50 0x7fb821931fae base::Callback<>::Run() #51 0x7fb8219537ee base::debug::TaskAnnotator::RunTask() #52 0x7fb8219bf407 base::MessageLoop::RunTask() #53 0x7fb8219bf678 base::MessageLoop::DeferOrRunPendingTask() #54 0x7fb8219bf842 base::MessageLoop::DoWork() #55 0x7fb8219cf554 base::MessagePumpDefault::Run() #56 0x7fb8219bee9a base::MessageLoop::RunHandler() #57 0x7fb821a4fe44 base::RunLoop::Run() #58 0x7fb81e243f52 mojo::ApplicationRunner::Run() #59 0x7fb81e24401c mojo::ApplicationRunner::Run() #60 0x7fb81e0c62a2 MojoMain #61 0x000000533b7f mojo::shell::RunNativeApplication()
,
Mar 28 2016
I think the right thing to do is to ignore ET_MOUSE_CAPTURE_CHANGED here. Fix out at https://codereview.chromium.org/1843433002/
,
Mar 29 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5e8057486c37f23bfdbd1febb5fa24d36e48f19d commit 5e8057486c37f23bfdbd1febb5fa24d36e48f19d Author: jamescook <jamescook@chromium.org> Date: Tue Mar 29 23:16:58 2016 mash: Fix DCHECK when clicking on window close box There is no pointer event equivalent for mouse event type MOUSE_CAPTURE_CHANGED and MoveEventHandler doesn't need to deal with this event type. https://codereview.chromium.org/1814533002/ caused a change in mouse event handling that caused this DCHECK to be hit. BUG= 598330 TEST=mojo_runner mojo:mash_session and click the close box for any window Review URL: https://codereview.chromium.org/1843433002 Cr-Commit-Position: refs/heads/master@{#383858} [modify] https://crrev.com/5e8057486c37f23bfdbd1febb5fa24d36e48f19d/mash/wm/frame/move_event_handler.cc [modify] https://crrev.com/5e8057486c37f23bfdbd1febb5fa24d36e48f19d/ui/events/event.cc [modify] https://crrev.com/5e8057486c37f23bfdbd1febb5fa24d36e48f19d/ui/events/event.h [modify] https://crrev.com/5e8057486c37f23bfdbd1febb5fa24d36e48f19d/ui/events/event_unittest.cc
,
Mar 30 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5e8057486c37f23bfdbd1febb5fa24d36e48f19d commit 5e8057486c37f23bfdbd1febb5fa24d36e48f19d Author: jamescook <jamescook@chromium.org> Date: Tue Mar 29 23:16:58 2016 mash: Fix DCHECK when clicking on window close box There is no pointer event equivalent for mouse event type MOUSE_CAPTURE_CHANGED and MoveEventHandler doesn't need to deal with this event type. https://codereview.chromium.org/1814533002/ caused a change in mouse event handling that caused this DCHECK to be hit. BUG= 598330 TEST=mojo_runner mojo:mash_session and click the close box for any window Review URL: https://codereview.chromium.org/1843433002 Cr-Commit-Position: refs/heads/master@{#383858} [modify] https://crrev.com/5e8057486c37f23bfdbd1febb5fa24d36e48f19d/mash/wm/frame/move_event_handler.cc [modify] https://crrev.com/5e8057486c37f23bfdbd1febb5fa24d36e48f19d/ui/events/event.cc [modify] https://crrev.com/5e8057486c37f23bfdbd1febb5fa24d36e48f19d/ui/events/event.h [modify] https://crrev.com/5e8057486c37f23bfdbd1febb5fa24d36e48f19d/ui/events/event_unittest.cc
,
Apr 4 2016
,
Feb 26 2018
|
|||
►
Sign in to add a comment |
|||
Comment 1 by jamescook@chromium.org
, Mar 28 2016Status: Started (was: Untriaged)
I'm going to poke at this a little bit to learn more about PointerEvent and mash::wm. Let me know if someone else wants to take it. The event is of type ET_MOUSE_CAPTURE_CHANGED in phase EP_PRETARGET: $1 = (const ui::MouseEvent &) @0x7fff0a39d4c8: {<ui::LocatedEvent> = {<ui::Event> = {_vptr$Event = 0x7fb1101a22b0 <vtable for ui::MouseEvent+16>, type_ = ui::ET_MOUSE_CAPTURE_CHANGED, name_ = "ET_MOUSE_CAPTURE_CHANGED", time_stamp_ = {delta_ = 950710475707}, latency_ = {trace_name_ = "", <<<snip>>> input_coordinates_size_ = 0, input_coordinates_ = {{x = 0, y = 0}, {x = 0, y = 0}}, trace_id_ = -1, coalesced_ = false, terminated_ = false}, flags_ = 131072, native_event_ = 0x0, delete_native_event_ = false, cancelable_ = true, target_ = 0x2b3e94625908, phase_ = ui::EP_PRETARGET, result_ = ui::ER_UNHANDLED, source_device_id_ = -1}, location_ = {x_ = 0, y_ = 0}, root_location_ = {x_ = 0, y_ = 0}}, changed_button_flags_ = 0, static last_click_event_ = 0x0, static last_click_complete_ = false, pointer_details_ = {pointer_type = ui::EventPointerType::POINTER_TYPE_MOUSE, radius_x = 0, radius_y = 0, force = nan(0x400000), tilt_x = 0, tilt_y = 0}} It's being processed in desktop_wm in the NonClientFrameView in MoveEventHandler, which deals with drag moves for windows. I'm not sure why MoveEventHandler gets involved in clicks on close boxes. There is no PointerEvent type equivalent to ET_MOUSE_CAPTURE_CHANGED. There is ET_POINTER_CANCELLED, which seems similar to ET_TOUCH_CANCELLED but not related to capture. Thoughts on a fix: * Don't start MoveEventHandler unless you click in the title bar region. * Skip ET_MOUSE_CAPTURE_CHANGED in MoveEventHandler.