Closed Bug 1467847 Opened 7 years ago Closed 7 years ago

Assertion failure: !aTransform.IsSingular(), at mozilla/gfx/Polygon.h:333

Categories

(Core :: Graphics, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox-esr52 --- wontfix
firefox-esr60 --- wontfix
firefox61 --- wontfix
firefox62 --- wontfix
firefox63 --- fixed

People

(Reporter: truber, Assigned: lsalzman)

References

(Blocks 1 open bug)

Details

(Keywords: assertion, testcase)

Attachments

(2 files)

Attached file testcase.html
The attached testcase causes an assertion in m-c 20180608-e0595117ff5b. #0: mozilla::gfx::PolygonTyped<mozilla::gfx::UnknownUnits>::TransformToScreenSpace(mozilla::gfx::Matrix4x4Typed<mozilla::gfx::UnknownUnits, mozilla::gfx::UnknownUnits> const&) at gfx/2d/Polygon.h:333 #1: mozilla::layers::TransformLayerGeometry(mozilla::layers::Layer*, mozilla::Maybe<mozilla::gfx::PolygonTyped<mozilla::gfx::UnknownUnits> >&) at gfx/layers/composite/ContainerLayerComposite.cpp:151 #2: void mozilla::layers::RenderLayers<mozilla::layers::ContainerLayerComposite>(mozilla::layers::ContainerLayerComposite*, mozilla::layers::LayerManagerComposite*, mozilla::gfx::IntRectTyped<mozilla::RenderTargetPixel> const&, mozilla::Maybe<mozilla::gfx::PolygonTyped<mozilla::gfx::UnknownUnits> > const&) at gfx/layers/composite/ContainerLayerComposite.cpp:453 #3: void mozilla::layers::ContainerRender<mozilla::layers::ContainerLayerComposite>(mozilla::layers::ContainerLayerComposite*, mozilla::layers::LayerManagerComposite*, mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&, mozilla::Maybe<mozilla::gfx::PolygonTyped<mozilla::gfx::UnknownUnits> > const&) at gfx/layers/composite/ContainerLayerComposite.cpp:622 #4: void mozilla::layers::RenderLayers<mozilla::layers::ContainerLayerComposite>(mozilla::layers::ContainerLayerComposite*, mozilla::layers::LayerManagerComposite*, mozilla::gfx::IntRectTyped<mozilla::RenderTargetPixel> const&, mozilla::Maybe<mozilla::gfx::PolygonTyped<mozilla::gfx::UnknownUnits> > const&) at gfx/layers/composite/ContainerLayerComposite.cpp:456 #5: void mozilla::layers::ContainerRender<mozilla::layers::ContainerLayerComposite>(mozilla::layers::ContainerLayerComposite*, mozilla::layers::LayerManagerComposite*, mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&, mozilla::Maybe<mozilla::gfx::PolygonTyped<mozilla::gfx::UnknownUnits> > const&) at gfx/layers/composite/ContainerLayerComposite.cpp:622 #6: void mozilla::layers::RenderLayers<mozilla::layers::ContainerLayerComposite>(mozilla::layers::ContainerLayerComposite*, mozilla::layers::LayerManagerComposite*, mozilla::gfx::IntRectTyped<mozilla::RenderTargetPixel> const&, mozilla::Maybe<mozilla::gfx::PolygonTyped<mozilla::gfx::UnknownUnits> > const&) at gfx/layers/composite/ContainerLayerComposite.cpp:456 #7: void mozilla::layers::ContainerRender<mozilla::layers::ContainerLayerComposite>(mozilla::layers::ContainerLayerComposite*, mozilla::layers::LayerManagerComposite*, mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&, mozilla::Maybe<mozilla::gfx::PolygonTyped<mozilla::gfx::UnknownUnits> > const&) at gfx/layers/composite/ContainerLayerComposite.cpp:622 #8: void mozilla::layers::RenderLayers<mozilla::layers::RefLayerComposite>(mozilla::layers::RefLayerComposite*, mozilla::layers::LayerManagerComposite*, mozilla::gfx::IntRectTyped<mozilla::RenderTargetPixel> const&, mozilla::Maybe<mozilla::gfx::PolygonTyped<mozilla::gfx::UnknownUnits> > const&) at gfx/layers/composite/ContainerLayerComposite.cpp:456 #9: void mozilla::layers::ContainerRender<mozilla::layers::RefLayerComposite>(mozilla::layers::RefLayerComposite*, mozilla::layers::LayerManagerComposite*, mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&, mozilla::Maybe<mozilla::gfx::PolygonTyped<mozilla::gfx::UnknownUnits> > const&) at gfx/layers/composite/ContainerLayerComposite.cpp:622 #10: void mozilla::layers::RenderLayers<mozilla::layers::ContainerLayerComposite>(mozilla::layers::ContainerLayerComposite*, mozilla::layers::LayerManagerComposite*, mozilla::gfx::IntRectTyped<mozilla::RenderTargetPixel> const&, mozilla::Maybe<mozilla::gfx::PolygonTyped<mozilla::gfx::UnknownUnits> > const&) at gfx/layers/composite/ContainerLayerComposite.cpp:456 #11: void mozilla::layers::ContainerRender<mozilla::layers::ContainerLayerComposite>(mozilla::layers::ContainerLayerComposite*, mozilla::layers::LayerManagerComposite*, mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&, mozilla::Maybe<mozilla::gfx::PolygonTyped<mozilla::gfx::UnknownUnits> > const&) at gfx/layers/composite/ContainerLayerComposite.cpp:622 #12: mozilla::layers::LayerManagerComposite::Render(mozilla::gfx::IntRegionTyped<mozilla::gfx::UnknownUnits> const&, mozilla::gfx::IntRegionTyped<mozilla::gfx::UnknownUnits> const&) at gfx/layers/composite/LayerManagerComposite.cpp:954 #13: mozilla::layers::LayerManagerComposite::UpdateAndRender() at gfx/layers/composite/LayerManagerComposite.cpp:534 #14: mozilla::layers::LayerManagerComposite::EndTransaction(mozilla::TimeStamp const&, mozilla::layers::LayerManager::EndTransactionFlags) at gfx/layers/composite/LayerManagerComposite.cpp:464 #15: mozilla::layers::CompositorBridgeParent::CompositeToTarget(mozilla::gfx::DrawTarget*, mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const*) at gfx/layers/ipc/CompositorBridgeParent.cpp:1068 #16: mozilla::layers::CompositorVsyncScheduler::Composite(mozilla::TimeStamp) at gfx/layers/ipc/CompositorVsyncScheduler.cpp:243
Flags: in-testsuite?
In layers, transform.IsSingular() is checked, and transform.Inverse() is passed as the transform to Polygon::TransformToScreenSpace. However, transform.Inverse().IsSingular() unfortunately fails, due to precision issues, i.e. transform.Inverse().Inverse() is not guaranteed to exist. However, since we already have the original transform and the inverse lying around, it makes more sense to just pass both of these into the Polygon code, both avoiding the precision headaches from recomputing them and also avoiding unnecessary computation. I also put in the testcase as a crashtest.
Assignee: nobody → lsalzman
Status: NEW → ASSIGNED
Attachment #8990076 - Flags: review?(mikokm)
Comment on attachment 8990076 [details] [diff] [review] avoid taking inverse in Polygon::TransformToScreenSpace when possible Review of attachment 8990076 [details] [diff] [review]: ----------------------------------------------------------------- Looks great. Thank you for fixing this.
Attachment #8990076 - Flags: review?(mikokm) → review+
Pushed by lsalzman@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/a28effafa2d7 avoid taking inverse in Polygon::TransformToScreenSpace when possible. r=miko
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Flags: in-testsuite? → in-testsuite+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: