Open Bug 831244 Opened 9 years ago Updated 3 years ago
display artifacts (white regions) when displaying scaled images
Config: Firefox 19.0 beta 1 built from http://hg.mozilla.org/releases/mozilla-beta/rev/aad6dcd323c3 on Ubuntu 12.04.1 LTS x86_64 (running under Gnome 3, without 3D effects). Pristine Firefox profile. Graphics section from about:support says Adapter Description NVIDIA Corporation -- Quadro NVS 290/PCIe/SSE2 Device ID Quadro NVS 290/PCIe/SSE2 Driver Version 3.3.0 NVIDIA 295.40 GPU Accelerated Windows 0/1 Basic Vendor ID NVIDIA Corporation WebGL Renderer NVIDIA Corporation -- Quadro NVS 290/PCIe/SSE2 AzureCanvasBackend cairo AzureContentBackend none AzureFallbackCanvasBackend none Problem description: displaying scaled-down images will often present artefacts, in the form of white regions (vertical white bands or a kind of white dithering), or sometimes even the entire image appears white. Typical case: http://i.imgur.com/BEsg0.jpg (displayed scaled down 25% on my screen): the image appears completely white when displayed (i.e., just a white rectangle covering the image, nothing else is visible). Strangely enough, when switching tabs or de-obscuring the window, the image sometimes briefly flickers into view before being replaced by the white rectangle. When viewing the image at full size, it appears correctly. Problem did not exist with Firefox 18: this is new with Firefox 19 (I did not try 20 and 21, can do if absolutely necessary).
Could you try with a new profile, please: https://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles If the issue is still here, use the devtool mozregression (see http://harthur.github.com/mozregression/) to find a regression range between FF18 and FF19 (FF18 nightly builds start since August 2012, --good=2012-08-01)
This is with a new, pristine, profile. I'll see if I can find the time to bisect the regression, but since this is a work PC that I have access to only during work hours, I'm not sure. Stay tuned.
OK, now this is really strange: the bug does not manifest itself with any nightly builds or any 19.0beta builds that I can find on Mozilla's site. It only appears when I compile Firefox myself (again, starting with 19 landing on the beta branch, but I can test other trees if useful). I can't think of anything unusual I might have done in compiling Firefox (and I've been doing this for years now). My .mozconfig file looks like this: mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-@CONFIG_GUESS@ mk_add_options MOZ_MAKE_FLAGS=-j4 mk_add_options AUTOCONF=autoconf2.13 mk_add_options MOZ_CO_PROJECT=browser . $topsrcdir/browser/config/mozconfig ac_add_options --prefix=/opt/firefox ac_add_options --enable-optimize='-march=nocona -O3' ac_add_options --enable-official-branding ac_add_options --enable-startup-notification ac_add_options --disable-tests ac_add_options --disable-mochitest One difference between the Mozilla builds and mine is that mine used gcc 4.6.3-1ubuntu5 (the default compiler on Ubuntu 12.04.1 LTS) whereas the Mozilla builds used gcc 4.5.2. Another difference is that (comparing the /proc/$PID/maps data) my custom build loads /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1.0.0 and /usr/lib/x86_64-linux-gnu/libxcb-util.so.0.0.0 and /usr/lib/x86_64-linux-gnu/libstartup-notification-1.so.0.0.0 which the Mozilla build (19.0b1 build2) does not. I don't know what these libraries do, but they're the only difference in shared libraries between the two builds. I'll see if I can find a way to build Firefox with XCB disabled. Any test suggestions are welcome.
Update: I tried to compile with ac_add_options --disable-startup-notification added to the above options: this removed the use of the aforementioned libraries but did not fix the bug. So the XCB difference seems to be a red herring. I don't know what else to test.
I found the time (and patience) to run an hg bisect on this: the bug was introduced by commit http://hg.mozilla.org/mozilla-central/rev/60f8112284ec (this just activates preference image.high_quality_downscaling.enabled however): see bug 795940. I still don't know why I'm having this issue only with my custom builds and not with Mozilla nightly builds.
Update: after various tests, it seems that Ubuntu's gcc-4.6 (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)) is to blame. Or at least, compiling with gcc-4.5 (gcc version 4.5.3 (Ubuntu/Linaro 4.5.3-12ubuntu2)) does not cause the same bug. Neither does Debian's gcc-4.7 (gcc version 4.7.2 (Debian 4.7.2-5)). So, to summarize the problem: compiling the high-quality downscaler with the default gcc from Ubuntu 12.04.1 LTS gives a buggy result. I'll let someone else decide whether this means the bug should be closed, forwarded to Ubuntu or GCC, worked around in Firefox, or whatever.
(In reply to David A. Madore from comment #6) Because of this I'm moving this to buildconfig. We should either fix this by blacklisting the compiler or close the bug.
Component: Graphics → Build Config
I just tried compiling with Ubuntu's gcc 4.7.2-2ubuntu1 which comes with Ubuntu 12.10 Quantal Quetzal, and the same problem occurs. Since Debian's gcc 4.7.2-5 does not have the problem, it must be due to an Ubuntu patch. Let me reiterate this: compiling the high-quality downscaler with the default gcc (4.6.3-1ubuntu5) from Ubuntu 12.04.1 LTS Precise Pangolin _OR_ the default gcc (4.7.2-2ubuntu1) Ubuntu 12.10 Quantal Quetzal, gives a buggy result. But not that (4.7.2-5) currently in Debian Testing. I lack the resources to bisect the Ubuntu patch set to find which patch is causing the problem. Sadly, Ubuntu is so overwhelmed by bug reports that they never respond to them, so I don't know what can be done about this.
I just tried opening the image in comment #0 with the Ubuntu build of Firefox 20 in 12.04, and I don't see any artefacts with the downscaled image. Does the problem occur if you build Firefox with the default compiler optimizations? (I see you're passing --enable-optimize='-march=nocona -O3' in your mozconfig) In any case, you should probably report a GCC bug in Launchpad.
I think this is a duplicate of bug #642376 https://bugzilla.mozilla.org/show_bug.cgi?id=642376 So it 1st appears with FF 4.0 on windows I'm added some additional info to that bug report Also disabling image.high_quality_downscaling.enabled works for me
Summary: display artefacts (white regions) when displaying scaled images → display artifacts (white regions) when displaying scaled images
You need to log in before you can comment on or make changes to this bug.