New issue
Advanced search Search tips

Issue 788359 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug



Sign in to add a comment

DCHECK in DisplayResourceProvider::LockForRead when switching Tabs with FullscreenActivity enabled

Project Member Reported by peconn@chromium.org, Nov 24 2017

Issue description

Repro steps:

1. Enable FullscreenActivity activity:
  ./build/android/adb_chrome_public_command_line --enable-features=FullscreenActivity
2. Run Chrome
3. Open a Tab to any website.
4. Open a second tab at a site with video, eg: http://avayvod.github.io/mediaplaybacktest.html
3. Enter fullscreen
4. Leave fullscreen
5. Change to the first Tab, by swiping the omnibox sideways or through the Tab switcher.
6. If that didn't cause a crash, try changing Tabs a few more times.

Failure:
Abort message: '[FATAL:display_resource_provider.cc(398)] Check failed: viz::internal::Resource::NEEDS_WAIT != resource->synchronization_state() (1 vs. 1)

Stack trace from tombstone:
/usr/local/google/code/clankium_lunar/src/cc/resources/display_resource_provider.cc:397
/usr/local/google/code/clankium_lunar/src/cc/resources/display_resource_provider.cc:55
/usr/local/google/code/clankium_lunar/src/components/viz/service/display/overlay_processor.cc:29
/usr/local/google/code/clankium_lunar/src/components/viz/service/display/direct_renderer.cc:287
/usr/local/google/code/clankium_lunar/src/components/viz/service/display/display.cc:341
/usr/local/google/code/clankium_lunar/src/components/viz/service/display/display_scheduler.cc:202
/usr/local/google/code/clankium_lunar/src/components/viz/service/display/display_scheduler.cc:489
 
2017-11-24_11-59-43.mp4
14.8 MB View Download

Comment 1 by danakj@chromium.org, Nov 24 2017

Cc: danakj@chromium.org sunn...@chromium.org piman@chromium.org
Owner: liber...@chromium.org
Status: Assigned (was: Untriaged)
This DCHECK means we're using a resource with a sync token that hasn't been waited on yet. That will cause rendering issues potentially.

This is happening from DisplayResourceProvider::SendPromotionHints()
offhand, i have no idea.  i'll take a look.
this doesn't seem to have anything to do with FullscreenActivity or full screen.  easier repro steps seem to be:

1. play video
2. swipe omnibox.

GLRenderer::BeingDrawingFrame waits for all resources that are used by some quad.  However, when processing overlays, there are some other resources that have requested promotion hints.  these aren't attached to quads, for reasons that aren't clear to me, and are causing the crash.

i'm unsure why there are resources being received from the child that don't also go with a quad.  i suspect that VideoLayerImpl is eliding the quad when it's off-screen, but the resources are set up for it unconditionally.

anyway, i'll make DisplayResourceProvider handle this case better.
Project Member

Comment 4 by bugdroid1@chromium.org, Dec 1 2017

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

commit 00f8ae9ceca3f9918285d431d6320ee7c9701320
Author: liberato@chromium.org <liberato@chromium.org>
Date: Fri Dec 01 23:59:00 2017

Skip promotion hints for unused resources.

If a resource is marked to request a promotion hint, but it isn't
used by any quad, then it might not be synced by GLRenderer before
promotion hints are sent.  In that case, locking the resource for
read will DCHECK.

This CL adds a check for unsynchronized resources, and skips sending
hints for those that aren't synced.

Bug:  788359 
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I54a2d4ced392a313a56f48a1b066ca3f2f62d152
Reviewed-on: https://chromium-review.googlesource.com/794598
Commit-Queue: Frank Liberato <liberato@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521132}
[modify] https://crrev.com/00f8ae9ceca3f9918285d431d6320ee7c9701320/cc/resources/display_resource_provider.cc
[modify] https://crrev.com/00f8ae9ceca3f9918285d431d6320ee7c9701320/cc/resources/display_resource_provider.h
[modify] https://crrev.com/00f8ae9ceca3f9918285d431d6320ee7c9701320/cc/resources/resource_provider.cc
[modify] https://crrev.com/00f8ae9ceca3f9918285d431d6320ee7c9701320/cc/resources/resource_provider.h
[modify] https://crrev.com/00f8ae9ceca3f9918285d431d6320ee7c9701320/cc/resources/resource_provider_unittest.cc
[modify] https://crrev.com/00f8ae9ceca3f9918285d431d6320ee7c9701320/components/viz/service/display/gl_renderer.cc
[modify] https://crrev.com/00f8ae9ceca3f9918285d431d6320ee7c9701320/components/viz/service/display/skia_renderer.cc

Status: Fixed (was: Assigned)

Sign in to add a comment