Closed Bug 1748077 Opened 2 years ago Closed 2 years ago

"Print Preview Error: An error occurred while printing." - When printing the glossary of math symbols

Categories

(Core :: Printing: Output, defect)

defect

Tracking

()

VERIFIED FIXED
97 Branch
Tracking Status
firefox-esr91 --- wontfix
firefox95 --- wontfix
firefox96 --- wontfix
firefox97 --- verified
firefox98 --- verified

People

(Reporter: Dexter, Assigned: jfkthame, NeedInfo)

References

(Regression, )

Details

(Keywords: regression)

Attachments

(3 files)

As reported on StackOverflow, attempting to print this page (even with "Print as PDF" or simiar) results in the error "Print Preview Error: An error occurred while printing." right after hitting the "Print" button, on the print options dialog.

No error occurs in the print preview.

I got this "Failed to create rendering context for print." warning on a debug build.

Oh yeah

Crash Annotation GraphicsCriticalError: |[0][GFX1-]: Failed to create draw target in device context sized 47680x67360 and pointer 0x7f874404d220 (t=24.8445) [GFX1-]: Failed to create draw target in device context sized 47680x67360 and pointer 0x7f874404d220

Looks like the canvas size is too large.

See Also: → 1747747

Do we know if this is a regression?

Answering my own question: Yes, this is a regression, with this regression range:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=e02533b47a679aeeaa52bb5a88e04cdbbfc251e2&tochange=26b31c2612b4b6ea5b1771b3bdef1031f457a98f

--> Regression from bug 454059

jfkthame, could you take a look?

Flags: needinfo?(jfkthame)
Regressed by: 454059
Has Regression Range: --- → yes

Here's a partially reduced testcase, which triggers the bug for me (printed on Ubuntu 21.10 in Firefox Nightly with "Save to PDF" print target and US-Letter page size).

Set release status flags based on info from the regressing bug 454059

Assignee: nobody → jfkthame
Status: NEW → ASSIGNED

Adrian, as you'll see in the attached patch (comment 7), I'm finding that if the link URI being passed in the attribute string to cairo_tag_begin contains a backslash, I have to doubly escape the \ (i.e. replace a single \ with four \\\\s) in order for the cairo-pdf-interchange backend to generate the link properly. This seems unexpected to me; is it possible a cairo bug?

(I haven't yet tried to reproduce this with a standalone test and current cairo master, but skimming the cairo commit logs I didn't notice anything that looked like a recent fix. But you may know otherwise...)

Flags: needinfo?(jfkthame) → needinfo?(ajohnson)

OK, I've confirmed the same issue reproduces in a simple test with cairo master, so it's not anything weird we're doing in gecko. Filed https://gitlab.freedesktop.org/cairo/cairo/-/issues/526 upstream about it.

Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f2b9c824a01a
Escape any backslashes in the URL when creating PDF links via cairo. r=gfx-reviewers,jrmuizel
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 97 Branch
Flags: qe-verify+

I was able to reproduce the issue on Win10, build 95.0a1 (20211020093007).
Verified as fixed on Win10/Ubuntu20.4/Mac 10.13 using builds 97.0b8 (20220125201015) and 98.0a1(20220125190421).

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: