New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 728830 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

mash: Crash when hitting Ctrl-Space to switch IME

Project Member Reported by jamescook@chromium.org, Jun 1 2017

Issue description

Chrome ToT b334ab19b61db7d9df851a5a765df62e90341b38 (today)

* Log in (you might need multiple IMEs in settings)
* Hit Ctrl-Space

Received signal 11 SEGV_MAPERR 000000000000
#0 0x7f9a66c4705c base::debug::StackTrace::StackTrace()
#1 0x7f9a66c46bc1 base::debug::(anonymous namespace)::StackDumpSignalHandler()
#2 0x7f9a63dbc580 <unknown>
#3 0x7f9a689b6c51 ash::(anonymous namespace)::CanCycleInputMethod()
#4 0x7f9a689b4155 ash::AcceleratorController::CanPerformAction()
#5 0x7f9a65eb4199 ash::mus::AcceleratorControllerRegistrar::OnAccelerator()
#6 0x7f9a67d2f864 aura::WindowTreeClient::OnAccelerator()
#7 0x7f9a652c378c ui::mojom::WindowManagerStubDispatch::Accept()
#8 0x7f9a66c33368 mojo::InterfaceEndpointClient::HandleValidatedMessage()
#9 0x7f9a66c38a6b mojo::internal::MultiplexRouter::ProcessIncomingMessage()
#10 0x7f9a66c384b4 mojo::internal::MultiplexRouter::Accept()
#11 0x7f9a66c32238 mojo::Connector::ReadSingleMessage()
#12 0x7f9a66c32951 mojo::Connector::ReadAllAvailableMessages()
#13 0x7f9a66cf7441 mojo::SimpleWatcher::OnHandleReady()
#14 0x7f9a66cd8b26 base::debug::TaskAnnotator::RunTask()
#15 0x7f9a66c6221e base::MessageLoop::RunTask()
#16 0x7f9a66c6260b base::MessageLoop::DeferOrRunPendingTask()
#17 0x7f9a66c62a64 base::MessageLoop::DoWork()
#18 0x7f9a66c64199 base::MessagePumpLibevent::Run()
#19 0x7f9a66c84670 base::RunLoop::Run()
#20 0x7f9a668b9811 _ZN4base8internal7InvokerINS0_9BindStateIZN15service_manager12_GLOBAL__N_110RunServiceEPNS3_12MainDelegateEE3$_0JS6_PiEEEFvN4mojo16InterfaceRequestINS3_5mojom7ServiceEEEEE3RunEPNS0_13BindStateBaseEOSE_
#21 0x7f9a65349707 service_manager::RunStandaloneService()
#22 0x7f9a668b9046 service_manager::Main()
#23 0x7f9a668988f1 content::ContentMain()
#24 0x7f9a64fa76ec ChromeMain
#25 0x7f9a62a12816 __libc_start_main
#26 0x7f9a64fa74f9 _start

The problem is that chromeos::input_method::InputMethodManager::Get() returns null. I recently changed some code in ash so that it uses IMM directly rather than using delegates back into chrome.

 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 27 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0b125aab5adef9187d37830c35fbf862c3321b76

commit 0b125aab5adef9187d37830c35fbf862c3321b76
Author: Rouslan Solomakhin <rouslan@chromium.org>
Date: Tue Jun 27 18:43:23 2017

Fix build.

Broken in:
http://crrev.com/c/547136

Error:
ash/ime/ime_controller_unittest.cc:24:50: error: chosen constructor is
explicit in copy-initialization const std::vector<std::string>& menu_item_keys = {})

Unable to cleanly revert, so landing this fix instead. The fix:
Change {} to std::vector<std::string>().

TBR=jamescook, tsepez, xiyuan, shuchen

Bug: 24305, 728830 
Change-Id: I9b4d09316d748654eb459d16b264be545bab171d
Reviewed-on: https://chromium-review.googlesource.com/550239
Reviewed-by: Rouslan Solomakhin <rouslan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#482685}
[modify] https://crrev.com/0b125aab5adef9187d37830c35fbf862c3321b76/ash/ime/ime_controller_unittest.cc

Status: Started (was: Assigned)
Summary: mash: Crash when hitting Ctrl-Space to switch IME (was: mash: Crash in ash when hitting Ctrl-Space to switch IME)
The crash in the description was fixed in r482665

However, there's a different crash now, in the browser process:

[118129:118129:0628/084941.878014:FATAL:shell.cc(283)] Check failed: HasInstance(). 
#0 0x7f7e7999c8ec base::debug::StackTrace::StackTrace()
#1 0x7f7e799c0dd1 logging::LogMessage::~LogMessage()
#2 0x7f7e747590d7 ash::Shell::GetPrimaryRootWindow()
#3 0x7f7e748181c9 ash::wm::GetActiveWindow()
#4 0x560f9fbb122c chromeos::input_method::ModeIndicatorController::ShowModeIndicator()
#5 0x560f9fba6b0b chromeos::input_method::InputMethodManagerImpl::ChangeInputMethodInternal()
#6 0x560f9fba635c chromeos::input_method::InputMethodManagerImpl::StateImpl::ChangeInputMethod()
#7 0x560fa135fc13 ImeControllerClient::SwitchToPreviousIme()
#8 0x7f7e742f186d ash::mojom::ImeControllerClientStubDispatch::Accept()
#9 0x7f7e783d6e58 mojo::InterfaceEndpointClient::HandleValidatedMessage()
#10 0x7f7e783d67c6 mojo::FilterChain::Accept()

This is ash::Shell access trying to show the mode indicator bubble, which appears near the active text input field.

Status: Verified (was: Started)
Fixed by commit below.

commit 3e8047dfdb365ced762ab524b9082346e29ef4fb
Author: James Cook <jamescook@chromium.org>
Date:   Fri Jun 30 20:49:21 2017 +0000

    chromeos: Make IME indicator bubble work under mash
    
    This fixes a crash when hitting Ctrl-Space to switch IME when running
    chrome --mash. It avoids ash::Shell access in the browser process and
    uses mus_properties to parent the bubble to the correct container.
    
    Bug:  728830 
    Test: existing browser_tests, also run chrome --mash and switch IMEs
    Change-Id: I7c75b7db20d66215dcb4857c12a953199e934d26
    Reviewed-on: https://chromium-review.googlesource.com/552902
    Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
    Reviewed-by: Michael Wasserman <msw@chromium.org>
    Commit-Queue: James Cook <jamescook@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#483813}

Components: -Internals>MUS Internals>Services>WindowService

Sign in to add a comment