Some images have a blue tint

Bug #1130857 reported by James Brierley
46
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Mozilla Firefox
Fix Released
Medium
firefox (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Firefox 19.0 on Xubuntu 12.10 on a Late 2005 Apple Mac mini.

Steps to reproduce:

1. Open Firefox.
2. Navigate to an image-heavy website (Flickr, for instance). Note that some images have a blue tint.
3. If you already have enough of a browsing history, open a new tab and observe that the screenshots of your most visited pages also look too blue.

Downgrading back to version 18.2 makes the problem go away, although using an outdated browser is not much of a workaround.

I can test if required.

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: firefox 18.0.2+build1-0ubuntu0.12.10.1
ProcVersionSignature: Ubuntu 3.5.0-24.37-powerpc-smp 3.5.7.4
Uname: Linux 3.5.0-24-powerpc-smp ppc
AddonCompatCheckDisabled: False
ApportVersion: 2.6.1-0ubuntu10
Architecture: powerpc
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: james 1451 F.... xfce4-volumed
                      james 1471 F.... pulseaudio
BuildID: 20130201191451
CRDA: Error: [Errno 2] No such file or directory: 'iw'
Channel: Unavailable
Date: Wed Feb 20 17:18:15 2013
ForcedLayersAccel: False
IpRoute:
 default via 192.168.64.1 dev eth0 proto static
 169.254.0.0/16 dev eth0 scope link metric 1000
 192.168.64.0/24 dev eth0 proto kernel scope link src 192.168.64.8 metric 1
MarkForUpload: True
Plugins: IcedTea-Web Plugin (using IcedTea-Web 1.3 (1.3-1ubuntu1.1)) - /usr/lib/jvm/java-7-openjdk-powerpc/jre/lib/ppc/IcedTeaPlugin.so (icedtea-7-plugin)
PrefSources: prefs.js
Profiles: Profile0 (Default) - LastVersion=18.0.2/20130201191451 (In use)
RelatedPackageVersions: icedtea-7-plugin 1.3-1ubuntu1.1
RunningIncompatibleAddons: False
SourcePackage: firefox
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
In , Steve-c (steve-c) wrote :

Bug 486918 added new image resizers from SKIA. Since this was enabled resized images on my ppc32 machine show up with a blue tint.

The convolver code extracts the RGBA bits from each 32 bit pixel but doesn't take the endian order into account.

Revision history for this message
In , Steve-c (steve-c) wrote :

Created attachment 687479
proposed fix. Detect that this is a PPC and set the BENDIAN then use that when extracting the bits

Revision history for this message
In , Joe-drew (joe-drew) wrote :

Comment on attachment 687479
proposed fix. Detect that this is a PPC and set the BENDIAN then use that when extracting the bits

Review of attachment 687479:
-----------------------------------------------------------------

::: gfx/2d/convolver.cpp
@@ +206,3 @@
> if (has_alpha)
> + accum[3] += cur_filter * source_data_rows[filter_y][byte_offset +
> + A_OFFSET_IDX];

Can you just leave these all on the same line?

@@ +231,5 @@
> //
> // We only need to do this when generating the final output row (here).
> + int max_color_channel = NS_MAX(out_row[byte_offset + R_OFFSET_IDX],
> + NS_MAX(out_row[byte_offset + G_OFFSET_IDX], out_row[byte_offset
> + + B_OFFSET_IDX]));

Same line here too

Revision history for this message
In , Steve-c (steve-c) wrote :

Created attachment 688092
v2 of the patch, all one one line but this exceeds 80 characters

Revision history for this message
In , Steve-c (steve-c) wrote :

Created attachment 688094
v3 has the line break but in a better spot

Revision history for this message
In , Landry-openbsd (landry-openbsd) wrote :
Revision history for this message
In , Matt-woodrow (matt-woodrow) wrote :

I would strongly recommend that the change to SkPreConfig.h gets a patch file added to gfx/skia/patches, or that this change be upstreamed to google's skia repo (or both!).

Otherwise this change is at risk of being overwritten when we next update skia.

Revision history for this message
In , Steve-c (steve-c) wrote :

submitted for review upstream https://codereview.appspot.com/6900063/

Revision history for this message
In , Steve-c (steve-c) wrote :

Created attachment 690255
adds the changes to SkPreConfig.h as a patch listed in gfx/skia/patches

This patch will add a patch file in gfx/skia/patches to alter SkPreConfig.h the next time we import upstream sources

Revision history for this message
In , Joe-drew (joe-drew) wrote :

Sorry! I was confusing SkPreConfig.h with SkUserConfig.h, and incorrectly figured it didn't need to have a separate patch.

Revision history for this message
In , Ryanvm (ryanvm) wrote :
Revision history for this message
James Brierley (jmb8710) wrote :
Revision history for this message
James Brierley (jmb8710) wrote :

Oops, I got to Launchpad after I had downgraded, to be extra clear: this bug refers to *the latest Firefox as of 20/2/13.*

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in firefox (Ubuntu):
status: New → Confirmed
Revision history for this message
David Kirkpatrick (78luphr0rnk2nuqimstywepozxn9kl19tqh0tx66b5dki1xxsh5mkz9gl21a5rlwfnr8jn6ln0m3jxne2k9x1ohg85w3jabxlrqbgszpjpwcmvkbcvq9spp6z3w5j1m33k06tlsfszeuscyt241hasoy-f44w9zxj9-a811i2i3ytqlsztthjth0svbccw8inm65tmkqp9sarr553jq53in4xm1m8wn3o4rlwaer06ogwvqwv9mrqoku2x334n7di44o65qze67n1wneepmidnuwnde1rqcbpgdf70gtqq2x9thj5tlcsac12ab) wrote :

I am also getting this problem with Firefox 19, Ubuntu 12.04.2, iBook G4

Revision history for this message
James Brierley (jmb8710) wrote :

David, here's the rather poor workaround I used:

apt-get remove firefox
cd /var/cache/apt/archives
dpkg -i *firefox*18.02*

Then pin Firefox at this version by pasting the following into /etc/apt/preferences.d/firefox:

Package: *firefox*
Pin: version n=18.0.2
Pin-Priority: 999

apt-get update and you should be sorted until this bug is fixed - modulo security holes.

Revision history for this message
In , Oibaf (oibaf) wrote :

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux ppc; rv:19.0) Gecko/20100101 Firefox/19.0
Build ID: 20130218104019

Steps to reproduce:

Open a random site with png or jpg images on it (e.g. search on google images).

Actual results:

Many images (happens on both png and jpg) have a blu tint. It happens that the image loads fine (colors are OK), but when completely loaded a "blu layer" appears on it. Strangely when the same image is shown more time on the same page not all have the blu tint.

Expected results:

Images have correct colors as it happened on firefox <= 18. This happened after upgrading to ff 19 on a Ubuntu 12.04 (official ubuntu packages) on a powerpc G4 machine.

Revision history for this message
In , Epinal99-bugzilla (epinal99-bugzilla) wrote :

1) Test with a fresh profile, see https://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles

2) If images are normal in FF18-, so there is maybe a regression.
Use the tool mozregression to find a possible regression range, see
http://harthur.github.com/mozregression/
(ex: mozregression --good=2012-08-01)

Revision history for this message
In , Oibaf (oibaf) wrote :

I did a "mv .mozilla .mozilla_backup", started ff and confirmed the blu images. When trying a bisect I get:

$ mozregression --good=2012-08-01
Downloading nightly from 2012-11-12
Installing nightly
Starting nightly
['moznightlyapp/firefox/firefox', '-profile', '/tmp/tmpteutxk.mozrunner']
Traceback (most recent call last):
  File "/usr/local/bin/mozregression", line 9, in <module>
    load_entry_point('mozregression==0.6.4', 'console_scripts', 'mozregression')()
  File "/usr/local/lib/python2.7/dist-packages/mozregression/regression.py", line 187, in cli
    bisector.bisect(get_date(options.good_date), get_date(options.bad_date))
  File "/usr/local/lib/python2.7/dist-packages/mozregression/regression.py", line 108, in bisect
    dest = self.runner.start(midDate)
  File "/usr/local/lib/python2.7/dist-packages/mozregression/runnightly.py", line 237, in start
    if not self.app.start(self.profile, self.addons, self.cmdargs):
  File "/usr/local/lib/python2.7/dist-packages/mozregression/runnightly.py", line 141, in start
    self.runner.start()
  File "/usr/local/lib/python2.7/dist-packages/mozrunner/runner.py", line 183, in start
    self.process_handler.run(timeout, outputTimeout)
  File "/usr/local/lib/python2.7/dist-packages/mozprocess/processhandler.py", line 621, in run
    self.proc = self.Process(self.cmd, **args)
  File "/usr/local/lib/python2.7/dist-packages/mozprocess/processhandler.py", line 76, in __init__
    universal_newlines, startupinfo, creationflags)
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
    raise child_exception
OSError: [Errno 8] Exec format error
Exception AttributeError: "'ProcessHandler' object has no attribute 'proc'" in <bound method Runner.cleanup of <mozrunner.runner.Runner object at 0x10f71530>> ignored

Revision history for this message
In , Bugzilla-tf (bugzilla-tf) wrote :

mozregression will not work because we don't have PPC builds, only x64 and X86.
( ftp://ftp.mozilla.org/pub/firefox/nightly/latest-mozilla-central/ )

Reporter: Please set image.high_quality_downscaling.enabled to false in about:config and test again.
gfx.color_management.mode to 0 would be another thing to try.

Revision history for this message
In , Oibaf (oibaf) wrote :

OK, can you tell me how to purge all things installed with "sudo pip install mozregression"?

Just setting image.high_quality_downscaling.enabled to false fixes the problem.

Revision history for this message
In , Bugzilla-tf (bugzilla-tf) wrote :

(In reply to Fabio from comment #4)
> OK, can you tell me how to purge all things installed with "sudo pip install
> mozregression"?

sudo pip uninstall mozregression ? (just a guess)

> Just setting image.high_quality_downscaling.enabled to false fixes the
> problem.

thanks, it seems to be a regression from bug 486918

Revision history for this message
In , Epinal99-bugzilla (epinal99-bugzilla) wrote :

(In reply to Matthias Versen [:Matti] from comment #5)
> thanks, it seems to be a regression from bug 486918

But bug 486918 landed in FF18, no? So why did the reporter see the issue only after upgrading to FF19?

Revision history for this message
In , Bugzilla-tf (bugzilla-tf) wrote :

It got disabled on Firefox18 (see bug 829940)

Revision history for this message
In , Spectre (spectre) wrote :

I think this is Linux-specific. No such issue with TenFourFox on OS X PPC, but it's also not using the same downscaler.

Revision history for this message
In , Spectre (spectre) wrote :

I should also add that the problem is likely an endianness flaw in Skia; it has never been tested on big-endian platforms. This is not really something I can advise on because TenFourFox doesn't use Skia either (only CG). Perhaps Tobias has an idea.

Revision history for this message
ojordan (ojordan12345) wrote :

Here is the mozilla bug with workaround https://bugzilla.mozilla.org/show_bug.cgi?id=844436 .

Revision history for this message
ojordan (ojordan12345) wrote :

This bug https://bugzilla.mozilla.org/show_bug.cgi?id=817356 has just popped up on the debina mailing list. It appears to contain a patch for this problem?

Revision history for this message
In , ojordan (ojordan12345) wrote :

I can confirm this bug and the workaround. It has been reported on launchpad (https://bugs.launchpad.net/firefox/+bug/1130857 ). The debian PowerPC mailing list also has the problem reported (http://lists.debian.org/debian-powerpc/2013/02/msg00028.html ). Is the patch in mozilla bug 817356 the fix for this?

Revision history for this message
In , Bugzilla-tf (bugzilla-tf) wrote :

Joe could answer the question if this is a dupe of bug 817356.

btw: Thanks Cameron for commenting and confirming that this could be a skia issue !

Revision history for this message
In , Spectre (spectre) wrote :

Looking at the code, I'm pretty sure this is a dupe of bug 817356, yes.

Changed in firefox:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
In , Landry-openbsd (landry-openbsd) wrote :

Apparently attachment #690255 never went through review in m-c nor commited, and neither upstream who didnt reply on codereview. Should it be unbitrotten and r?'ed ?

Stumbled upon this while investigating why skia got broken on ppc again (see #849253)...

Revision history for this message
In , Ryanvm (ryanvm) wrote :
Revision history for this message
In , Ryanvm (ryanvm) wrote :
Revision history for this message
In , Oibaf (oibaf) wrote :

*** Bug 844436 has been marked as a duplicate of this bug. ***

Revision history for this message
Oibaf (oibaf) wrote :

Fixed since Firefox 20.

Changed in firefox (Ubuntu):
status: Confirmed → Fix Released
Oibaf (oibaf)
Changed in firefox:
importance: Medium → Unknown
status: Confirmed → Unknown
Changed in firefox:
importance: Unknown → Medium
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.