New issue
Advanced search Search tips

Issue 866729 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 28
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

webrunner crashes when a View is destroyed.

Project Member Reported by sergeyu@chromium.org, Jul 24

Issue description

Repro steps:
1. Build and install webrunner on fuchsia device
2. run -d tiles
3. tiles_ctl add https://google.com
4. tiles_ctl remove <tile_id>
5. Observe Context process crashing with the following stack:

0x4ff083e ui::Compositor::ReleaseAcceleratedWidget() at compositor.cc:?
0x4fee24a non-virtual thunk to aura::WindowTreeHostPlatform::OnAcceleratedWidgetDestroyed() at window_tree_host_platform.cc:?
0x22f87cd ui::ScenicWindow::~ScenicWindow() at scenic_window.cc:?
0x22f88d9 ui::ScenicWindow::~ScenicWindow() at scenic_window.cc:?
0x4fed938 aura::WindowTreeHostPlatform::~WindowTreeHostPlatform() at window_tree_host_platform.cc:?
0x4fed999 aura::WindowTreeHostPlatform::~WindowTreeHostPlatform() at window_tree_host_platform.cc:?
0x3e952bc webrunner::FrameImpl::~FrameImpl() at frame_impl.cc:?

The problem is that WindowTreeHostPlatform destroys compositor and then the PlatformWindow, but then assumes that the compositor still exists OnAcceleratedWidgetDestroyed(). 

It looks like most ozone platforms don't call OnAcceleratedWidgetDestroyed() and that's the reason it doesn't crash on other platforms. OnAcceleratedWidgetDestroyed() doesn't seem to be useful, so it looks like the right way to fix it is to remove OnAcceleratedWidgetDestroyed().

tiles_ctl remove closes the view. 
 
Summary: webrunner crashes when a View is destroyed. (was: webrunner crashes when )
Labels: -Pri-3 M-70 Pri-1
Project Member

Comment 3 by bugdroid1@chromium.org, Jul 28

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

commit 1145eee58e747a2103eda9c2068b9c729301228b
Author: Sergey Ulanov <sergeyu@chromium.org>
Date: Sat Jul 28 01:17:32 2018

Cleanup ui::PlatformWindowDelegate interface.

Some cleanups for the ui::PlatformWindowDelegate interface
1. Removed device_pixel_ratio parameter from
   OnAcceleratedWidgetAvailable. It wasn't used anywhere and the passed
   value was incorrect for most PlatformWindow implementations.
2. Removed OnAcceleratedWidgetDestroying() - it wasn't used anywhere.
3. Clarified OnAcceleratedWidgetDestroyed() should not to be called
   from destructor. It's only useful on Android. Wayland and scenic
   implementations were calling it incorrectly in destructor. This also
   fixes the crash in the attached bug.

TBR=piman@chromium.org (trivial change in //gpu)

Bug:  866729 
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I164888802c65295bd07d9aa8d882332bbacbdbd9
Reviewed-on: https://chromium-review.googlesource.com/1147754
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578888}
[modify] https://crrev.com/1145eee58e747a2103eda9c2068b9c729301228b/components/viz/service/display_embedder/software_output_device_ozone_unittest.cc
[modify] https://crrev.com/1145eee58e747a2103eda9c2068b9c729301228b/gpu/ipc/service/direct_composition_surface_win_unittest.cc
[modify] https://crrev.com/1145eee58e747a2103eda9c2068b9c729301228b/ui/aura/mus/window_tree_host_mus.cc
[modify] https://crrev.com/1145eee58e747a2103eda9c2068b9c729301228b/ui/aura/window_tree_host_platform.cc
[modify] https://crrev.com/1145eee58e747a2103eda9c2068b9c729301228b/ui/aura/window_tree_host_platform.h
[modify] https://crrev.com/1145eee58e747a2103eda9c2068b9c729301228b/ui/compositor/test/test_compositor_host_ozone.cc
[modify] https://crrev.com/1145eee58e747a2103eda9c2068b9c729301228b/ui/gl/gl_surface_egl_unittest.cc
[modify] https://crrev.com/1145eee58e747a2103eda9c2068b9c729301228b/ui/ozone/demo/demo_window.cc
[modify] https://crrev.com/1145eee58e747a2103eda9c2068b9c729301228b/ui/ozone/demo/demo_window.h
[modify] https://crrev.com/1145eee58e747a2103eda9c2068b9c729301228b/ui/ozone/platform/cast/platform_window_cast.cc
[modify] https://crrev.com/1145eee58e747a2103eda9c2068b9c729301228b/ui/ozone/platform/drm/host/drm_window_host.cc
[modify] https://crrev.com/1145eee58e747a2103eda9c2068b9c729301228b/ui/ozone/platform/headless/headless_window.cc
[modify] https://crrev.com/1145eee58e747a2103eda9c2068b9c729301228b/ui/ozone/platform/magma/magma_window.cc
[modify] https://crrev.com/1145eee58e747a2103eda9c2068b9c729301228b/ui/ozone/platform/scenic/scenic_window.cc
[modify] https://crrev.com/1145eee58e747a2103eda9c2068b9c729301228b/ui/ozone/platform/wayland/wayland_pointer_unittest.cc
[modify] https://crrev.com/1145eee58e747a2103eda9c2068b9c729301228b/ui/ozone/platform/wayland/wayland_test.cc
[modify] https://crrev.com/1145eee58e747a2103eda9c2068b9c729301228b/ui/ozone/platform/wayland/wayland_window.cc
[modify] https://crrev.com/1145eee58e747a2103eda9c2068b9c729301228b/ui/ozone/platform/wayland/wayland_window_unittest.cc
[modify] https://crrev.com/1145eee58e747a2103eda9c2068b9c729301228b/ui/ozone/platform/x11/x11_window_ozone_unittest.cc
[modify] https://crrev.com/1145eee58e747a2103eda9c2068b9c729301228b/ui/ozone/test/mock_platform_window_delegate.h
[modify] https://crrev.com/1145eee58e747a2103eda9c2068b9c729301228b/ui/platform_window/android/platform_window_android.cc
[modify] https://crrev.com/1145eee58e747a2103eda9c2068b9c729301228b/ui/platform_window/platform_window_delegate.h
[modify] https://crrev.com/1145eee58e747a2103eda9c2068b9c729301228b/ui/platform_window/stub/stub_window.cc
[modify] https://crrev.com/1145eee58e747a2103eda9c2068b9c729301228b/ui/platform_window/win/win_window.cc
[modify] https://crrev.com/1145eee58e747a2103eda9c2068b9c729301228b/ui/platform_window/x11/x11_window_base.cc
[modify] https://crrev.com/1145eee58e747a2103eda9c2068b9c729301228b/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc
[modify] https://crrev.com/1145eee58e747a2103eda9c2068b9c729301228b/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.h

Status: Fixed (was: Started)

Sign in to add a comment