Closed Bug 1059519 Opened 10 years ago Closed 9 years ago

"ASSERTION: Bounds computation mismatch"

Categories

(Core :: Layout, defect)

x86_64
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla43
Tracking Status
firefox37 --- affected
firefox43 --- fixed

People

(Reporter: jruderman, Assigned: robert)

References

Details

(Keywords: assertion, testcase)

Attachments

(3 files)

Attached file testcase
###!!! ASSERTION: Bounds computation mismatch: 'mContainerBounds.IsEqualInterior(mAccumulatedChildBounds)', file layout/base/FrameLayerBuilder.cpp, line 3517

This assertion was added in https://hg.mozilla.org/mozilla-central/rev/a0e6a1d488a8
Attached file stack
I hit this assertion failure when dragging a tiles around the about:newtab page in a debug build:

[Parent 87452] ###!!! ASSERTION: Bounds computation mismatch: 'mContainerBounds.IsEqualInterior(mAccumulatedChildBounds)', file layout/base/FrameLayerBuilder.cpp, line 3657
I too have had this problem as described in bug 1115562. I have found that for some reason the "Hello" (Firefox Hello) button does not trigger assertion failure when moving it from the toolbar to the overflow menu, but does trigger assertion failure when moving it from the overflow menu to the toolbar.
I see a ton of these when running the following on a local Linux desktop build from latest m-c:

./mach mochitest -f plain --setpref layers.async-pan-zoom.enabled=true --e10s dom/events/test/test_bug607464.html
I see this as well in Linux+e10s+apz debug mochitest logs. It takes up a significant amount of space in the logs, because it happens often and we print a full stack trace each time. I've had to comment out the assertion to avoid it together with my own logging hitting the log size limit.
I'm also seeing this in a local build (mozilla-central, debug, OS X, e10s enabled) if I simply type enough text into the URL bar that it overflows and scrolls horizontally by more than a few characters.

It doesn't happen with e10s disabled.
This is actually spewing so much that it causes M-e10s-4 to fail with APZ enabled because the output overflows the allowed maximum (see [1]).

roc, you added this assertion in bug 1022612, is this a legit bug that needs investigation or is the assertion bogus now?

[1] https://treeherder.mozilla.org/#/jobs?repo=try&revision=9ff1dfef8ebd
Blocks: 1177321
Flags: needinfo?(roc)
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #5)
> ./mach mochitest -f plain --setpref layers.async-pan-zoom.enabled=true
> --e10s dom/events/test/test_bug607464.html

I'm looking into this.

In the first assertion, the difference is significant: mContainerBounds.width is 59581, mAccumulatedChildBounds.width is 53846. The container item we're processing is the XUL box with the nsDisplaySVGEffects on it. mContainerBounds is bigger than the size of the element because one of the element's children is a scrollable element with a displayport set. In particular we have this text display item which extends beyond the scrolled area but is not clipped, and is therefore all contributed to mContainerBounds:

Text p=0x7f019cc829f8 f=0x7f0191b9bd18(Text(0)"mochi.test:8888/tests?autorun=1&consoleLevel=INFO&") bounds(4080,2340,55500,1380) layerBounds(0,-60,55500,1380) visible(4080,2400,55500,1200) componentAlpha(4080,2340,55500,1380) clip()

So the problem is that because the nsDisplaySVGEffects forces the layer to be inactive, we reach this code:
    if (animatedGeometryRoot != realAnimatedGeometryRootOfItem) {
      // Pick up any scroll clips that should apply to the item and apply them.
      DisplayItemClip clip =
        GetScrollClipIntersection(mBuilder, realAnimatedGeometryRootOfItem,
                                  animatedGeometryRoot,
                                  IsCaretWithCustomClip(item, itemType));
      clip.IntersectWith(item->GetClip());
      item->SetClip(mBuilder, clip);

Which applies clipping to the nsDisplayText. So when we compute mAccumulatedChildBounds, it's not as big as mContainerBounds.
Flags: needinfo?(roc)
Attachment #8649614 - Flags: review?(mstange) → review+
url:        https://hg.mozilla.org/integration/mozilla-inbound/rev/2cbb4757669276c1535fbc9be2119ff15061d7aa
changeset:  2cbb4757669276c1535fbc9be2119ff15061d7aa
user:       Robert O'Callahan <robert@ocallahan.org>
date:       Wed Aug 19 13:23:06 2015 +1200
description:
Bug 1059519. Relax assertion. r=mstange
https://hg.mozilla.org/mozilla-central/rev/2cbb47576692
Assignee: nobody → robert
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
You need to log in before you can comment on or make changes to this bug.