New issue
Advanced search Search tips

Issue 752315 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 5
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug


Show other hotlists

Hotlists containing this issue:
Hotlist-1
Hotlist-1


Sign in to add a comment

Chrome crashes when switching user with settings page opened

Project Member Reported by sonnysasaka@chromium.org, Aug 3 2017

Issue description

Chrome Version: 62.0.3175.0
OS: Chrome OS

What steps will reproduce the problem?
(1) Login to user A.
(2) Login to user B (multi-profile).
(3) Open chrome://settings, still under user B's session.
(4) Without closing the chrome://settings page, switch to user A's session (ctrl-alt-.).
(5) Chrome will crash in ExtensionInputMethodEventRouter::InputMethodChanged, at DCHECK(profile->IsSameProfile(Profile::FromBrowserContext(context_)));

Note: This only happens if dcheck is enabled, but still may be an indication that there is something wrong.

What is the expected result? Chrome shouldn't crash.

What happens instead? Chrome crashes.
 
Cc: steve...@chromium.org
Labels: Proj-MaterialDesign-WebUI

Comment 2 Deleted

Cc: xiy...@chromium.org
Components: UI>Shell UI>Input>Text>IME
Labels: -Pri-3 Pri-2
xiyuan, related to session controller mojo timing differences?

I also see this on linux desktop at chrome r494397. I think I've seen it when settings was closed, not sure.

[91538:91538:0815/113629.301535:FATAL:input_method_event_router.cc(39)] Check failed: profile->IsSameProfile(Profile::FromBrowserContext(context_)). 
#0 0x7f5ee7f6ce6c base::debug::StackTrace::StackTrace()
#1 0x7f5ee7f923ac logging::LogMessage::~LogMessage()
#2 0x559c12a89e82 chromeos::ExtensionInputMethodEventRouter::InputMethodChanged()
#3 0x559c12ae3b3b chromeos::input_method::InputMethodManagerImpl::ChangeInputMethodInternal()
#4 0x559c12ae6202 chromeos::input_method::InputMethodManagerImpl::SetState()
#5 0x559c12b48531 chromeos::UserSessionManager::ActiveUserChanged()
#6 0x7f5ee2ff2a93 user_manager::UserManagerBase::NotifyActiveUserChanged()
#7 0x7f5ee2ff281d user_manager::UserManagerBase::SwitchActiveUser()
#8 0x559c1422dd76 SessionControllerClient::DoSwitchActiveUser()
#9 0x559c1422df49 SessionControllerClient::DoCycleActiveUser()
#10 0x7f5ee27c1d16 ash::mojom::SessionControllerClientStubDispatch::Accept()
#11 0x7f5ee725c2bb mojo::InterfaceEndpointClient::HandleValidatedMessage()
#12 0x7f5ee725bbe6 mojo::FilterChain::Accept()
#13 0x7f5ee725d525 mojo::InterfaceEndpointClient::HandleIncomingMessage()
#14 0x7f5ee7266c5a mojo::internal::MultiplexRouter::ProcessIncomingMessage()
#15 0x7f5ee72663ab mojo::internal::MultiplexRouter::Accept()
#16 0x7f5ee725bbe6 mojo::FilterChain::Accept()

Comment 4 by xiy...@chromium.org, Aug 15 2017

I don't think it is related to session controller.

It seems like settings page uses inputMethodPrivate API and listens to onChanged event [1]. That makes InputMethodAPI creates ExtensionInputMethodEventRouter [2]. ExtensionInputMethodEventRouter observes InputMethodManager for ime change [3].

However, InputMethodManagerImpl is not profile specific and triggers ime change event when user switches and cause the DCHECK in ExtensionInputMethodEventRouter.

[1]: https://cs.chromium.org/chromium/src/chrome/browser/resources/settings/languages_page/languages.js?rcl=c4c2a921e4a78c77577b17db1a70816799eb23e9&l=230
[2]: https://cs.chromium.org/chromium/src/chrome/browser/chromeos/extensions/input_method_api.cc?rcl=1cd2c21c4750adee58c80da847c75d5d65584188&l=348-351
[3]: https://cs.chromium.org/chromium/src/chrome/browser/chromeos/extensions/input_method_event_router.cc?rcl=e11da440da1af1e639d5a24ac046426e14c474f4&l=26
Components: -UI>Shell

Comment 6 by ovanieva@google.com, Aug 30 2017

Components: -UI>Settings

Comment 7 by blakeo@chromium.org, Sep 19 2017

Owner: blakeo@chromium.org

Comment 8 by blakeo@chromium.org, Sep 19 2017

Status: Assigned (was: Untriaged)
Owner: ----
Status: Available (was: Assigned)
blakeo@ is no longer working on virtual keyboard. Marking as available.
Labels: M-71
Owner: steve...@chromium.org
Status: Assigned (was: Available)
I'll look into this. I ran into a couple of other DCHECKs while investigating, I'll need to audit and locally disable those first.

Cc: tbarzic@chromium.org
Status: Started (was: Assigned)
I think the code is making an incorrect assumption:

https://cs.chromium.org/chromium/src/chrome/browser/chromeos/extensions/input_method_event_router.cc?q=input_method_event_router&sq=package:chromium&g=0&l=38

InputMethodManager is a global singleton so it is entirely possible that an event from a different profile is received. Such events I think should just be ignored.

I will put up a CL to fix that.


Project Member

Comment 12 by bugdroid1@chromium.org, Oct 5

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

commit fa842d42863dc2c83081c5537f9341177ea574b6
Author: Steven Bennetts <stevenjb@chromium.org>
Date: Fri Oct 05 19:50:53 2018

ExtensionInputMethodEventRouter: DCHECK -> early exit

Bug:  752315 
Change-Id: Iaee8b7f66471482f08dc3c310523e6fb88bb7a50
Reviewed-on: https://chromium-review.googlesource.com/c/1260015
Reviewed-by: Toni Baržić <tbarzic@chromium.org>
Commit-Queue: Steven Bennetts <stevenjb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#597254}
[modify] https://crrev.com/fa842d42863dc2c83081c5537f9341177ea574b6/chrome/browser/chromeos/extensions/input_method_event_router.cc

Status: Fixed (was: Started)

Sign in to add a comment