New issue
Advanced search Search tips

Issue 814590 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Mouse cursor isn't automatically teleported back to first display when removing second display in ash_unittests --mus

Project Member Reported by afakhry@chromium.org, Feb 22 2018

Issue description

In this test I added https://chromium-review.googlesource.com/c/chromium/src/+/912760/9/ash/magnifier/docked_magnifier_controller_unittest.cc#330, when removing the second display, the mouse cursor should be automatically teleported to the first display.

This works ok in ash_unittests running as classic ash, as well as chrome --mus, but not on ash_unittests --mus.

I spent some time debugging this but couldn't figure out why it's not working. Here are my findings:

- The difference between ash_unittests --mus and chrome --mus is the following:

### ash_unittests --mus
A.1) When the second display is removed, its AshWindowTreeHost is shutdown, setting its root window's event targeter to an instance of the NullEventTargeter.
A.2) When aura::WindowEventDispatcher::SynthesizeMouseMoveEvent() is called, it is called on the WindowEventDispatcher of the root window of the display that is about to be removed. And since its targeter is now the null targeter, event dispatching stops, even though the root_mouse_location is at the center of display 1.

### chrome --mus
B.1) Similar to (A.1).
B.2) SynthesizeMouseMoveEvent() is called on the correct dispatcher (of the root window of display 1). Hence dispatching works, and the mouse cursor is teleported to the first display.


So the difference is between (A.2) and (B.2).
 

Comment 1 by sky@chromium.org, Feb 22 2018

Owner: msw@chromium.org
Status: Assigned (was: Untriaged)
Mike, please kick this back to me if you have too much going on. I'm assigning to you as you are likely familiar with this.

Comment 2 by msw@chromium.org, Feb 22 2018

Labels: Needs-Feedback
Owner: afakhry@chromium.org
Hey Ahmed, I applied the latest patch set (#9) of your linked CL.
The test passes when run in isolation (or with all DockedMagnifierTest.*) with or without --mus.
Can you confirm that you're still experiencing a failure here?

$ ash_unittests --gtest_filter=DockedMagnifierTest.AddRemoveDisplays --mus
...
[ RUN      ] DockedMagnifierTest.AddRemoveDisplays
[160310:160310:0222/140009.228783:1477974630754:ERROR:display_manager.cc(1931)] Could not find display:102
[       OK ] DockedMagnifierTest.AddRemoveDisplays (161 ms)
[----------] 1 test from DockedMagnifierTest (161 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (161 ms total)
[  PASSED  ] 1 test.
....
Labels: -Needs-Feedback
Owner: msw@chromium.org
I rebased again, and I can still see the same failure:

[ RUN      ] DockedMagnifierTest.AddRemoveDisplays
[185644:185644:0222/171504.904509:2100655740206:ERROR:display_manager.cc(1931)] Could not find display:102
../../ash/magnifier/docked_magnifier_controller_unittest.cc:336: Failure
Expected: (nullptr) != (viewport_widget), actual: 8-byte object <00-00 00-00 00-00 00-00> vs NULL
[185644:185651:0222/171505.141752:2100655977442:ERROR:gl_context_virtual.cc(39)] Trying to make virtual context current without decoder.
[185644:185651:0222/171505.148393:2100655984080:ERROR:gl_context_virtual.cc(39)] Trying to make virtual context current without decoder.
[  FAILED  ] DockedMagnifierTest.AddRemoveDisplays (523 ms)

This is the same failure as seen on the bot: https://build.chromium.org/deprecated/tryserver.chromium.chromiumos/builders/linux-chromeos-rel/builds/64267/steps/mus_ash_unittests%20(with%20patch)/logs/DockedMagnifierTest.AddRemoveDisplays

Comment 4 by msw@chromium.org, Feb 23 2018

I rebased from #537362 to #538651, it repros with --enable-features=Mash, but not with --enable-features=Mus.

Here are my gn args:
is_component_build = true
target_os = "chromeos"
use_goma = true
use_ozone = true
ozone_auto_platforms = false
ozone_platform_headless = true
ozone_platform_x11 = true
ozone_platform = "x11"
dcheck_always_on = true
is_debug = false

And here are the bot's gn args:
dcheck_always_on = true
ffmpeg_branding = "ChromeOS"
goma_dir = "/b/c/goma_client"
is_component_build = false
is_debug = false
proprietary_codecs = true
strip_absolute_paths_from_debug_symbols = true
symbol_level = 1
target_os = "chromeos"
use_goma = true
use_vaapi = true

I might try building with the bots args to see if I can repro with mus; otherwise I'll investigate with mash.
I didn't use --enable-features, I just used ash_unittests --mus.

Here are my gn args:

symbol_level=-1
enable_profiling=true 
is_debug=true 
v8_enable_backtrace=true 
is_component_build=true 
enable_nacl=true 
use_ozone=true 
remove_webcore_debug_symbols=true 
use_goma=true 
is_chrome_branded=true 
target_os="chromeos"

Comment 6 by msw@chromium.org, Feb 23 2018

See Scott's recent email (I'm guessing this also means --mus/--mash don't work on ash_unittests):
Assuming https://chromium-review.googlesource.com/c/chromium/src/+/927360 doesn't get reverted --mus and --mash are now features. What this means is --mus/--mash no longer do anything. Instead you have to use --enable-features=Mus or --enable-features=Mash. Please let me know if you run into any problems.

I rebuilt with your gn args and found that it only fails with --enable-features=Mash. It passes with --enable-features=Mus, --mus, and --mash.
Components: -MUS Internals>Services>WindowService

Comment 8 by e...@chromium.org, Mar 9 2018

Cc: -e...@chromium.org
Un-cc-ing me from all bugs on my final day.
Status: WontFix (was: Assigned)
Obsolete. We're removing Config::MUS.

Sign in to add a comment