Closed Bug 1106537 Opened 10 years ago Closed 10 years ago

Assertion failure: buildingForChild.GetPrevAnimatedGeometryRoot() == aBuilder->FindAnimatedGeometryRootFor(child->GetParent()), at ../../../gecko/layout/generic/nsFrame.cpp:2425 when layout.event-regions.enabled is turned on

Categories

(Core :: Panning and Zooming, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla37

People

(Reporter: kats, Assigned: kats)

References

Details

Attachments

(3 files, 1 obsolete file)

I landed bug 928833 [1] but it was backed out for test failures. All of the mochitests that failed had this assertion:

 F/MOZ_Assert( 777): Assertion failure: buildingForChild.GetPrevAnimatedGeometryRoot() == aBuilder->FindAnimatedGeometryRootFor(child->GetParent()), at ../../../gecko/layout/generic/nsFrame.cpp:2425

[1] https://treeherder.mozilla.org/ui/#/jobs?repo=b2g-inbound&revision=a686c6909b22
Attached file Frame tree dump (deleted) —
I'm able to reproduce on the device just by opening the settings app as well. In that case the buildingForChild.GetPrevAnimatedGeometryRoot() is the same as child->GetParent(), and the aBuilder->FindAnimatedGeometryRootFor(child->GetParent()) returns something that's not inside the frame tree of the presshell (at least it doesn't show up in PresContext()->PresShell()->GetRootFrame()->DumpFrameTree();

Log attached.
So the problem here is actually that sometimes the nsDisplayListBuilder is created with a reference frame that is not an animated geometry root. When an AutoBuildingDisplayList is created on top of that, the GetPrevAnimatedGeometryRoot() is not what would normally be returned by aBuilder->FindAnimatedGeometryRootFor(child->GetParent()).
Attached patch Patch (obsolete) (deleted) — Splinter Review
This fixes it for me locally. Try push: https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=4c8f8c944d44
The try push fixes the B2G debug mochitest assertions. There's still reftest failures (and tons of failures on non-B2G) platforms. There's definitely some bugs with this event-regions stuff that we'll need to get to the bottom of.
I'm curious why we are building event regions in a case where the root reference frame for the builder is not the root document root frame. All cases where we do that I don't think we need event regions.

But we should also set the initial animated geometry root correctly, it should be the animated geometry root of the reference frame, not the reference frame.
(In reply to Timothy Nikkel (:tn) from comment #5)
> I'm curious why we are building event regions in a case where the root
> reference frame for the builder is not the root document root frame. All
> cases where we do that I don't think we need event regions.

I'm not sure. This sounds like an optimization we can do, but it would mask legitimate errors such as the one below so perhaps we should wait on this.

> 
> But we should also set the initial animated geometry root correctly, it
> should be the animated geometry root of the reference frame, not the
> reference frame.

Fixing this also fixes the assertion. Patch coming.
Attached patch Patch v2 (deleted) — Splinter Review
Attachment #8531136 - Attachment is obsolete: true
Attachment #8531505 - Flags: review?(tnikkel)
Attached patch Fix copy/paste error (deleted) — Splinter Review
Looks like many of the oranges in the above try run are due to assertion errors because of a copy/paste error.
Attachment #8531514 - Flags: review?(tnikkel)
Attachment #8531505 - Flags: review?(tnikkel) → review+
Attachment #8531514 - Flags: review?(tnikkel) → review+
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #6)
> (In reply to Timothy Nikkel (:tn) from comment #5)
> > I'm curious why we are building event regions in a case where the root
> > reference frame for the builder is not the root document root frame. All
> > cases where we do that I don't think we need event regions.
> 
> I'm not sure. This sounds like an optimization we can do, but it would mask
> legitimate errors such as the one below so perhaps we should wait on this.

Okay, let's just not forget to do it though.
Assignee: nobody → bugmail.mozilla
https://hg.mozilla.org/mozilla-central/rev/a808168ae839
https://hg.mozilla.org/mozilla-central/rev/ce7b5ae7376d
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: