Add back assertion to ensure numPagesOnThisSheet is > 0
Categories
(Core :: Print Preview, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox82 | --- | verified |
People
(Reporter: emmamalysz, Assigned: dholbert)
Details
(Whiteboard: [print2020_v82])
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
Bug 1661852 removed the assertion that numPagesOnThisSheet > 0 in PrintedSheetFrame. We had to remove this for causing a tab crash on mac.
STR:
- Open https://fr.wikipedia.org/wiki/Gr%C3%A8ce
- Print page (with print.tab_modal.enabled turned on)
- Specify landscape mode (or change a setting that increases the number of pages)
- Change page range from "all" to "custom"
- Specify page range to print the last page (i.e. 105 to 105)
- Switch back to orientation mode (or change a setting that decreases the number of pages)
- Notice the preview will start to render, and the tab will then crash
The crash was avoided by removing this assertion, but we should probably figure out why that's happening/if we need to put it back.
Comment 1•4 years ago
|
||
This is because the out of the range page number isn't counted.
(In reply to Emma Malysz from comment #0)
- Switch back to orientation mode (or change a setting that decreases the number of pages)
When out-of-range page numbers are specified, the orientation mode UI is disabled basically, but somtimes I can interact it, then the assertion happened.
CCing Daniel.
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
Per the comment in the patch: if we're given a bogus range, we can technically
end up with a single PrintedSheetFrame that contains no displayable
pages. Luckily, that's a situation that the frontend should detect & recover
from quickly & gracefully, so it's not really a problem. So: in that scenario,
we'll now spam a non-fatal warning; and we'll fatally assert if any sheet
beyond the first page has zero displayable pages. (That still shouldn't be
possible.)
Assignee | ||
Comment 3•4 years ago
|
||
We could hypothetically uplift this to beta, but it doesn't matter too much either way -- it's just adding some assertions, which by definition are only active in debug builds. So this has zero impact/change for actual users running our opt builds.
Comment 5•4 years ago
|
||
bugherder |
Updated•4 years ago
|
Comment 6•4 years ago
|
||
Confirmed issue with 82.0a1 (2020-09-02) on Windows 10.
Patch verified with 82.0b7 on Windows 10, macOS 11.0.
Description
•