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

Issue 676091 link

Starred by 1 user

Issue metadata

Status: Archived
Owner:
Closed: Jan 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

chrome browser cannot be closed / not receiving events

Project Member Reported by riajiang@chromium.org, Dec 20 2016

Issue description

1. Chrome browser cannot be closed.

2. After actions to non-chrome parts, e.g. click close button (unmaximize is fine) and status area widget, chrome browser cannot receive any more events.

 
Cc: -riajiang@chromium.org
Owner: riajiang@chromium.org
Status: Started (was: Available)
settings page also cannot be closed 
Cc: e...@chromium.org
For 2) in the description, unmaximize chrome and click system tray, chrome crashes with stacktrace:

    #0 0x7f26c89d04ef in RequestCaptureState ./out/oxygen/../../chrome/browser/ui/ash/media_client.cc:175:28
    #1 0x7f26c3b8df9f in Accept ./out/oxygen/gen/ash/public/interfaces/media.mojom.cc:403:13
    #2 0x7f26c08755a9 in HandleValidatedMessage ./out/oxygen/../../mojo/public/cpp/bindings/lib/interface_endpoint_client.cc:341:32
    #3 0x7f26c0873d16 in Accept ./out/oxygen/../../mojo/public/cpp/bindings/lib/filter_chain.cc:40:17
    #4 0x7f26c087883e in HandleIncomingMessage ./out/oxygen/../../mojo/public/cpp/bindings/lib/interface_endpoint_client.cc:273:19
    #5 0x7f26c088dc0b in ProcessIncomingMessage ./out/oxygen/../../mojo/public/cpp/bindings/lib/multiplex_router.cc:837:22
    #6 0x7f26c088c95e in Accept ./out/oxygen/../../mojo/public/cpp/bindings/lib/multiplex_router.cc:547:25
    #7 0x7f26c0873d16 in Accept ./out/oxygen/../../mojo/public/cpp/bindings/lib/filter_chain.cc:40:17
    #8 0x7f26c0866ac7 in ReadSingleMessage ./out/oxygen/../../mojo/public/cpp/bindings/lib/connector.cc:247:51
    #9 0x7f26c0867a44 in ReadAllAvailableMessages ./out/oxygen/../../mojo/public/cpp/bindings/lib/connector.cc:272:10
    #10 0x7f26c0867a44 in OnHandleReadyInternal ./out/oxygen/../../mojo/public/cpp/bindings/lib/connector.cc:205:0
    #11 0x7f26c08302ed in Run ./out/oxygen/../../base/callback.h:85:12
    #12 0x7f26c08302ed in OnHandleReady ./out/oxygen/../../mojo/public/cpp/system/watcher.cc:83:0
    #13 0x7f26c08305d6 in Invoke<const base::WeakPtr<mojo::Watcher> &, const unsigned int &> ./out/oxygen/../../base/bind_internal.h:214:12
    #14 0x7f26c0326267 in Run ./out/oxygen/../../base/callback.h:68:12
    #15 0x7f26c0326267 in RunTask ./out/oxygen/../../base/debug/task_annotator.cc:52:0
    #16 0x7f26c03b5936 in RunTask ./out/oxygen/../../base/message_loop/message_loop.cc:421:19
    #17 0x7f26c03b7a14 in DeferOrRunPendingTask ./out/oxygen/../../base/message_loop/message_loop.cc:430:5
    #18 0x7f26c03b7a14 in DoWork ./out/oxygen/../../base/message_loop/message_loop.cc:523:0
    #19 0x7f26c03c24a0 in Run ./out/oxygen/../../base/message_loop/message_pump_libevent.cc:218:31
    #20 0x7f26c03b50d9 in RunHandler ./out/oxygen/../../base/message_loop/message_loop.cc:386:10
    #21 0x7f26c04605f0 in Run ./out/oxygen/../../base/run_loop.cc:37:10
    #22 0x7f26c4833182 in MainMessageLoopRun ./out/oxygen/../../chrome/browser/chrome_browser_main.cc:1987:12
    #23 0x7f26b7d6f1de in RunMainMessageLoopParts ./out/oxygen/../../content/browser/browser_main_loop.cc:1171:29
    #24 0x7f26b7d7a0ba in Run ./out/oxygen/../../content/browser/browser_main_runner.cc:141:17
    #25 0x7f26b7d619ab in BrowserMain ./out/oxygen/../../content/browser/browser_main.cc:46:28
    #26 0x7f26b97f4aac in RunNamedProcessTypeMain ./out/oxygen/../../content/app/content_main_runner.cc:416:14
    #27 0x7f26b97f654d in Run ./out/oxygen/../../content/app/content_main_runner.cc:793:12
    #28 0x7f26b97f306a in ContentMain ./out/oxygen/../../content/app/content_main.cc:20:28
    #29 0x7f26c2675603 in ChromeMain ./out/oxygen/../../chrome/app/chrome_main.cc:112:12
    #30 0x7f26a2baaf44 in __libc_start_main /build/eglibc-oGUzwX/eglibc-2.19/csu/libc-start.c:287:0
because chrome doesn't have access to WmShell.

+cc erg@
Project Member

Comment 3 by bugdroid1@chromium.org, Jan 5 2017

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

commit 655b0a08086da3328bee25e73070fcd30f7e5e9e
Author: riajiang <riajiang@chromium.org>
Date: Thu Jan 05 02:08:17 2017

Fix WindowTreeClient::RequestClose(window_id).

In the new client-lib, non-root windows can also be closed using
WindowTreeClient::RequestClose.
If the window is the root window, we send close request to the entire
WindowTreeHost. Otherwise we ask the delegate of the window to close it.
We are not adding a delegate to the root window because functions
like Window::GetToplevelWindow() would fail.

BUG= 676091 
TEST=aura_unittests

Review-Url: https://codereview.chromium.org/2604453002
Cr-Commit-Position: refs/heads/master@{#441557}

[modify] https://crrev.com/655b0a08086da3328bee25e73070fcd30f7e5e9e/ui/aura/mus/window_tree_client.cc
[modify] https://crrev.com/655b0a08086da3328bee25e73070fcd30f7e5e9e/ui/aura/mus/window_tree_client_unittest.cc

Cc: xiy...@chromium.org
This CL https://codereview.chromium.org/2615663002/ creates chrome version of SessionStateDelegate and ShellContentState so chrome doesn't need to talk to ash. But I found this TODO (https://cs.chromium.org/chromium/src/ash/common/session/session_state_delegate.h?type=cs&q=sessionstatedele&sq=package:chromium&l=29) and CL (https://codereview.chromium.org/2545723003) about using SessionController/Client instead of SessionStateDelegate for mash. After we start to use SessionControllerClient, the crash (https://cs.chromium.org/chromium/src/chrome/browser/ui/ash/media_client.cc?q=media_client.cc&sq=package:chromium&l=175) shouldn't happen anymore.

+cc xiyuan@
MediaClient runs inside chrome. It should use what is available in chrome direclty, i.e. UserManager/SessionManager.

I am still cleaning up the code. After the work, UserManager will only handle user and user meta data and SessionManager will handle the user sessions (i.e. logged in users). And will migrate call sites along the way.

Project Member

Comment 6 by bugdroid1@chromium.org, Jan 10 2017

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

commit 42968739363fbecc9515b3631d2e05ac7046fb02
Author: riajiang <riajiang@chromium.org>
Date: Tue Jan 10 20:43:44 2017

Fix MediaClient::RequestCaptureState().

MediaClient::RequestCaptureState() was failing because chrome
does not have access to ash::SessionStateDelegate and ash::
ShellContentState.

1. Changed places that used ash::SessionStateDelegate to use
UserManager.

2. Changed places that used ash::ShellContentState to use
ChromeShellContentState. Right now the only places in ash that
use ash::ShellContentState are in tests so maybe we can move
ShellContentState to chrome completely in the future.

3. Changed MultiProfileMediaTrayItem and TrayUser in ash to
use SessionController to get the number of logged in users.

BUG= 676091 
TEST=ash_unittests

Review-Url: https://codereview.chromium.org/2615663002
Cr-Commit-Position: refs/heads/master@{#442679}

[modify] https://crrev.com/42968739363fbecc9515b3631d2e05ac7046fb02/ash/mus/bridge/wm_shell_mus.cc
[modify] https://crrev.com/42968739363fbecc9515b3631d2e05ac7046fb02/chrome/browser/ui/ash/chrome_shell_content_state.cc
[modify] https://crrev.com/42968739363fbecc9515b3631d2e05ac7046fb02/chrome/browser/ui/ash/chrome_shell_content_state.h
[modify] https://crrev.com/42968739363fbecc9515b3631d2e05ac7046fb02/chrome/browser/ui/ash/chrome_shell_content_state_chromeos.cc
[modify] https://crrev.com/42968739363fbecc9515b3631d2e05ac7046fb02/chrome/browser/ui/ash/media_client.cc
[modify] https://crrev.com/42968739363fbecc9515b3631d2e05ac7046fb02/chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc
[modify] https://crrev.com/42968739363fbecc9515b3631d2e05ac7046fb02/chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.h

Status: Fixed (was: Started)

Comment 8 by dchan@google.com, Mar 4 2017

Labels: VerifyIn-58

Comment 9 by dchan@google.com, Apr 17 2017

Labels: VerifyIn-59

Comment 10 by dchan@google.com, May 30 2017

Labels: VerifyIn-60
Labels: VerifyIn-61

Comment 12 by dchan@chromium.org, Oct 14 2017

Status: Archived (was: Fixed)

Sign in to add a comment