Bug 193799 - www/firefox: image problems with Firefox 32.0
Summary: www/firefox: image problems with Firefox 32.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-gecko (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-20 18:53 UTC by Joseph Mingrone
Modified: 2014-12-16 11:57 UTC (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Mingrone freebsd_committer freebsd_triage 2014-09-20 18:53:37 UTC
After updating Firefox to 32, I've noticed many images don't load
properly. Sometimes they will show up for a moment, then disappear,
other times they will be distorted with black vertical bars.  I've moved ~/.mozilla out of the way and downgraded to cairo-1.10.2_10,2, but the problem remains.  I'm running 9.3-STABLE amd64 903501 with xorg-server-1.12.4_9,1.  Below is a link to a screenshot showing what I'm talking about.

http://i.imgur.com/f40cVg9.png
Comment 1 Walter Schwarzenfeld 2014-09-20 19:14:53 UTC
Had the same problems. The images (most jpegs) will be visible if I zoom it to 170%. 
(I could solve most of the problems, "playing" with zooming and font-sizes, but it's not really solved).
Comment 2 Jan Beich freebsd_committer freebsd_triage 2014-09-20 19:48:42 UTC
firefox-32.0 still uses internal cairo (fork of 1.9.x) and was switched from system cairo due to scrolling artifacts with nvidia-driver. As they don't happen with 1.12.x I'm planning to switch back at the next update.

Try testing different cairo versions after applying (click on "Unified diff") the following change:
https://trillian.chruetertee.ch/freebsd-gecko/changeset/1695/branches/firefox32/www/firefox

Looking at your screenshot the issue is likely with X11 driver. Can you reproduce with x11-drivers/xf86-video-vesa ?
Comment 3 Joseph Mingrone freebsd_committer freebsd_triage 2014-09-20 21:59:03 UTC
Neither using the vesa driver nor, unfortunately, using the cario port (patch) fixes the problem.
Comment 4 Joseph Mingrone freebsd_committer freebsd_triage 2014-09-20 23:17:44 UTC
I was actually building Firefox with poudriere on a build sever running 9.2-RELEASE.  Building directly on the laptop running 9.3-STABLE amd64 903501 with cairo-1.12.16_1,2 (and patching the firefox port to use it) fixes the problem.
Comment 5 Callum Gibson 2014-10-08 11:20:11 UTC
Something else weird is going on I think. I've got the latest cairo-enabled version on my 9-stable amd64 box and still have these symptoms. Tried backing out r369237 which also made no difference.
Yet on a 10-stable amd64 machine, it's ok. The problem still shows up using an Xvnc framebuffer, so it's not nvidia driver related it seems. Not sure what else to try at this stage.
Comment 6 Bengt Ahlgren 2014-10-21 21:43:03 UTC
It seems like this is the same bug upstreams:

https://bugzilla.mozilla.org/show_bug.cgi?id=810604

Short summary is that compiling with -O3 makes the problem appear.

Un-setting the port option OPTIMIZED_CFLAGS fixes the issue for me.  I therefore suggest that this is made the default, as it used to be.

A workaround is also to unset the about:config option image.high_quality_downscaling.enabled.
Comment 7 Bengt Ahlgren 2014-10-21 21:51:45 UTC
Adding www/firefox port maintainer (gecko@) to cc: list!
Comment 8 Callum Gibson 2014-10-22 07:55:21 UTC
Yes, I also found disabling OPTIMIZED_CFLAGS fixed it.
Comment 9 Ashish SHUKLA freebsd_committer freebsd_triage 2014-11-07 13:21:02 UTC
I didn't build with OPTIMIZED_CFLAGS, but tried the "image.high_quality_downscaling.enabled" workaround which fixed for me in Firefox 33.0.

Before workaround: http://i.imgur.com/XxgWmUo.png
After workaround:  http://i.imgur.com/CCHW7Cb.png

Thanks in advance for fixing
Comment 10 Jan Beich freebsd_committer freebsd_triage 2014-11-13 04:49:47 UTC
The issue here *seems* to be specific to GCC builds. gecko@ is going to switch default compiler back to clang after bug 193555 was resolved. Let's see what happens after Firefox 34.0 update when the following change lands.

https://trillian.chruetertee.ch/freebsd-gecko/changeset/1737

In the meantime one can try bisecting -ffoo flags from |gcc49 -O3 -Q --help=optimizers| to learn more why the issue occurs.

Assigning to gecko@ as cairo-relation became ambiguous and comment 5 suggests not only open-source drivers are affected.
Comment 11 Bengt Ahlgren 2014-11-13 09:36:05 UTC
Thanks for looking into this, Jan!  Regarding drivers: I experienced the problem with both intel and proprietary nvidia drivers on amd64.
Comment 12 Jan Beich freebsd_committer freebsd_triage 2014-12-11 02:36:57 UTC
Can you confirm the issue still happens after ports r373830?
Comment 13 Joseph Mingrone freebsd_committer freebsd_triage 2014-12-11 18:44:11 UTC
No problems anymore on my end.
Comment 14 Bengt Ahlgren 2014-12-14 23:35:57 UTC
No more problems with OPTIMIZED_CFLAGS set! Thanks!
Comment 15 Callum Gibson 2014-12-16 03:54:42 UTC
Confirmed, this now works.
Comment 16 Ashish SHUKLA freebsd_committer freebsd_triage 2014-12-16 09:52:02 UTC
Works for me too.

Thanks!