New issue
Advanced search Search tips

Issue 602334 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

ASSERT(isAllowedToQueryCompositingState()) failure during FrameView::computeCompositedSelection()

Project Member Reported by wangxianzhu@chromium.org, Apr 11 2016

Issue description

This looks like that a throttled frame is focused and computation of selection causes unexpected lifecycle state.

skyostil@ can you take a look?

Copied from bug 601001  #20 :

ToT on Windows hits following assertion after running 3 minutes 30 seconds on debug build:

```
CompositingState PaintLayer::compositingState() const
{
    ASSERT(isAllowedToQueryCompositingState());
```

I don't have enough information about graphics layer. Paint team, could you take look?

# Stack trace here:
blink::PaintLayer::compositingState() Line 2267
blink::LayoutObject::localToInvalidationBackingPoint(const blink::LayoutPoint & localPoint, blink::PaintLayer * * backingLayer) Line 2406
blink::RenderedPosition::positionInGraphicsLayerBacking(blink::CompositedSelectionBound & bound, bool selectionStart) Line 249
blink::FrameView::computeCompositedSelection(blink::LocalFrame & frame, blink::CompositedSelection & selection) Line 1631
blink::FrameView::updateCompositedSelectionIfNeeded() Line 1665
blink::FrameView::updateLifecyclePhasesInternal(blink::FrameView::LifeCycleUpdateOption phases) Line 2438
blink::FrameView::updateAllLifecyclePhases() Line 2372
blink::PageAnimator::updateAllLifecyclePhases(blink::LocalFrame & rootFrame) Line 85
blink_web.dll!blink::PageWidgetDelegate::updateAllLifecyclePhases(blink::Page & page, blink::LocalFrame & root) Line 63
blink_web.dll!blink::WebViewImpl::updateAllLifecyclePhases() Line 1981
content.dll!content::RenderWidget::UpdateVisualState() Line 941
content.dll!content::RenderWidgetCompositor::UpdateLayerTreeHost() Line 920
cc.dll!cc::LayerTreeHost::RequestMainFrameUpdate() Line 397
cc.dll!cc::ProxyMain::BeginMainFrame(std::unique_ptr<cc::BeginMainFrameAndCommitState,std::default_delete<cc::BeginMainFrameAndCommitState> > begin_main_frame_state) Line 202
cc.dll!base::internal::RunnableAdapter<void (__cdecl cc::ProxyMain::*)(std::unique_ptr<cc::BeginMainFrameAndCommitState,std::default_delete<cc::BeginMainFrameAndCommitState> >) __ptr64>::Run<std::unique_ptr<cc::BeginMainFrameAndCommitState,std::default_delete<cc::BeginMainFrameAndCommitState> > >(cc::ProxyMain * object, std::unique_ptr<cc::BeginMainFrameAndCommitState,std::default_delete<cc::BeginMainFrameAndCommitState> > && <args_0>) Line 182
cc.dll!base::internal::InvokeHelper<1,void,base::internal::RunnableAdapter<void (__cdecl cc::ProxyMain::*)(std::unique_ptr<cc::BeginMainFrameAndCommitState,std::default_delete<cc::BeginMainFrameAndCommitState> >) __ptr64> >::MakeItSo<base::WeakPtr<cc::ProxyMain>,std::unique_ptr<cc::BeginMainFrameAndCommitState,std::default_delete<cc::BeginMainFrameAndCommitState> > >(base::internal::RunnableAdapter<void (__cdecl cc::ProxyMain::*)(std::unique_ptr<cc::BeginMainFrameAndCommitState,std::default_delete<cc::BeginMainFrameAndCommitState> >)> runnable, base::WeakPtr<cc::ProxyMain> weak_ptr, std::unique_ptr<cc::BeginMainFrameAndCommitState,std::default_delete<cc::BeginMainFrameAndCommitState> > && <args_0>) Line 325
cc.dll!base::internal::Invoker<base::IndexSequence<0,1>,base::internal::BindState<base::internal::RunnableAdapter<void (__cdecl cc::ProxyMain::*)(std::unique_ptr<cc::BeginMainFrameAndCommitState,std::default_delete<cc::BeginMainFrameAndCommitState> >) __ptr64>,void __cdecl(cc::ProxyMain * __ptr64,std::unique_ptr<cc::BeginMainFrameAndCommitState,std::default_delete<cc::BeginMainFrameAndCommitState> >),base::WeakPtr<cc::ProxyMain> & __ptr64,base::internal::PassedWrapper<std::unique_ptr<cc::BeginMainFrameAndCommitState,std::default_delete<cc::BeginMainFrameAndCommitState> > > >,base::internal::InvokeHelper<1,void,base::internal::RunnableAdapter<void (__cdecl cc::ProxyMain::*)(std::unique_ptr<cc::BeginMainFrameAndCommitState,std::default_delete<cc::BeginMainFrameAndCommitState> >) __ptr64> >,void __cdecl(void)>::Run(base::internal::BindStateBase * base) Line 362
base.dll!base::Callback<void __cdecl(void),1>::Run() Line 398
base.dll!base::debug::TaskAnnotator::RunTask(const char * queue_function, const base::PendingTask & pending_task) Line 53
scheduler.dll!scheduler::TaskQueueManager::ProcessTaskFromWorkQueue(scheduler::internal::WorkQueue * work_queue, scheduler::internal::TaskQueueImpl::Task * out_previous_task) Line 293
scheduler.dll!scheduler::TaskQueueManager::DoWork(base::TimeTicks run_time, bool from_main_thread) Line 201
scheduler.dll!base::internal::RunnableAdapter<void (__cdecl scheduler::TaskQueueManager::*)(base::TimeTicks,bool) __ptr64>::Run<base::TimeTicks const & __ptr64,bool const & __ptr64>(scheduler::TaskQueueManager * object, const base::TimeTicks & <args_0>, const bool & <args_1>) Line 182
scheduler.dll!base::internal::InvokeHelper<1,void,base::internal::RunnableAdapter<void (__cdecl scheduler::TaskQueueManager::*)(base::TimeTicks,bool) __ptr64> >::MakeItSo<base::WeakPtr<scheduler::TaskQueueManager>,base::TimeTicks const & __ptr64,bool const & __ptr64>(base::internal::RunnableAdapter<void (__cdecl scheduler::TaskQueueManager::*)(base::TimeTicks,bool)> runnable, base::WeakPtr<scheduler::TaskQueueManager> weak_ptr, const base::TimeTicks & <args_0>, const bool & <args_1>) Line 325
scheduler.dll!base::internal::Invoker<base::IndexSequence<0,1,2>,base::internal::BindState<base::internal::RunnableAdapter<void (__cdecl scheduler::TaskQueueManager::*)(base::TimeTicks,bool) __ptr64>,void __cdecl(scheduler::TaskQueueManager * __ptr64,base::TimeTicks,bool),base::WeakPtr<scheduler::TaskQueueMa


 
Status: Started (was: Assigned)
Proposed fix here: https://codereview.chromium.org/1891453002/
Project Member

Comment 3 by bugdroid1@chromium.org, Apr 13 2016

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

commit c8d969a6d0378200d361d49ebe2b89c9449d9928
Author: skyostil <skyostil@chromium.org>
Date: Wed Apr 13 18:46:17 2016

Don't try to render composited selection in throttled frame

If a frame is throttled (i.e., offscreen) and has focus, we should not
try to render a composited selection for it because its layout
information might be out of date.

BUG= 602334 

Review URL: https://codereview.chromium.org/1891453002

Cr-Commit-Position: refs/heads/master@{#387047}

[modify] https://crrev.com/c8d969a6d0378200d361d49ebe2b89c9449d9928/third_party/WebKit/Source/core/frame/FrameView.cpp
[modify] https://crrev.com/c8d969a6d0378200d361d49ebe2b89c9449d9928/third_party/WebKit/Source/web/tests/FrameThrottlingTest.cpp
[modify] https://crrev.com/c8d969a6d0378200d361d49ebe2b89c9449d9928/third_party/WebKit/Source/web/tests/sim/SimCompositor.cpp
[modify] https://crrev.com/c8d969a6d0378200d361d49ebe2b89c9449d9928/third_party/WebKit/Source/web/tests/sim/SimCompositor.h

Labels: Merge-Request-50 M-50
Status: Fixed (was: Started)
Should probably merge this to M50.
Labels: -M-50 -Merge-Request-50 Merge-Request-51 M-51
Sorry, that should have been M51. Frame throttling isn't enabled in M50.

Comment 6 by tin...@google.com, Apr 14 2016

Labels: -Merge-Request-51 Merge-Approved-51 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M51 (branch: 2704)
Project Member

Comment 7 by bugdroid1@chromium.org, Apr 15 2016

Labels: -merge-approved-51 merge-merged-2704
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/eec1b436ae4a362bd23deb63a8b34f3273a60922

commit eec1b436ae4a362bd23deb63a8b34f3273a60922
Author: Sami Kyostila <skyostil@chromium.org>
Date: Fri Apr 15 13:11:55 2016

Don't try to render composited selection in throttled frame

If a frame is throttled (i.e., offscreen) and has focus, we should not
try to render a composited selection for it because its layout
information might be out of date.

BUG= 602334 

Review URL: https://codereview.chromium.org/1891453002

Cr-Commit-Position: refs/heads/master@{#387047}
(cherry picked from commit c8d969a6d0378200d361d49ebe2b89c9449d9928)

Review URL: https://codereview.chromium.org/1889163002 .

Cr-Commit-Position: refs/branch-heads/2704@{#71}
Cr-Branched-From: 6e53600def8f60d8c632fadc70d7c1939ccea347-refs/heads/master@{#386251}

[modify] https://crrev.com/eec1b436ae4a362bd23deb63a8b34f3273a60922/third_party/WebKit/Source/core/frame/FrameView.cpp
[modify] https://crrev.com/eec1b436ae4a362bd23deb63a8b34f3273a60922/third_party/WebKit/Source/web/tests/sim/SimCompositor.cpp
[modify] https://crrev.com/eec1b436ae4a362bd23deb63a8b34f3273a60922/third_party/WebKit/Source/web/tests/sim/SimCompositor.h

Comment 8 by tkent@chromium.org, Oct 12 2016

Components: -Blink>TextSelection Blink>Editing>Selection

Sign in to add a comment