Open Bug 1655630 Opened 2 years ago Updated 2 years ago

Reftest 243519-6.html, print-previewed under certain page sizes, triggers "ASSERTION: invalid shrink-to-fit ratio: 'ratio >= 0.0 && ratio < 1.0', file nsPageContentFrame.cpp, line 86"

Categories

(Core :: Printing: Output, task)

task

Tracking

()

People

(Reporter: dholbert, Unassigned)

References

Details

Attachments

(1 file)

STR:

  1. Load this testcase in a debug build:
    https://searchfox.org/mozilla-central/rev/c6676771df58c6e0098574bc6b11517acbf264cf/layout/reftests/bugs/243519-6.html
  2. Print-preview, using a 5in by 5in custom paper size* and with (default) shrink-to-fit enabled.
  • you can create a custom paper size using the "page setup" button in Print Preview

ACTUAL RESULTS:
###!!! ASSERTION: invalid shrink-to-fit ratio: 'ratio >= 0.0 && ratio < 1.0', file layout/generic/nsPageContentFrame.cpp, line 86
###!!! ASSERTION: Computed overflow area must contain frame bounds: 'aNewSize.width == 0 || aNewSize.height == 0 || r->width == nscoord_MAX || r->height == nscoord_MAX || (mState & NS_FRAME_SVG_LAYOUT) || r->Contains(nsRect(nsPoint(0, 0), aNewSize))', file layout/generic/nsIFrame.cpp, line 9243

EXPECTED RESULTS:
No assertions.

I intend to land a patch in bug 1655608 that happens to make this assertion fire at the standard reftest-paged page-size; I'm filing this bug to give me a bug number that I can use for the reftest.list annotation that I'll need to add over there. (And I'm also filing to document the fact that this fires even without my changes over there, under slightly different page-size conditions -- and to document those conditions.)

Summary: layout/reftests/bugs/243519-6.html → Reftest 243519-6.html, print-previewed under certain page sizes, triggers "ASSERTION: invalid shrink-to-fit ratio: 'ratio >= 0.0 && ratio < 1.0', file nsPageContentFrame.cpp, line 86" and "ASSERTION: Computed overflow area must contain frame bounds:..."

(Note: bug 620161 comment 2 indicates another case that failed these same assertions around 5 years ago. So, this probably isn't a recent issue; I've just uncovered another scenario where we trigger these same assertions that bug 620161 comment 2 already indicated we could trigger. That bug is focused on a different assertion, though; hence, I'm filing this separately.)

See Also: → 620161

Daniel, here is a recent appearance of this issue:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=316078922&repo=autoland&lineNumber=3293

Should we modify this bug to include more tests and mark it as intermittent?

Flags: needinfo?(dholbert)

Let's file dedicated new bugs for cases where this causes treeherder orange in a given test; and we can land annotations to mitigate those intermitents in those bugs, while leaving this bug tracking the assertion itself.

(Would you mind filing a bug for the log that you noted?)

Flags: needinfo?(dholbert) → needinfo?(malexandru)

Sure, made Bug 1666382, thank you for looking!

Flags: needinfo?(malexandru)

I came across these asserts when I was working on bug 1640197.

The assertion

###!!! ASSERTION: Computed overflow area must contain frame bounds: 'aNewSize.width == 0 || aNewSize.height == 0 || r->width == nscoord_MAX || r->height == nscoord_MAX || (mState & NS_FRAME_SVG_LAYOUT) || r->Contains(nsRect(nsPoint(0, 0), aNewSize))', file /Users/miko/Code/mozilla-unified/layout/generic/nsIFrame.cpp:9452

seems to be caused by empty canvas frames not getting their bounds or overflow areas set, and I had written a patch that fixes this. Based on the review comments (when it was part of patch set for bug 1640197), some additional checks might be needed before assigning the width and height.

See Also: → 1685367

Bug 1683126 should fix the "ASSERTION: Computed overflow area must contain frame bounds:..." part at least.

Depends on: 1683126
Summary: Reftest 243519-6.html, print-previewed under certain page sizes, triggers "ASSERTION: invalid shrink-to-fit ratio: 'ratio >= 0.0 && ratio < 1.0', file nsPageContentFrame.cpp, line 86" and "ASSERTION: Computed overflow area must contain frame bounds:..." → Reftest 243519-6.html, print-previewed under certain page sizes, triggers "ASSERTION: invalid shrink-to-fit ratio: 'ratio >= 0.0 && ratio < 1.0', file nsPageContentFrame.cpp, line 86"
You need to log in before you can comment on or make changes to this bug.