New issue
Advanced search Search tips

Issue 902601 link

Starred by 1 user

Issue metadata

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

Blocking:
issue 900956



Sign in to add a comment

DCHECK failure when switching to tablet mode when Unified Desktop mode is enabled.

Project Member Reported by afakhry@chromium.org, Nov 7

Issue description

Fails on this DCHECK: https://chromium.googlesource.com/chromium/src/+/HEAD/ash/wm/system_modal_container_layout_manager.cc#82

when the unified host is deleted to switch to mirror mode, when tablet mode starts.

[230143:230143:1102/151222.413260:FATAL:system_modal_container_layout_manager.cc(83)] Check failed: container_->id() != kShellWindowId_LockSystemModalContainer || Shell::Get()->session_controller()->IsUserSessionBlocked(). 
#0 0x7f19300811ef base::debug::StackTrace::StackTrace()
#1 0x7f192ffb335b logging::LogMessage::~LogMessage()
#2 0x7f192989cf5a ash::SystemModalContainerLayoutManager::OnWindowAddedToLayout()
#3 0x7f192b3aad5c aura::Window::AddChild()
#4 0x7f1929753153 ash::RootWindowController::MoveWindowsTo()
#5 0x7f19296e0a74 ash::WindowTreeHostManager::DeleteHost()
#6 0x7f19296e053c ash::WindowTreeHostManager::OnDisplayAdded()
#7 0x7f1929c47785 display::DisplayManager::NotifyDisplayAdded()
#8 0x7f1929c44fa6 display::DisplayManager::UpdateDisplaysWith()
#9 0x7f1929c45c77 display::DisplayManager::ReconfigureDisplays()
#10 0x7f1929c4861e display::DisplayManager::SetMirrorMode()
#11 0x7f19296c6b82 ash::DisplayConfigurationObserver::StartMirrorMode()
#12 0x7f19296936c7 _ZN4base8internal7InvokerINS0_9BindStateIMN3ash32AssistantScreenContextControllerEFvvEJNS_7WeakPtrIS4_EEEEEFvvEE7RunOnceEPNS0_13BindStateBaseE
#13 0x7f192ff9663a base::debug::TaskAnnotator::RunTask()
#14 0x7f192ffc1d8f base::MessageLoop::RunTask()
#15 0x7f192ffc2183 base::MessageLoop::DoWork()
#16 0x7f19300a49f9 base::MessagePumpLibevent::Run()
#17 0x7f192ffc1934 base::MessageLoop::Run()
#18 0x7f192fff48e9 base::RunLoop::Run()
#19 0x5614a46e6d9d ChromeBrowserMainParts::MainMessageLoopRun()
#20 0x7f192d958777 content::BrowserMainLoop::RunMainMessageLoopParts()
#21 0x7f192d95b276 content::BrowserMainRunnerImpl::Run()
#22 0x7f192d954d59 content::BrowserMain()
#23 0x7f192e487d66 content::ContentMainRunnerImpl::Run()
#24 0x7f191efa0e56 service_manager::Main()
#25 0x7f192e486054 content::ContentMain()
#26 0x5614a388c4c3 ChromeMain
#27 0x7f191f59b2b1 __libc_start_main
#28 0x5614a388c33a _start
 
Turns out that the captive portal dialog widget is created and never destroyed. This is where it gets created:


#4 0x55c661f635e8 chromeos::CaptivePortalDialogDelegate::CaptivePortalDialogDelegate()
#5 0x55c661f62e52 chromeos::OobeUIDialogDelegate::OobeUIDialogDelegate()
#6 0x55c661f57ed6 chromeos::LoginDisplayHostMojo::LoadOobeDialog()
#7 0x55c661f57e65 chromeos::LoginDisplayHostMojo::LoginDisplayHostMojo()
#8 0x55c661f5e41c chromeos::(anonymous namespace)::ShowLoginWizardFinish()
#9 0x55c661f5db96 chromeos::ShowLoginWizard()
#10 0x55c661f3d9c0 chromeos::ChromeSessionManager::Initialize()
#11 0x55c661de850f chromeos::ChromeBrowserMainPartsChromeos::PostProfileInit()
#12 0x55c66244442d ChromeBrowserMainParts::PreMainMessageLoopRunImpl()
#13 0x55c6624437d5 ChromeBrowserMainParts::PreMainMessageLoopRun()
#14 0x55c661de7665 chromeos::ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun()
#15 0x7f7c3015591a content::BrowserMainLoop::PreMainMessageLoopRun()
#16 0x7f7c3064fa85 content::StartupTaskRunner::RunAllTasksNow()
#17 0x7f7c30154441 content::BrowserMainLoop::CreateStartupTasks()
#18 0x7f7c30158040 content::BrowserMainRunnerImpl::Initialize()
#19 0x7f7c30151ff2 content::BrowserMain()
#20 0x7f7c30c87f5b content::ContentMainRunnerImpl::RunServiceManager()
#21 0x7f7c30c87e27 content::ContentMainRunnerImpl::Run()
#22 0x7f7c217d7e56 service_manager::Main()
#23 0x7f7c30c86324 content::ContentMain()
#24 0x55c6615e7043 ChromeMain
#25 0x7f7c21de02b1 __libc_start_main
#26 0x55c6615e6eba _start


This is blocking issue 900956.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Nov 9

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

commit dcb55ce2871fe258d30386a85af754d496dfdb62
Author: Ahmed Fakhry <afakhry@chromium.org>
Date: Fri Nov 09 01:17:39 2018

Fix a crash when switching to tablet mode in Unified Desktop mode

1) The Home Launcher used to use the wrong display ID when in
   Unified Desktop mode.
2) If (1) is fixed, we hit  https://crbug.com/902601 . The captive
   portal dialog widget used to be leaked and never destroyed.
3) If (2) is fixed, we crash on the first attempt to press the
   app list button. The reason is tablet mode triggers a switch
   to mirror mode. This switch happens asynchronously after the
   Home Launcher had already been created. Switching from Unified
   to mirror mode destroys the Unified host and the Home Launcher.
   That's why we need to ensure that the Home Launcher is
   recreated.

BUG=900956,  902601 
TEST=Added a test that crashes without the fix.

Change-Id: If6eb9c2255dfa9d442aa115a3274db2d8a4110d7
Reviewed-on: https://chromium-review.googlesource.com/c/1325389
Commit-Queue: Ahmed Fakhry <afakhry@chromium.org>
Reviewed-by: Weidong Guo <weidongg@chromium.org>
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Reviewed-by: Jacob Dufault <jdufault@chromium.org>
Reviewed-by: Mitsuru Oshima <oshima@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606687}
[modify] https://crrev.com/dcb55ce2871fe258d30386a85af754d496dfdb62/ash/app_list/app_list_controller_impl.cc
[modify] https://crrev.com/dcb55ce2871fe258d30386a85af754d496dfdb62/ash/app_list/app_list_controller_impl.h
[modify] https://crrev.com/dcb55ce2871fe258d30386a85af754d496dfdb62/ash/display/display_configuration_observer.cc
[modify] https://crrev.com/dcb55ce2871fe258d30386a85af754d496dfdb62/ash/display/display_manager_unittest.cc
[modify] https://crrev.com/dcb55ce2871fe258d30386a85af754d496dfdb62/chrome/browser/chromeos/login/ui/oobe_ui_dialog_delegate.cc

Status: Fixed (was: Started)
Project Member

Comment 3 by bugdroid1@chromium.org, Nov 9

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

commit 9f547d178e2b806007b88aa4c70ffe530de94f78
Author: Patrik Höglund <phoglund@chromium.org>
Date: Fri Nov 09 12:47:04 2018

Revert "Fix a crash when switching to tablet mode in Unified Desktop mode"

This reverts commit dcb55ce2871fe258d30386a85af754d496dfdb62.

Reason for revert: Appears to cause crashes in LoginCursorTest.CursorHidden. See https://chromium-swarm.appspot.com/task?id=410f91874d359810&refresh=10&show_raw=1:
BrowserTestBase received signal: Segmentation fault. Backtrace:
#0 0x55c75309100f base::debug::StackTrace::StackTrace()
#1 0x55c752aa8075 content::(anonymous namespace)::DumpStackTraceSignalHandler()
#2 0x7f17e8b21cb0 <unknown>
#3 0x55c751991a1d chromeos::OobeUIDialogDelegate::~OobeUIDialogDelegate()
#4 0x55c751991c8e chromeos::OobeUIDialogDelegate::~OobeUIDialogDelegate()
#5 0x55c7553a6063 views::WebDialogView::OnDialogClosed()
#6 0x55c7553a5d92 views::WebDialogView::WindowClosing()
#7 0x55c752f81eb0 views::Widget::OnNativeWidgetDestroying()
#8 0x55c7548080ff views::DesktopWindowTreeHostMus::CloseNow()

Original change's description:
> Fix a crash when switching to tablet mode in Unified Desktop mode
> 
> 1) The Home Launcher used to use the wrong display ID when in
>    Unified Desktop mode.
> 2) If (1) is fixed, we hit  https://crbug.com/902601 . The captive
>    portal dialog widget used to be leaked and never destroyed.
> 3) If (2) is fixed, we crash on the first attempt to press the
>    app list button. The reason is tablet mode triggers a switch
>    to mirror mode. This switch happens asynchronously after the
>    Home Launcher had already been created. Switching from Unified
>    to mirror mode destroys the Unified host and the Home Launcher.
>    That's why we need to ensure that the Home Launcher is
>    recreated.
> 
> BUG=900956,  902601 
> TEST=Added a test that crashes without the fix.
> 
> Change-Id: If6eb9c2255dfa9d442aa115a3274db2d8a4110d7
> Reviewed-on: https://chromium-review.googlesource.com/c/1325389
> Commit-Queue: Ahmed Fakhry <afakhry@chromium.org>
> Reviewed-by: Weidong Guo <weidongg@chromium.org>
> Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
> Reviewed-by: Jacob Dufault <jdufault@chromium.org>
> Reviewed-by: Mitsuru Oshima <oshima@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#606687}

TBR=xiyuan@chromium.org,oshima@chromium.org,afakhry@chromium.org,jdufault@chromium.org,weidongg@chromium.org

Change-Id: I2e0cacc2c29bbc44e8e8c9dfcb86fd8106c008ff
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 900956,  902601 
Reviewed-on: https://chromium-review.googlesource.com/c/1329004
Reviewed-by: Patrik Höglund <phoglund@chromium.org>
Commit-Queue: Patrik Höglund <phoglund@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606808}
[modify] https://crrev.com/9f547d178e2b806007b88aa4c70ffe530de94f78/ash/app_list/app_list_controller_impl.cc
[modify] https://crrev.com/9f547d178e2b806007b88aa4c70ffe530de94f78/ash/app_list/app_list_controller_impl.h
[modify] https://crrev.com/9f547d178e2b806007b88aa4c70ffe530de94f78/ash/display/display_configuration_observer.cc
[modify] https://crrev.com/9f547d178e2b806007b88aa4c70ffe530de94f78/ash/display/display_manager_unittest.cc
[modify] https://crrev.com/9f547d178e2b806007b88aa4c70ffe530de94f78/chrome/browser/chromeos/login/ui/oobe_ui_dialog_delegate.cc

Project Member

Comment 4 by bugdroid1@chromium.org, Nov 9

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

commit 21e8445bd45b5e4e7b5a4f572df2f12ca1c6346d
Author: Ahmed Fakhry <afakhry@chromium.org>
Date: Fri Nov 09 20:20:48 2018

[Reland] Fix a crash when switching to tablet mode in Unified Desktop mode

1) The Home Launcher used to use the wrong display ID when in
   Unified Desktop mode.
2) If (1) is fixed, we hit  https://crbug.com/902601 . The captive
   portal dialog widget used to be leaked and never destroyed.
3) If (2) is fixed, we crash on the first attempt to press the
   app list button. The reason is tablet mode triggers a switch
   to mirror mode. This switch happens asynchronously after the
   Home Launcher had already been created. Switching from Unified
   to mirror mode destroys the Unified host and the Home Launcher.
   That's why we need to ensure that the Home Launcher is
   recreated.

TBR=oshima@chromium.org,weidongg@chromium.org
BUG=900956,  902601 
TEST=Added a test that crashes without the fix.

Reviewed-on: https://chromium-review.googlesource.com/c/1325389
Commit-Queue: Ahmed Fakhry <afakhry@chromium.org>
Reviewed-by: Weidong Guo <weidongg@chromium.org>
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Reviewed-by: Jacob Dufault <jdufault@chromium.org>
Reviewed-by: Mitsuru Oshima <oshima@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#606687}
Change-Id: Ia0558bf1eba4234535b3826e671929e37db8dee1
Reviewed-on: https://chromium-review.googlesource.com/c/1329550
Reviewed-by: Ahmed Fakhry <afakhry@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606948}
[modify] https://crrev.com/21e8445bd45b5e4e7b5a4f572df2f12ca1c6346d/ash/app_list/app_list_controller_impl.cc
[modify] https://crrev.com/21e8445bd45b5e4e7b5a4f572df2f12ca1c6346d/ash/app_list/app_list_controller_impl.h
[modify] https://crrev.com/21e8445bd45b5e4e7b5a4f572df2f12ca1c6346d/ash/display/display_configuration_observer.cc
[modify] https://crrev.com/21e8445bd45b5e4e7b5a4f572df2f12ca1c6346d/ash/display/display_manager_unittest.cc
[modify] https://crrev.com/21e8445bd45b5e4e7b5a4f572df2f12ca1c6346d/chrome/browser/chromeos/login/ui/oobe_ui_dialog_delegate.cc
[modify] https://crrev.com/21e8445bd45b5e4e7b5a4f572df2f12ca1c6346d/chrome/browser/chromeos/login/ui/oobe_ui_dialog_delegate.h

Sign in to add a comment