New issue
Advanced search Search tips
Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 15
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug
Team-Accessibility



Sign in to add a comment
link

Issue 913549: Mash: EventQueue DCHECK hit with sticky keys enabled

Reported by msw@chromium.org, Dec 10 Project Member

Issue description

Mash: EventQueue DCHECK hit with sticky keys enabled

On linux-chromeos ToT @ #615147
(1) "Enable sticky keys" at chrome://settings/manageAccessibility
(2) Focus the "search settings" textfield in the settings webui
(3) Press and release the Ctrl key (onscreen heads up display will show)
(4) Press and release the 'a' key
Expected: Select-all behavior, no crash
Actual: DCHECK crash, stack below.

[172734:172734:1210/093201.023311:FATAL:event_queue.cc(149)] Check failed: !in_flight_event_. 
#0 0x7f89751ac94f base::debug::StackTrace::StackTrace()
#1 0x7f89750da85b logging::LogMessage::~LogMessage()
#2 0x7f8964697320 ws::EventQueue::OnWillSendEventToClient()
#3 0x7f89646a6d3d ws::WindowTree::SendEventToClient()
#4 0x7f896469c869 ws::(anonymous namespace)::ServerWindowEventHandler::OnEvent()
#5 0x7f8970b3ff7f ui::EventDispatcher::DispatchEventToEventHandlers()
#6 0x7f8970b3fb79 ui::EventDispatcher::ProcessEvent()
#7 0x7f8970b3fa59 ui::EventDispatcherDelegate::DispatchEventToTarget()
#8 0x7f8970b3f9c6 ui::EventDispatcherDelegate::DispatchEvent()
#9 0x7f8970b416d2 ui::EventProcessor::OnEventFromSource()
#10 0x7f8970b41d9b ui::EventSource::SendEventToSinkFromRewriter()
#11 0x7f896e7e2340 ash::AshWindowTreeHostPlatform::DispatchEventFromQueue()
#12 0x7f8964698c5f ws::HostEventQueue::DispatchOrQueueEvent()
#13 0x7f8970b46587 ui::DispatchEventFromNativeUiEvent()
#14 0x7f896e144a6e ui::X11WindowOzone::DispatchEvent()
#15 0x7f8974240933 ui::PlatformEventSource::DispatchEvent()
#16 0x7f8964420c79 ui::X11EventSourceLibevent::DispatchPlatformEvent()
#17 0x7f8964420721 ui::X11EventSourceLibevent::ProcessXEvent()
#18 0x7f896441bae1 ui::X11EventSource::DispatchXEvents()
#19 0x7f89751cfefc base::MessagePumpLibevent::OnLibeventNotification()
#20 0x7f89751e73dd event_base_loop

I'll take a look.
 

Comment 1 by sky@chromium.org, Dec 10

That DCHECK basically means the WindowService is trying to send a KeyEvent to the client and the WindowService is waiting for the ack from a previous event. When waiting for a response from a client keyevents should be queued in EventQueue.

The event queuing logic is handled by having AshWindowTreeHostPlatform::DispatchEvent() call to HostEventQueue::DispatchOrQueueEvent(). So, it must be that rewriters call through a path that doesn't go to AshWindowTreeHostPlatform::DispatchEvent.

Comment 2 by sky@chromium.org, Dec 11

I believe this is the reason the two interactive ui tests StickyKeysBrowserTest.OpenTrayMenu and StickyKeysBrowserTest.SearchLeftOmnibox fail with mash. When this bug is fixed, these two tests will hopefully pass.

Comment 3 by bugdroid1@chromium.org, Dec 15

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4fe29ffa08cc000b6e1ca50c872692cce2ce0292

commit 4fe29ffa08cc000b6e1ca50c872692cce2ce0292
Author: Mike Wasserman <msw@chromium.org>
Date: Sat Dec 15 03:00:53 2018

ws: Queue input events on delivery, not dispatch.

Queue additional events generated by EventRewriters, as needed.
Refactor EventQueue to operate later, closer to EventSink delivery.

Eliminate HostEventQueue and [Test]HostEventDispatcher.
Use Shell via WSDelegate for EventInjector's display -> host lookup.

Update tests and setup code; add a queue unit test for host destruction.
Move content_browsertests' aura::TestScreen ownership to WMTestHelper.

TODO: Remove WindowTreeHost::event_sink(), use GetEventSink().

Alternate WIP sticky keys DCHECK workaround: https://crrev.com/c/1371878

Bug:  913549 
Test: No SingleProcessMash sticky keys DCHECK, no input regressions.
Change-Id: I61d67af94fad0ed8414a7945160a7c231dca47a1
Reviewed-on: https://chromium-review.googlesource.com/c/1372629
Commit-Queue: Michael Wasserman <msw@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616930}
[modify] https://crrev.com/4fe29ffa08cc000b6e1ca50c872692cce2ce0292/ash/display/extended_mouse_warp_controller_unittest.cc
[modify] https://crrev.com/4fe29ffa08cc000b6e1ca50c872692cce2ce0292/ash/host/ash_window_tree_host_platform.cc
[modify] https://crrev.com/4fe29ffa08cc000b6e1ca50c872692cce2ce0292/ash/host/ash_window_tree_host_platform.h
[modify] https://crrev.com/4fe29ffa08cc000b6e1ca50c872692cce2ce0292/ash/ws/window_service_delegate_impl.cc
[modify] https://crrev.com/4fe29ffa08cc000b6e1ca50c872692cce2ce0292/ash/ws/window_service_delegate_impl.h
[modify] https://crrev.com/4fe29ffa08cc000b6e1ca50c872692cce2ce0292/content/shell/browser/shell.h
[modify] https://crrev.com/4fe29ffa08cc000b6e1ca50c872692cce2ce0292/content/shell/browser/shell_views.cc
[modify] https://crrev.com/4fe29ffa08cc000b6e1ca50c872692cce2ce0292/services/ws/BUILD.gn
[modify] https://crrev.com/4fe29ffa08cc000b6e1ca50c872692cce2ce0292/services/ws/event_injector.cc
[modify] https://crrev.com/4fe29ffa08cc000b6e1ca50c872692cce2ce0292/services/ws/event_injector.h
[modify] https://crrev.com/4fe29ffa08cc000b6e1ca50c872692cce2ce0292/services/ws/event_injector_unittest.cc
[modify] https://crrev.com/4fe29ffa08cc000b6e1ca50c872692cce2ce0292/services/ws/event_queue.cc
[modify] https://crrev.com/4fe29ffa08cc000b6e1ca50c872692cce2ce0292/services/ws/event_queue.h
[modify] https://crrev.com/4fe29ffa08cc000b6e1ca50c872692cce2ce0292/services/ws/event_queue_unittest.cc
[delete] https://crrev.com/6b167c24cd4ac3678e3563c915688b48df9fbb00/services/ws/host_event_dispatcher.h
[delete] https://crrev.com/6b167c24cd4ac3678e3563c915688b48df9fbb00/services/ws/host_event_queue.cc
[delete] https://crrev.com/6b167c24cd4ac3678e3563c915688b48df9fbb00/services/ws/host_event_queue.h
[modify] https://crrev.com/4fe29ffa08cc000b6e1ca50c872692cce2ce0292/services/ws/injected_event_handler.cc
[modify] https://crrev.com/4fe29ffa08cc000b6e1ca50c872692cce2ce0292/services/ws/injected_event_handler_unittest.cc
[delete] https://crrev.com/6b167c24cd4ac3678e3563c915688b48df9fbb00/services/ws/test_host_event_dispatcher.cc
[delete] https://crrev.com/6b167c24cd4ac3678e3563c915688b48df9fbb00/services/ws/test_host_event_dispatcher.h
[modify] https://crrev.com/4fe29ffa08cc000b6e1ca50c872692cce2ce0292/services/ws/test_window_service_delegate.cc
[modify] https://crrev.com/4fe29ffa08cc000b6e1ca50c872692cce2ce0292/services/ws/test_window_service_delegate.h
[modify] https://crrev.com/4fe29ffa08cc000b6e1ca50c872692cce2ce0292/services/ws/test_ws/test_window_service.cc
[modify] https://crrev.com/4fe29ffa08cc000b6e1ca50c872692cce2ce0292/services/ws/test_ws/test_window_service.h
[modify] https://crrev.com/4fe29ffa08cc000b6e1ca50c872692cce2ce0292/services/ws/window_service.cc
[modify] https://crrev.com/4fe29ffa08cc000b6e1ca50c872692cce2ce0292/services/ws/window_service.h
[modify] https://crrev.com/4fe29ffa08cc000b6e1ca50c872692cce2ce0292/services/ws/window_service_delegate.h
[modify] https://crrev.com/4fe29ffa08cc000b6e1ca50c872692cce2ce0292/services/ws/window_service_test_setup.cc
[modify] https://crrev.com/4fe29ffa08cc000b6e1ca50c872692cce2ce0292/services/ws/window_service_test_setup.h
[modify] https://crrev.com/4fe29ffa08cc000b6e1ca50c872692cce2ce0292/testing/buildbot/filters/chromeos.single_process_mash.interactive_ui_tests.filter
[modify] https://crrev.com/4fe29ffa08cc000b6e1ca50c872692cce2ce0292/ui/aura/window_tree_host.cc
[modify] https://crrev.com/4fe29ffa08cc000b6e1ca50c872692cce2ce0292/ui/aura/window_tree_host.h
[modify] https://crrev.com/4fe29ffa08cc000b6e1ca50c872692cce2ce0292/ui/events/event_source.cc
[modify] https://crrev.com/4fe29ffa08cc000b6e1ca50c872692cce2ce0292/ui/events/event_source.h
[modify] https://crrev.com/4fe29ffa08cc000b6e1ca50c872692cce2ce0292/ui/wm/test/wm_test_helper.cc
[modify] https://crrev.com/4fe29ffa08cc000b6e1ca50c872692cce2ce0292/ui/wm/test/wm_test_helper.h

Comment 4 by msw@google.com, Dec 15

Status: Fixed (was: Assigned)

Sign in to add a comment