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

Issue 778440 link

Starred by 3 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Check failed: !draw_properties().screen_space_transform_is_animating.

Project Member Reported by trchen@chromium.org, Oct 25 2017

Issue description

What steps will reproduce the problem?
(1) Launch a debug version of Chrome and load: https://play.google.com/video/lava/tv
(2) Navigate through the UI. Sometimes I hit the DCHECK() immediately, other times it takes 5-10 s of scrolling.

What is the expected result?
Chromium should not crash.

What happens instead?
Check failed: !draw_properties().screen_space_transform_is_animating.

Thanks Jason for reporting!

This is weird because in PictureLayer::ShouldUseTransformedRasterization() we should have return false if (transform_node->to_screen_is_potentially_animated). Yet we reached the check with animating screen transform.

Anyone has a quick guess why we can have draw_properties().screen_space_transform_is_animating (at impl-side)
!transform_node->to_screen_is_potentially_animated (at main-side)
at the same time?
 

Comment 1 by ajuma@chromium.org, Oct 26 2017

I wonder if PushProperties isn't getting called on that PictureLayer at commit time, so we're not updating the value of use_transformed_rasterization_. Just having an animation start on the layer's transform node (or an ancestor node) wouldn't be enough to trigger PushProperties on the layer.

Comment 2 by danakj@chromium.org, Oct 27 2017

Status: Assigned (was: Untriaged)
I've also been hitting this DCHECK failure fairly frequently over the last few days in a ToT debug build while looking into an unrelated issue in our web app. Not a big deal as I've commented it out for now but adding the stack trace here in case it's different from the reporter's.

[0405/083735.557512:FATAL:picture_layer_impl.cc(1412)] Check failed: !draw_properties().screen_space_transform_is_animating.
0   libbase.dylib                       0x0000000104875a1e base::debug::StackTrace::StackTrace(unsigned long) + 174
1   libbase.dylib                       0x0000000104875add base::debug::StackTrace::StackTrace(unsigned long) + 29
2   libbase.dylib                       0x0000000104873f8c base::debug::StackTrace::StackTrace() + 28
3   libbase.dylib                       0x000000010490ff9c logging::LogMessage::~LogMessage() + 460
4   libbase.dylib                       0x000000010490dd05 logging::LogMessage::~LogMessage() + 21
5   libcc.dylib                         0x000000010a10dd82 cc::PictureLayerImpl::CalculateRasterTranslation(float) + 242
6   libcc.dylib                         0x000000010a109b46 cc::PictureLayerImpl::AddTilingsForRasterScale() + 182
7   libcc.dylib                         0x000000010a1078ef cc::PictureLayerImpl::UpdateTiles() + 287
8   libcc.dylib                         0x000000010a408cc3 cc::LayerTreeImpl::UpdateDrawProperties(bool) + 4691
9   libcc.dylib                         0x000000010a395bc1 cc::LayerTreeHostImpl::UpdateSyncTreeAfterCommitOrImplSideInvalidation() + 113
10  libcc.dylib                         0x000000010a3959e7 cc::LayerTreeHostImpl::CommitComplete() + 423
11  libcc.dylib                         0x000000010a4a96f9 cc::ProxyImpl::ScheduledActionCommit() + 1321
12  libcc.dylib                         0x000000010a21c09f cc::Scheduler::ProcessScheduledActions() + 1231
13  libcc.dylib                         0x000000010a21dac6 cc::Scheduler::NotifyReadyToCommit() + 310
14  libcc.dylib                         0x000000010a4a432f cc::ProxyImpl::NotifyReadyToCommitOnImpl(cc::CompletionEvent*, cc::LayerTreeHost*, base::TimeTicks, bool) + 1743
15  libcc.dylib                         0x000000010a4bc6f1 void base::internal::FunctorTraits<void (cc::ProxyImpl::*)(cc::CompletionEvent*, cc::LayerTreeHost*, base::TimeTicks, bool), void>::Invoke<cc::ProxyImpl*, cc::CompletionEvent*, cc::LayerTreeHost*, base::TimeTicks, bool>(void (cc::ProxyImpl::*)(cc::CompletionEvent*, cc::LayerTreeHost*, base::TimeTicks, bool), cc::ProxyImpl*&&, cc::CompletionEvent*&&, cc::LayerTreeHost*&&, base::TimeTicks&&, bool&&) + 273
16  libcc.dylib                         0x000000010a4bc571 void base::internal::InvokeHelper<false, void>::MakeItSo<void (cc::ProxyImpl::*)(cc::CompletionEvent*, cc::LayerTreeHost*, base::TimeTicks, bool), cc::ProxyImpl*, cc::CompletionEvent*, cc::LayerTreeHost*, base::TimeTicks, bool>(void (cc::ProxyImpl::*&&)(cc::CompletionEvent*, cc::LayerTreeHost*, base::TimeTicks, bool), cc::ProxyImpl*&&, cc::CompletionEvent*&&, cc::LayerTreeHost*&&, base::TimeTicks&&, bool&&) + 161
17  libcc.dylib                         0x000000010a4bc4a1 void base::internal::Invoker<base::internal::BindState<void (cc::ProxyImpl::*)(cc::CompletionEvent*, cc::LayerTreeHost*, base::TimeTicks, bool), base::internal::UnretainedWrapper<cc::ProxyImpl>, cc::CompletionEvent*, cc::LayerTreeHost*, base::TimeTicks, bool>, void ()>::RunImpl<void (cc::ProxyImpl::*)(cc::CompletionEvent*, cc::LayerTreeHost*, base::TimeTicks, bool), std::__1::tuple<base::internal::UnretainedWrapper<cc::ProxyImpl>, cc::CompletionEvent*, cc::LayerTreeHost*, base::TimeTicks, bool>, 0ul, 1ul, 2ul, 3ul, 4ul>(void (cc::ProxyImpl::*&&)(cc::CompletionEvent*, cc::LayerTreeHost*, base::TimeTicks, bool), std::__1::tuple<base::internal::UnretainedWrapper<cc::ProxyImpl>, cc::CompletionEvent*, cc::LayerTreeHost*, base::TimeTicks, bool>&&, std::__1::integer_sequence<unsigned long, 0ul, 1ul, 2ul, 3ul, 4ul>) + 337
18  libcc.dylib                         0x000000010a4bc2a9 base::internal::Invoker<base::internal::BindState<void (cc::ProxyImpl::*)(cc::CompletionEvent*, cc::LayerTreeHost*, base::TimeTicks, bool), base::internal::UnretainedWrapper<cc::ProxyImpl>, cc::CompletionEvent*, cc::LayerTreeHost*, base::TimeTicks, bool>, void ()>::RunOnce(base::internal::BindStateBase*) + 57
19  libbase.dylib                       0x000000010481651c base::OnceCallback<void ()>::Run() && + 92
20  libbase.dylib                       0x0000000104878053 base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) + 947
21  libblink_platform.dylib             0x0000000145e261cc blink::scheduler::internal::ThreadControllerImpl::DoWork(blink::scheduler::internal::SequencedTaskSource::WorkType) + 1084
22  libblink_platform.dylib             0x0000000145e29571 void base::internal::FunctorTraits<void (blink::scheduler::internal::ThreadControllerImpl::*)(blink::scheduler::internal::SequencedTaskSource::WorkType), void>::Invoke<base::WeakPtr<blink::scheduler::internal::ThreadControllerImpl> const&, blink::scheduler::internal::SequencedTaskSource::WorkType const&>(void (blink::scheduler::internal::ThreadControllerImpl::*)(blink::scheduler::internal::SequencedTaskSource::WorkType), base::WeakPtr<blink::scheduler::internal::ThreadControllerImpl> const&&&, blink::scheduler::internal::SequencedTaskSource::WorkType const&&&) + 145
23  libblink_platform.dylib             0x0000000145e29475 void base::internal::InvokeHelper<true, void>::MakeItSo<void (blink::scheduler::internal::ThreadControllerImpl::* const&)(blink::scheduler::internal::SequencedTaskSource::WorkType), base::WeakPtr<blink::scheduler::internal::ThreadControllerImpl> const&, blink::scheduler::internal::SequencedTaskSource::WorkType const&>(void (blink::scheduler::internal::ThreadControllerImpl::* const&&&)(blink::scheduler::internal::SequencedTaskSource::WorkType), base::WeakPtr<blink::scheduler::internal::ThreadControllerImpl> const&&&, blink::scheduler::internal::SequencedTaskSource::WorkType const&&&) + 117
24  libblink_platform.dylib             0x0000000145e293ed void base::internal::Invoker<base::internal::BindState<void (blink::scheduler::internal::ThreadControllerImpl::*)(blink::scheduler::internal::SequencedTaskSource::WorkType), base::WeakPtr<blink::scheduler::internal::ThreadControllerImpl>, blink::scheduler::internal::SequencedTaskSource::WorkType>, void ()>::RunImpl<void (blink::scheduler::internal::ThreadControllerImpl::* const&)(blink::scheduler::internal::SequencedTaskSource::WorkType), std::__1::tuple<base::WeakPtr<blink::scheduler::internal::ThreadControllerImpl>, blink::scheduler::internal::SequencedTaskSource::WorkType> const&, 0ul, 1ul>(void (blink::scheduler::internal::ThreadControllerImpl::* const&&&)(blink::scheduler::internal::SequencedTaskSource::WorkType), std::__1::tuple<base::WeakPtr<blink::scheduler::internal::ThreadControllerImpl>, blink::scheduler::internal::SequencedTaskSource::WorkType> const&&&, std::__1::integer_sequence<unsigned long, 0ul, 1ul>) + 125
25  libblink_platform.dylib             0x0000000145e292fc base::internal::Invoker<base::internal::BindState<void (blink::scheduler::internal::ThreadControllerImpl::*)(blink::scheduler::internal::SequencedTaskSource::WorkType), base::WeakPtr<blink::scheduler::internal::ThreadControllerImpl>, blink::scheduler::internal::SequencedTaskSource::WorkType>, void ()>::Run(base::internal::BindStateBase*) + 44
26  libblink_platform.dylib             0x0000000145e2a16d base::RepeatingCallback<void ()>::Run() const & + 61
27  libblink_platform.dylib             0x0000000145e29f35 void base::internal::CancelableCallbackImpl<base::RepeatingCallback<void ()> >::ForwardRepeating<>() + 21
28  libblink_platform.dylib             0x0000000145e2a3af void base::internal::FunctorTraits<void (base::internal::CancelableCallbackImpl<base::RepeatingCallback<void ()> >::*)(), void>::Invoke<base::WeakPtr<base::internal::CancelableCallbackImpl<base::RepeatingCallback<void ()> > > const&>(void (base::internal::CancelableCallbackImpl<base::RepeatingCallback<void ()> >::*)(), base::WeakPtr<base::internal::CancelableCallbackImpl<base::RepeatingCallback<void ()> > > const&&&) + 127
29  libblink_platform.dylib             0x0000000145e2a2ca void base::internal::InvokeHelper<true, void>::MakeItSo<void (base::internal::CancelableCallbackImpl<base::RepeatingCallback<void ()> >::* const&)(), base::WeakPtr<base::internal::CancelableCallbackImpl<base::RepeatingCallback<void ()> > > const&>(void (base::internal::CancelableCallbackImpl<base::RepeatingCallback<void ()> >::* const&&&)(), base::WeakPtr<base::internal::CancelableCallbackImpl<base::RepeatingCallback<void ()> > > const&&&) + 90
30  libblink_platform.dylib             0x0000000145e2a260 void base::internal::Invoker<base::internal::BindState<void (base::internal::CancelableCallbackImpl<base::RepeatingCallback<void ()> >::*)(), base::WeakPtr<base::internal::CancelableCallbackImpl<base::RepeatingCallback<void ()> > > >, void ()>::RunImpl<void (base::internal::CancelableCallbackImpl<base::RepeatingCallback<void ()> >::* const&)(), std::__1::tuple<base::WeakPtr<base::internal::CancelableCallbackImpl<base::RepeatingCallback<void ()> > > > const&, 0ul>(void (base::internal::CancelableCallbackImpl<base::RepeatingCallback<void ()> >::* const&&&)(), std::__1::tuple<base::WeakPtr<base::internal::CancelableCallbackImpl<base::RepeatingCallback<void ()> > > > const&&&, std::__1::integer_sequence<unsigned long, 0ul>) + 80
31  libblink_platform.dylib             0x0000000145e2a1ac base::internal::Invoker<base::internal::BindState<void (base::internal::CancelableCallbackImpl<base::RepeatingCallback<void ()> >::*)(), base::WeakPtr<base::internal::CancelableCallbackImpl<base::RepeatingCallback<void ()> > > >, void ()>::Run(base::internal::BindStateBase*) + 44
32  libbase.dylib                       0x000000010481651c base::OnceCallback<void ()>::Run() && + 92
33  libbase.dylib                       0x0000000104878053 base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) + 947
34  libbase.dylib                       0x000000010495b1ca base::internal::IncomingTaskQueue::RunTask(base::PendingTask*) + 234
35  libbase.dylib                       0x0000000104967e66 base::MessageLoop::RunTask(base::PendingTask*) + 886
36  libbase.dylib                       0x0000000104968439 base::MessageLoop::DeferOrRunPendingTask(base::PendingTask) + 89
37  libbase.dylib                       0x0000000104968abd base::MessageLoop::DoDelayedWork(base::TimeTicks*) + 605
38  libbase.dylib                       0x0000000104971115 base::MessagePumpDefault::Run(base::MessagePump::Delegate*) + 133
39  libbase.dylib                       0x000000010496761d base::MessageLoop::Run(bool) + 573
40  libbase.dylib                       0x0000000104a6c92e base::RunLoop::Run() + 606
41  libbase.dylib                       0x0000000104b6fbb9 base::Thread::Run(base::RunLoop*) + 393
42  libbase.dylib                       0x0000000104b70906 base::Thread::ThreadMain() + 2534
43  libbase.dylib                       0x0000000104b6100a base::(anonymous namespace)::ThreadFunc(void*) + 682
44  libsystem_pthread.dylib             0x00007fff5bc37661 _pthread_body + 340
45  libsystem_pthread.dylib             0x00007fff5bc3750d _pthread_body + 0
46  libsystem_pthread.dylib             0x00007fff5bc36bf9 thread_start + 13
My team is hitting this as well, in two different situations:
b/111931316
b/111257797
I'm not sure that this is what's going on in either of these particular cases, but it does seem possible to get into this function while something is animating after ResetRasterScale has clobbered the raster scale and it needs to recalculate everything.

There are also a lot of reasons in ShouldAdjustRasterScale where we might decide to adjust the raster scale even if we're animating.
Sorry for the late reply. I was OoO for a couple of days.

Yes there are various reasons we recalculate raster scale in the impl-thread, but the purpose of that DCHECK was to ensure we only enable translated rasterization when conditions are ideal, for example, it only makes sense to translate if there is no ongoing animation.

Breaking the assumption is not really a critical error. It's just that the anti-aliasing behavior may be different. It could ends up in either better quality or worse quality.

However it is curious how we can ever hit that DCHECK, since we explicitly disable translated rasterization if we knew a layer is animating at commit. Hitting that DCHECK implies something unknown to the developer happened, and we'd better figure out.

enne: Is it possible for a new animation to start after a commit has been done?

As the DCHECK is now annoying to developers on debug builds, and we actually found a good repro from the bug report, I think it is the best to disable the DCHECK while we investigate.
Cc: seantopping@chromium.org
I think it is possible for an animation to start after commit.  However, if the comment on DrawProperties is true, then screen_space_transform_is_animating should not change from false to true on the compositor thread as it should be "potentially animating" in both places.
Yes I thought that's the case. It is puzzling because we did check for potential animation before enabling translated rasterization. :/

https://cs.chromium.org/chromium/src/cc/layers/picture_layer.cc?rcl=e9d7585854044bf36097599265b7d53bcce6dd95&l=275

It is nice that we now have a reliable repro. Though it is quite big I'll need to boil it down.
Hmm I wasn't able to repro using the instruction here https://buganizer.corp.google.com/issues/111931316#comment6 on upstream source. It probably depends on some internal call only available to cast_shell?

skobes@ mentioned that it may be smooth scrolling creating an animation on impl-side. I just looked at the possibility but turns out it's not it. Smooth scrolling creates a scroll offset animation, which is not considered as transform animation by cc. Things are in mystery again. :/
Cc: susan.boorgula@chromium.org
 Issue 877851  has been merged into this issue.
Owner: enne@chromium.org
I'm leaving the team, thus re-assigning.
Cc: enne@chromium.org
Owner: ----
Status: Available (was: Assigned)
Project Member

Comment 14 by bugdroid1@chromium.org, Sep 19

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

commit 8f7b4562043922f6235ef3c1662adacac4425ccb
Author: Adrienne Walker <enne@chromium.org>
Date: Wed Sep 19 18:17:51 2018

cc: Remove DCHECKs from PLI::CalculateRasterTranslation

These DCHECKs are sometimes being hit in practice, which says that they
should not be DCHECKs.  Because these are low priority mysteries, remove
the DCHECKs and just add an early out to avoid performance cliffs.

Bug: 778440, 740113
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I36d1af371127d4d29be608e1351d53a2b547b25c
Reviewed-on: https://chromium-review.googlesource.com/1228981
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: enne <enne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#592480}
[modify] https://crrev.com/8f7b4562043922f6235ef3c1662adacac4425ccb/cc/layers/picture_layer_impl.cc

Sign in to add a comment