Open Bug 1667747 Opened 4 years ago Updated 2 years ago

PNG incorrectly decoded (rounding errors) [regression]

Categories

(Core :: Graphics: Color Management, defect)

80 Branch
defect

Tracking

()

UNCONFIRMED

People

(Reporter: ossman, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: regressionwindow-wanted)

Attachments

(4 files)

Attached file Test case

User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0

Steps to reproduce:

  1. Load PNG

Actual results:

PNG loaded with incorrect pixel values.

Expected results:

PNG pixels loaded exactly as encoded.

Seems to be some rounding error, which is extremely odd given that PNG is a lossless format.

Seen on Firefox 80 in Fedora 31 and Firefox 81 on Windows 10. Chrome and Edge work just fine.

Fairly sure this is a regression as this was caught by noVNC's unit tests, and those tests used to pass on Firefox.

Also note that everything works fine in headless mode. So I guess the full rendering backend affects things.

The rounding bugs are also different on Windows and Linux.

It's also not a canvas bug as the same bug can be seen when the image is directly used.

If I remove iCCP chunk (ICC profile) from the PNG file in the testcase, it shows "PNG rendered correctly".

let pngdata = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH5AYGDCMdP5+7lAAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAAeSURBVAjXZcmxDQAACAMg6v8/19VEVlKQwjii0LxZip8EBWs4e7IAAAAASUVORK5CYII=";

Also, if I set gfx.color_management.mode pref to 0 (No color management) with the original testcase, it shows "PNG rendered correctly".
So apparently this is color management issue.

Component: Untriaged → GFX: Color Management
Product: Firefox → Core

Could you attach your about:support? Mostly for your color profile to ensure we can reproduce. Thanks!

Also, would you be willing to find a regression window for us? https://mozilla.github.io/mozregression/quickstart.html

Blocks: 1602453
Severity: -- → S3
Has STR: --- → yes
Flags: needinfo?(ossman)
Attached file about_support.txt
Flags: needinfo?(ossman)

(In reply to Andrew Osmond [:aosmond] from comment #4)

Could you attach your about:support? Mostly for your color profile to ensure we can reproduce. Thanks!

File attached. This is from the Linux machine. I can get one from the Windows machine as well if you need it.

Also, would you be willing to find a regression window for us? https://mozilla.github.io/mozregression/quickstart.html

I'm afraid I don't have time for that right now. :/

QA Whiteboard: [qa-regression-triage]

With Gnome Wayland + Xwayland (Debian Testing, Intel Mesa) I always get "PNG rendered correctly".

With Gnome X11 (Debian Testing, GTX1060, proprietary Nvidia driver 450.66) I get "Incorrect rendering of PNG" regardless of gfx.color_management.mode = 2 (default) or 1.
Even mozregression --launch 2016-01-01 --pref gfx.webrender.force-disabled:true -a https://bug1667747.bmoattachments.org/attachment.cgi?id=9178178 says "Incorrect rendering of PNG" in the F12 Web Console.

Testing this issue on Windows 10 x64, Windows 8.1 x64 and on macOS 10.15 on 82.0b7 and back to build Fx 56, not reproduced the issue, the message in console was "PNG rendered correctly" in every cases. Testing on Ubuntu 18.04 platform, different builds (Fx 82.0b7, Fx 80 , Fx 81 and even Fx 56) the message in console is "Incorrect rendering of PNG", attached a screenshot for details.
I think this is not a regression. Pierre, are you still reproduced this on Windows and macOS platforms ?

Flags: needinfo?(ossman)

(In reply to Timea Zsoldos [:zstimi/tzsoldos], Desktop Release QA from comment #8)

Pierre, are you still reproduced this on Windows and macOS platforms ?

Yes. I just tested it with Firefox 81.0.1 on both Windows and macOS. Both platforms failed the test.

Flags: needinfo?(ossman)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: