New issue
Advanced search Search tips

Issue 851375 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 9
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug



Sign in to add a comment

Crashed with '--ozone-platform=headless'

Project Member Reported by je_julie.kim@chromium.org, Jun 11 2018

Issue description

Chrome Version: 69.0.3455.0
OS: Linux

What steps will reproduce the problem?
(1) Chrome should be compiled with ozone/headless configuration, 'use_ozone = true' and 'ozone_platform_headless = true'.
(2) Launch Chromium with '--ozone-platform=headless'

What is the expected result?
Launched headless.

What happens instead?
Crashed.

[24424:24424:0611/154134.486484:FATAL:display_finder.cc(42)] Check failed: !displays.empty(). 
#0 0x7fd513dd69fc base::debug::StackTrace::StackTrace()
#1 0x7fd513d2065b logging::LogMessage::~LogMessage()
#2 0x7fd50f9f8833 display::FindDisplayWithBiggestIntersection()
#3 0x7fd50fa026c5 display::ScreenBase::GetDisplayMatching()
#4 0x55ccb65f9e7f WindowSizer::GetSavedWindowBounds()
#5 0x55ccb65f9c20 WindowSizer::DetermineWindowBoundsAndShowState()
#6 0x55ccb65f9a5e WindowSizer::GetBrowserWindowBoundsAndShowState()
#7 0x55ccb65fb172 chrome::GetSavedWindowBoundsAndShowState()
#8 0x55ccb66b7727 BrowserFrame::InitBrowserFrame()
#9 0x55ccb66f7aa5 BrowserWindow::CreateBrowserWindow()
#10 0x55ccb6508c84 Browser::Browser()
#11 0x55ccb56f2057 SessionRestoreImpl::CreateRestoredBrowser()
#12 0x55ccb56f170e SessionRestoreImpl::ProcessSessionWindows()
#13 0x55ccb56efe5a SessionRestoreImpl::Restore()
#14 0x55ccb56ef925 SessionRestore::RestoreSession()
#15 0x55ccb6549a0b StartupBrowserCreatorImpl::RestoreOrCreateBrowser()
#16 0x55ccb6548b55 StartupBrowserCreatorImpl::DetermineURLsAndLaunch()
#17 0x55ccb654853d StartupBrowserCreatorImpl::Launch()
#18 0x55ccb6545523 StartupBrowserCreator::LaunchBrowser()

 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 18 2018

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

commit 18e426c18999c4ab7337eab6ac27df442e3c9a1a
Author: Julie Jeongeun Kim <jkim@igalia.com>
Date: Mon Jun 18 03:52:01 2018

[ozone/headless] Add initial display fetch support for headless

Each Ozone platform creates its own NativeDisplayDelegate to get
display information. Otherwise, 'display::FakeDisplayDelegate' is
used for NativeDisplayDelegate.

Per bug, ozone headless is crashing because it uses
FakeDisplayDelegate and it doesn't invoke OnConfigurationChanged
before initialization completes so ScreenBase can't add the display.
Once NativeDisplayDelegate is initialized, DesktopScreenOzone
requires DisplayMode from DisplaySnapshot but FakeDisplayDelegate has
FakeDisplaySnapshot and it doesn't have DisplayMode.

This CL creates HeadlessNativeDisplayDelegate which owns
DisplaySnapshot and DisplayMode for ozone/headless.
DesktopScreenOzone keeps it in delegate_ and communicates with it.

To try this, compile with the following gn args
use_ozone = true
ozone_platform_headless = true

TEST=./out/Debug/chrome --ozone-platform=headless

Bug:  851375 
Change-Id: Ib0d6dc66e6d9c538db38e1c6f04c35b149f9b6e6
Reviewed-on: https://chromium-review.googlesource.com/1094851
Reviewed-by: Robert Kroeger <rjkroege@chromium.org>
Commit-Queue: Julie Jeongeun Kim <jkim@igalia.com>
Cr-Commit-Position: refs/heads/master@{#567929}
[modify] https://crrev.com/18e426c18999c4ab7337eab6ac27df442e3c9a1a/ui/ozone/platform/headless/BUILD.gn
[add] https://crrev.com/18e426c18999c4ab7337eab6ac27df442e3c9a1a/ui/ozone/platform/headless/headless_native_display_delegate.cc
[add] https://crrev.com/18e426c18999c4ab7337eab6ac27df442e3c9a1a/ui/ozone/platform/headless/headless_native_display_delegate.h
[modify] https://crrev.com/18e426c18999c4ab7337eab6ac27df442e3c9a1a/ui/ozone/platform/headless/ozone_platform_headless.cc

Project Member

Comment 2 by bugdroid1@chromium.org, Jun 28 2018

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

commit c7b616fdf6d5ed4e026b6038e8c35caa821ef0c5
Author: Michael Spang <spang@chromium.org>
Date: Thu Jun 28 20:02:48 2018

Revert "[ozone/headless] Add initial display fetch support for headless"

This reverts commit 18e426c18999c4ab7337eab6ac27df442e3c9a1a.

Reason for revert: ozone_demo --ozone-platform=headless crashes immediately and for multiple reasons

Original change's description:
> [ozone/headless] Add initial display fetch support for headless
>
> Each Ozone platform creates its own NativeDisplayDelegate to get
> display information. Otherwise, 'display::FakeDisplayDelegate' is
> used for NativeDisplayDelegate.
>
> Per bug, ozone headless is crashing because it uses
> FakeDisplayDelegate and it doesn't invoke OnConfigurationChanged
> before initialization completes so ScreenBase can't add the display.
> Once NativeDisplayDelegate is initialized, DesktopScreenOzone
> requires DisplayMode from DisplaySnapshot but FakeDisplayDelegate has
> FakeDisplaySnapshot and it doesn't have DisplayMode.
>
> This CL creates HeadlessNativeDisplayDelegate which owns
> DisplaySnapshot and DisplayMode for ozone/headless.
> DesktopScreenOzone keeps it in delegate_ and communicates with it.
>
> To try this, compile with the following gn args
> use_ozone = true
> ozone_platform_headless = true
>
> TEST=./out/Debug/chrome --ozone-platform=headless
>
> Bug:  851375 
> Change-Id: Ib0d6dc66e6d9c538db38e1c6f04c35b149f9b6e6
> Reviewed-on: https://chromium-review.googlesource.com/1094851
> Reviewed-by: Robert Kroeger <rjkroege@chromium.org>
> Commit-Queue: Julie Jeongeun Kim <jkim@igalia.com>
> Cr-Commit-Position: refs/heads/master@{#567929}

TBR=rjkroege@chromium.org,jkim@igalia.com

Bug:  851375 
Change-Id: Ib5b05d46652cb4e413f8d79bfe4d8fec2737b88a
Reviewed-on: https://chromium-review.googlesource.com/1118787
Reviewed-by: Michael Spang <spang@chromium.org>
Commit-Queue: Michael Spang <spang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#571237}
[modify] https://crrev.com/c7b616fdf6d5ed4e026b6038e8c35caa821ef0c5/ui/ozone/platform/headless/BUILD.gn
[delete] https://crrev.com/49ac4812986f8d49ba458461610dd59ebe80b493/ui/ozone/platform/headless/headless_native_display_delegate.cc
[delete] https://crrev.com/49ac4812986f8d49ba458461610dd59ebe80b493/ui/ozone/platform/headless/headless_native_display_delegate.h
[modify] https://crrev.com/c7b616fdf6d5ed4e026b6038e8c35caa821ef0c5/ui/ozone/platform/headless/ozone_platform_headless.cc

Project Member

Comment 3 by bugdroid1@chromium.org, Jul 4

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

commit 7dbf2eaed9b078f9b45e01a9d7ffcf9cd95a68a8
Author: Julie Jeongeun Kim <jkim@igalia.com>
Date: Wed Jul 04 05:53:29 2018

[ozone/headless] Add initial display fetch support for headless

Each Ozone platform creates its own NativeDisplayDelegate to get
display information. Otherwise, 'display::FakeDisplayDelegate' is
used for NativeDisplayDelegate.

Per bug, ozone headless is crashing because it uses
FakeDisplayDelegate and it doesn't invoke OnConfigurationChanged
before initialization completes so ScreenBase can't add the display.
Once NativeDisplayDelegate is initialized, DesktopScreenOzone
requires DisplayMode from DisplaySnapshot but FakeDisplayDelegate has
FakeDisplaySnapshot and it doesn't have DisplayMode.

This CL creates HeadlessNativeDisplayDelegate which owns
DisplaySnapshot and DisplayMode for ozone/headless.
DesktopScreenOzone keeps it in delegate_ and communicates with it.

To try this, compile with the following gn args
use_ozone = true
ozone_platform_headless = true

TEST=./out/Debug/chrome --ozone-platform=headless

Bug:  851375 
Change-Id: I2c097bf54fafb2d9311919647801e401c59ba929
Reviewed-on: https://chromium-review.googlesource.com/1120447
Commit-Queue: Julie Jeongeun Kim <jkim@igalia.com>
Reviewed-by: Michael Spang <spang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#572488}
[modify] https://crrev.com/7dbf2eaed9b078f9b45e01a9d7ffcf9cd95a68a8/ui/ozone/platform/headless/BUILD.gn
[add] https://crrev.com/7dbf2eaed9b078f9b45e01a9d7ffcf9cd95a68a8/ui/ozone/platform/headless/headless_native_display_delegate.cc
[add] https://crrev.com/7dbf2eaed9b078f9b45e01a9d7ffcf9cd95a68a8/ui/ozone/platform/headless/headless_native_display_delegate.h
[modify] https://crrev.com/7dbf2eaed9b078f9b45e01a9d7ffcf9cd95a68a8/ui/ozone/platform/headless/ozone_platform_headless.cc

Status: Fixed (was: Assigned)
Confirmed that the current ToT works fine with '--ozone-platform=headless' and we can get output screen shot with '--ozone-dump-file=/tmp/'.

Sign in to add a comment