PDF renderer showing blank or incomplete pages
Categories
(Core :: Graphics: Canvas2D, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox-esr153 | --- | unaffected |
| firefox160 | + | fixed |
| firefox161 | + | fixed |
| firefox162 | + | fixed |
People
(Reporter: carmudgeon, Assigned: jnicol)
References
(Regression)
Details
(Keywords: regression)
Attachments
(2 files, 3 external files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:160.0) Gecko/20100101 Firefox/160.0
Steps to reproduce
Open a link to display a PDF document from any website.
Actual results
PDF renderer displays blank, or incomplete pages. Saving, or downloading the document to disk shows they are intact and displayed properly by other readers. Regression first appeared in Firefox 160.
Examples:
https://images.thdstatic.com/catalog/pdfImages/2d/2d051972-59f4-4ddd-b1c3-d8b8099d6571.pdf
https://pdf.lowes.com/productdocuments/10384c8d-5d85-4ffd-be04-a60c17eab42d/09207003.pdf
Expected results
Renderer properly displays PDF document in Firefox window.
Comment 1•5 days ago
|
||
The Bugbug bot thinks this bug should belong to the 'Firefox::PDF Viewer' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•5 days ago
|
||
:carmudgeon, is it better if you set pdfjs.enableHWA to false in about:config ?
Comment 3•5 days ago
|
||
I have the same issue. All PDFs are blank when opened in Firefox. The same PDFs work on the previous release without display problems.
The release notes mentioned something about WebGL switching to Apple's Metal graphics API. I therefore tried disabling WebGL using the webgl.disabled = true switch in about:config and surprisingly my PDF display issues disappeared. The obvious downside is that sites using WebGL don't work anymore.
My setup: Firefox 160.0 on Intel Mac 10.15 (latest Apple upgrades applied).
Comment 4•5 days ago
|
||
I don't think it's a pdf.js bug but more likely a gfx one.
:jnicol, wdyt ? Could it be a regression from bug 2079810 ?
| Assignee | ||
Comment 5•5 days ago
|
||
Hmm, the Metal change shouldn't affect macOS 10.15
Could you both please attach your about:support information?
If you're able to run mozregression that would really help us track down the cause
| Reporter | ||
Comment 6•4 days ago
|
||
| Reporter | ||
Comment 7•4 days ago
|
||
(In reply to Calixte Denizet (:calixte) from comment #2)
:carmudgeon, is it better if you set
pdfjs.enableHWAtofalseinabout:config?
Yes, flipping the setting restores proper display.
Like siedlunghaus, I'm also running 15.8.3 on an Intel Mac. This is actually the first time I've encountered any issue with PDF display.
| Assignee | ||
Comment 8•4 days ago
|
||
Given the AMD GPU, I suspect this is another instance of bug 2074540, and the workaround needs to be applied to all AMD GPUs rather than just the GFX10
Does setting webgl.disable-angle=true fix it? (After re-enabling pdfjs.enableHWA)
| Reporter | ||
Comment 9•4 days ago
|
||
(In reply to Jamie Nicol [:jnicol] from comment #8)
Given the AMD GPU, I suspect this is another instance of bug 2074540, and the workaround needs to be applied to all AMD GPUs rather than just the GFX10
Does setting webgl.disable-angle=true fix it? (After re-enabling pdfjs.enableHWA)
No, it does not.
(pdfjs.enableHWA = true) seems to be the key to making the pages blank, or only partially render.
As long is it is enabled, the webgl setting has no effect.
| Assignee | ||
Comment 10•4 days ago
•
|
||
Thanks for testing. Just to confirm, did you restart firefox after setting webgl.disable-angle? It needs to be restarted to take affect, sorry I should have said that originally.
Edit: actually I don't think that's true. So you can disregard this message. sorry for the noise
| Reporter | ||
Comment 11•4 days ago
|
||
(In reply to Jamie Nicol [:jnicol] from comment #10)
Thanks for testing. Just to confirm, did you restart firefox after setting webgl.disable-angle? It needs to be restarted to take affect, sorry I should have said that originally.
Edit: actually I don't think that's true. So you can disregard this message. sorry for the noise
No problem.
I did not restart the browser, but did clear the cache.
However, I just tested again, by setting the webgl entry to true, leaving the pdfjs entry as true, quit and restarted, and found that it does render properly.
Comment 12•4 days ago
|
||
(In reply to Jamie Nicol [:jnicol] from comment #10)
Thanks for testing. Just to confirm, did you restart firefox after setting webgl.disable-angle? It needs to be restarted to take affect, sorry I should have said that originally.
Edit: actually I don't think that's true. So you can disregard this message. sorry for the noise
I can also confirm, that setting webgl.disable-angle to true mostly fixes the issue with the blank pages after a restart. Some minor glitches with font rendering still remain. These glitches were present in earlier versions before FF 160 though, and started appearing a few releases back. Some PDFs with more elaborate layouts have clipped single characters, meaning that only half of the character is visible, sprinkled all over the page. I have to find a PDF I'm comfortable sharing here. Once I find one I can upload it or make a screenshot, if that's helpful.
My Intel Mac indeed has an AMD GPU too. I believe the model to be AMD Radeon RX 470.
| Assignee | ||
Comment 13•4 days ago
|
||
Okay I think it's almost certainly the AMD issue then. Thanks for testing, both!
| Assignee | ||
Comment 14•4 days ago
|
||
Would you be able to test this build (from here if you want to see the code change) and see if it solves the issue? Thanks!
Updated•4 days ago
|
Comment 15•4 days ago
|
||
I'm willing to test, but don't know how this works.
Is it safe to run this program when existing Firefox installs and profiles are present?
Should I maybe run it with another user account on my Mac?
| Assignee | ||
Comment 16•4 days ago
|
||
Yes safe to run with existing Firefox installs. Just open it from the DMG instead of dragging to applications. I think it will use the default nightly profile so if you already have Firefox nightly installed it will use its profile, but won't touch regular firefox's or any custom profiles
| Assignee | ||
Comment 17•4 days ago
|
||
In bug 2074540 we disabled the unsynchronized glMapBufferRange fast path
for DrawTargetWebgl buffer uploads on Radeon GFX10 GPUs when ANGLE is
enabled, falling back to glBufferSubData. We have now received reports
of a similar bug on additional AMD GPUs.
Avoid the bug by taking the glBufferSubData path on all AMD GPUs.
Comment 18•4 days ago
|
||
I tried the test built earlier today and could not reproduce the blank PDF page issue.
Thank you for taking care of this π. I don't know what I would do without the trusty Firefox app on my Intel iMac.
| Assignee | ||
Comment 19•4 days ago
|
||
Great, thank you for testing!
Comment 20•3 days ago
|
||
Comment 21•3 days ago
|
||
:jnicol, we could include this in the planned Fx160 dot release if you add a release-uplift request in time.
Assuming it's low risk? Could you add a beta and release uplift request
Comment 22•3 days ago
|
||
firefox-beta Uplift Approval Request
- User impact if declined/Reason for urgency: Broken pdfjs, canvas, and webgl content for users on Mac with AMD GPUs
- Code covered by automated testing?: no
- Fix verified in Nightly?: no
- Needs manual QE testing?: no
- Steps to reproduce for manual QE testing:
- Risk associated with taking this patch: low
- Explanation of risk level: Falls back to known working slow path on affected GPUs.
- String changes made/needed?: N/A
- Is Android affected?: no
| Assignee | ||
Comment 23•3 days ago
|
||
In bug 2074540 we disabled the unsynchronized glMapBufferRange fast path
for DrawTargetWebgl buffer uploads on Radeon GFX10 GPUs when ANGLE is
enabled, falling back to glBufferSubData. We have now received reports
of a similar bug on additional AMD GPUs.
Avoid the bug by taking the glBufferSubData path on all AMD GPUs.
Original Revision: https://phabricator.services.mozilla.com/D342064
Comment 24•3 days ago
|
||
firefox-release Uplift Approval Request
- User impact if declined/Reason for urgency: Broken pdfjs, canvas, and webgl content for users on Mac with AMD GPUs
- Code covered by automated testing?: no
- Fix verified in Nightly?: no
- Needs manual QE testing?: no
- Steps to reproduce for manual QE testing:
- Risk associated with taking this patch: low
- Explanation of risk level: Falls back to known working slow path on affected GPUs.
- String changes made/needed?: N/A
- Is Android affected?: no
| Assignee | ||
Comment 25•3 days ago
|
||
In bug 2074540 we disabled the unsynchronized glMapBufferRange fast path
for DrawTargetWebgl buffer uploads on Radeon GFX10 GPUs when ANGLE is
enabled, falling back to glBufferSubData. We have now received reports
of a similar bug on additional AMD GPUs.
Avoid the bug by taking the glBufferSubData path on all AMD GPUs.
Original Revision: https://phabricator.services.mozilla.com/D342064
| Assignee | ||
Comment 26•3 days ago
|
||
Yes it's low risk. Definitely would be good to uplift
| Reporter | ||
Comment 27•3 days ago
|
||
Just tried the nightly build, and it functions properly with my existing profile.
Thank you all for the prompt response and effort in resolving the glitch!
Updated•3 days ago
|
Comment 28•3 days ago
|
||
| bugherder | ||
Updated•3 days ago
|
Updated•3 days ago
|
Comment 29•3 days ago
|
||
| uplift | ||
Updated•3 days ago
|
Updated•3 days ago
|
Comment 30•3 days ago
|
||
| uplift | ||
Updated•15 hours ago
|
Description
•