Display corruption with hardware acceleration enabled (intel gfx on windows)




a year ago
8 months ago


(Reporter: eamon, Unassigned)



53 Branch

Firefox Tracking Flags

(platform-rel +)


(Whiteboard: [gfx-noted][platform-rel-Intel])


(4 attachments)



a year ago
Created attachment 8832839 [details]

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:53.0) Gecko/20100101 Firefox/53.0
Build ID: 20170202004013

Steps to reproduce:

I used a windows 10 machine with an intel HD4600 gfx adapter.  
The screen is in portrait mode with resolution 1440x2560.

Open a long page, e.g. https://bugzilla.mozilla.org/show_bug.cgi?id=1067470

scroll down "quite a bit"

Actual results:

eventually horizontal band of display corruption appears.  Usually this band is hundreds of pixels high and background colors still appear, but font glyphs and images do not (see screenshot).  Sometimes scrolling a small amount will cause the corrupted area to turn completely black (or if black, background-only) again.  Continuously scrolling causes the region to flicker.

Expected results:

The region should render as usual (i.e. as in chrome/edge/FF without hw-accel).

Comment 1

a year ago
This bug has occurred for at least several months, on various stable, dev edition and nightly builds.

Comment 2

a year ago
Application Basics

Name: Firefox
Version: 53.0a2
Build ID: 20170202004013
Update Channel: aurora
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:53.0) Gecko/20100101 Firefox/53.0
OS: Windows_NT 10.0
Multiprocess Windows: 1/1 (Enabled by user)
Safe Mode: false

Crash Reports for the Last 3 Days

All Crash Reports


Name: Application Update Service Helper
Version: 1.0
Enabled: true
ID: aushelper@mozilla.org

Name: FlyWeb
Version: 1.0.0
Enabled: true
ID: flyweb@mozilla.org

Name: Form Autofill
Version: 1.0
Enabled: true
ID: formautofill@mozilla.org

Name: KeeFox
Version: 1.6.4b1
Enabled: true
ID: keefox@chris.tomlinson

Name: Multi-process staged rollout
Version: 1.7
Enabled: true
ID: e10srollout@mozilla.org

Name: Pocket
Version: 1.0.5
Enabled: true
ID: firefox@getpocket.com

Name: Presentation
Version: 1.0.0
Enabled: true
ID: presentation@mozilla.org

Name: Self-Destructing Cookies
Version: 0.4.11
Enabled: true
ID: jid0-9XfBwUWnvPx4wWsfBWMCm4Jj69E@jetpack

Name: SHA-1 deprecation staged rollout
Version: 1.0
Enabled: true
ID: disableSHA1rollout@mozilla.org

Name: Shield Recipe Client
Version: 1.0.0
Enabled: true
ID: shield-recipe-client@mozilla.org

Name: uBlock Origin
Version: 1.10.6
Enabled: true
ID: uBlock0@raymondhill.net

Name: Web Compat
Version: 1.0
Enabled: true
ID: webcompat@mozilla.org

Name: ADB Helper
Version: 0.9.2
Enabled: false
ID: adbhelper@mozilla.org

Name: CacheViewer
Enabled: false
ID: {71328583-3CA7-4809-B4BA-570A85818FBB}

Name: CSS Usage
Enabled: false
ID: csscoverage@spaghetticoder.org

Name: Password Exporter
Version: 1.3.2
Enabled: false
ID: {B17C1C5A-04B1-11DB-9804-B622A1EF5492}

Name: Pocket
Enabled: false
ID: isreaditlater@ideashower.com

Name: Valence
Version: 0.3.7
Enabled: false
ID: fxdevtools-adapters@mozilla.org


Compositing: Direct3D 11
Asynchronous Pan/Zoom: wheel input enabled; touch input enabled
WebGL Renderer: Google Inc. -- ANGLE (Intel(R) HD Graphics 4600 Direct3D11 vs_5_0 ps_5_0)
WebGL2 Renderer: Google Inc. -- ANGLE (Intel(R) HD Graphics 4600 Direct3D11 vs_5_0 ps_5_0)
Hardware H264 Decoding: Yes; Failed to create D3D11 device for decoder; Using D3D9 API
Audio Backend: wasapi
Direct2D: true
DirectWrite: true (10.0.14393.351)
GPU #1
Active: Yes
Description: Intel(R) HD Graphics 4600
Vendor ID: 0x8086
Device ID: 0x0412
Driver Version:
Driver Date: 9-29-2016
Drivers: igdumdim64 igd10iumd64 igd10iumd64 igd12umd64 igdumdim32 igd10iumd32 igd10iumd32 igd12umd32
Subsys ID: 79161462
RAM: Unknown

ClearType Parameters: DISPLAY1 [ Gamma: 2,2 Pixel Structure: RGB ClearType Level: 0 Enhanced Contrast: 200 ] DISPLAY2 [ Gamma: 2,2 Pixel Structure: RGB ClearType Level: 0 Enhanced Contrast: 200 ] DISPLAY3 [ Gamma: 2,2 Pixel Structure: RGB ClearType Level: 0 Enhanced Contrast: 200 ]
AzureCanvasAccelerated: 0
AzureCanvasBackend: skia
AzureContentBackend: skia
AzureFallbackCanvasBackend: cairo
Decision Log
disabled by default: Disabled by default
Crash Guard Disabled Features

Important Modified Preferences

accessibility.typeaheadfind.flashBar: 0
browser.cache.disk.capacity: 358400
browser.cache.disk.filesystem_reported: 1
browser.cache.disk.hashstats_reported: 1
browser.cache.disk.smart_size_cached_value: 358400
browser.cache.disk.smart_size.first_run: false
browser.cache.disk.smart_size.use_old_max: false
browser.cache.frecency_experiment: 4
browser.download.importedFromSqlite: true
browser.download.manager.alertOnEXEOpen: false
browser.fixup.domainwhitelist.ontwikkel2: true
browser.places.smartBookmarksVersion: 8
browser.sessionstore.restore_on_demand: false
browser.sessionstore.upgradeBackup.latestBuildID: 20170202004013
browser.startup.homepage: about:home
browser.startup.homepage_override.buildID: 20170202004013
browser.startup.homepage_override.mstone: 53.0a2
browser.tabs.remote.autostart: true
browser.tabs.remote.autostart.2: false
browser.tabs.warnOnClose: false
browser.tabs.warnOnOpen: false
browser.urlbar.suggest.searches: true
browser.urlbar.userMadeSearchSuggestionsChoice: true
dom.apps.lastUpdate.buildID: 20160801004002
dom.apps.lastUpdate.mstone: 49.0a2
dom.apps.reset-permissions: true
dom.gamepad.extensions.enabled: true
dom.mozApps.used: true
dom.push.userAgentID: 439a2d9b02c541db9522d9e5d8bf17e1
extensions.lastAppVersion: 53.0a2
font.internaluseonly.changed: true
gfx.crash-guard.d3d11layers.appVersion: 52.0a2
gfx.crash-guard.d3d11layers.deviceID: 0x0412
gfx.crash-guard.d3d11layers.feature-d2d: true
gfx.crash-guard.d3d11layers.feature-d3d11: true
gfx.crash-guard.d3d11video.appVersion: 53.0a2
gfx.crash-guard.d3d11video.deviceID: 0x0412
gfx.crash-guard.glcontext.gfx.driver-init.direct3d11-angle: true
gfx.crash-guard.glcontext.gfx.driver-init.webgl-angle: true
gfx.crash-guard.glcontext.gfx.driver-init.webgl-angle-force-d3d11: false
gfx.crash-guard.glcontext.gfx.driver-init.webgl-angle-force-warp: false
gfx.crash-guard.glcontext.gfx.driver-init.webgl-angle-try-d3d11: true
gfx.crash-guard.status.: 2
gfx.crash-guard.status.d3d11layers: 2
gfx.crash-guard.status.d3d11video: 2
gfx.crash-guard.status.d3d9video: 2
gfx.crash-guard.status.glcontext: 3
gfx.direct3d.last_used_feature_level_idx: 0
gfx.driver-init.appVersion: 43.0a1
gfx.driver-init.deviceID: 0x0412
gfx.driver-init.feature-d2d: true
gfx.driver-init.feature-d3d11: true
gfx.driver-init.status: 2
media.benchmark.vp9.fps: 302
media.benchmark.vp9.versioncheck: 1
media.gmp-eme-adobe.abi: x86_64-msvc-x64
media.gmp-eme-adobe.lastUpdate: 1456402354
media.gmp-eme-adobe.version: 17
media.gmp-gmpopenh264.abi: x86_64-msvc-x64
media.gmp-gmpopenh264.lastUpdate: 1471417139
media.gmp-gmpopenh264.path: C:\Users\nerbonne\AppData\Roaming\Mozilla\Firefox\Profiles\697xr54l.default\gmp-gmpopenh264
media.gmp-gmpopenh264.version: 1.6
media.gmp-manager.buildID: 20170202004013
media.gmp-manager.lastCheck: 1486033260
media.gmp-widevinecdm.abi: x86_64-msvc-x64
media.gmp-widevinecdm.enabled: false
media.gmp-widevinecdm.lastUpdate: 1471417139
media.gmp.storage.version.observed: 1
media.hardware-video-decoding.failed: false
network.cookie.lifetimePolicy: 2
network.cookie.prefsMigrated: true
network.dns.disablePrefetch: true
network.http.speculative-parallel-limit: 0
network.predictor.cleaned-up: true
network.prefetch-next: false
places.database.lastMaintenance: 1485441994
places.history.expiration.transient_current_max_pages: 147985
plugin.disable_full_page_plugin_for_types: application/pdf
plugin.importedState: true
print.printer_\\https://dre02.workspace.rug.nl\PRN104264.print_bgcolor: true
print.printer_\\https://dre02.workspace.rug.nl\PRN104264.print_bgimages: true
print.printer_\\https://dre02.workspace.rug.nl\PRN104264.print_duplex: 1515870810
print.printer_\\https://dre02.workspace.rug.nl\PRN104264.print_edge_bottom: 0
print.printer_\\https://dre02.workspace.rug.nl\PRN104264.print_edge_left: 0
print.printer_\\https://dre02.workspace.rug.nl\PRN104264.print_edge_right: 0
print.printer_\\https://dre02.workspace.rug.nl\PRN104264.print_edge_top: 0
print.printer_\\https://dre02.workspace.rug.nl\PRN104264.print_evenpages: true
print.printer_\\https://dre02.workspace.rug.nl\PRN104264.print_in_color: true
print.printer_\\https://dre02.workspace.rug.nl\PRN104264.print_margin_bottom: 0.5
print.printer_\\https://dre02.workspace.rug.nl\PRN104264.print_margin_left: 0.5
print.printer_\\https://dre02.workspace.rug.nl\PRN104264.print_margin_right: 0.5
print.printer_\\https://dre02.workspace.rug.nl\PRN104264.print_margin_top: 0.5
print.printer_\\https://dre02.workspace.rug.nl\PRN104264.print_oddpages: true
print.printer_\\https://dre02.workspace.rug.nl\PRN104264.print_orientation: 0
print.printer_\\https://dre02.workspace.rug.nl\PRN104264.print_page_delay: 50
print.printer_\\https://dre02.workspace.rug.nl\PRN104264.print_paper_data: 32767
print.printer_\\https://dre02.workspace.rug.nl\PRN104264.print_paper_height: 11,00
print.printer_\\https://dre02.workspace.rug.nl\PRN104264.print_paper_size_type: 0
print.printer_\\https://dre02.workspace.rug.nl\PRN104264.print_paper_size_unit: 0
print.printer_\\https://dre02.workspace.rug.nl\PRN104264.print_paper_width: 8,50
print.printer_\\https://dre02.workspace.rug.nl\PRN104264.print_resolution: 1515870810
print.printer_\\https://dre02.workspace.rug.nl\PRN104264.print_reversed: false
print.printer_\\https://dre02.workspace.rug.nl\PRN104264.print_scaling: 1,10
print.printer_\\https://dre02.workspace.rug.nl\PRN104264.print_shrink_to_fit: false
print.printer_\\https://dre02.workspace.rug.nl\PRN104264.print_to_file: false
print.printer_\\https://dre02.workspace.rug.nl\PRN104264.print_unwriteable_margin_bottom: 0
print.printer_\\https://dre02.workspace.rug.nl\PRN104264.print_unwriteable_margin_left: 0
print.printer_\\https://dre02.workspace.rug.nl\PRN104264.print_unwriteable_margin_right: 0
print.printer_\\https://dre02.workspace.rug.nl\PRN104264.print_unwriteable_margin_top: 0
print.printer_\\https://dre02.workspace.rug.nl\PRN104265.print_bgcolor: true
print.printer_\\https://dre02.workspace.rug.nl\PRN104265.print_bgimages: true
print.printer_\\https://dre02.workspace.rug.nl\PRN104265.print_downloadfonts: false
print.printer_\\https://dre02.workspace.rug.nl\PRN104265.print_duplex: 1515870810
print.printer_\\https://dre02.workspace.rug.nl\PRN104265.print_edge_bottom: 0
print.printer_\\https://dre02.workspace.rug.nl\PRN104265.print_edge_left: 0
print.printer_\\https://dre02.workspace.rug.nl\PRN104265.print_edge_right: 0
print.printer_\\https://dre02.workspace.rug.nl\PRN104265.print_edge_top: 0
print.printer_\\https://dre02.workspace.rug.nl\PRN104265.print_evenpages: true
print.printer_\\https://dre02.workspace.rug.nl\PRN104265.print_in_color: true
print.printer_\\https://dre02.workspace.rug.nl\PRN104265.print_margin_bottom: 0.5
print.printer_\\https://dre02.workspace.rug.nl\PRN104265.print_margin_left: 0.5
print.printer_\\https://dre02.workspace.rug.nl\PRN104265.print_margin_right: 0.5
print.printer_\\https://dre02.workspace.rug.nl\PRN104265.print_margin_top: 0.5
print.printer_\\https://dre02.workspace.rug.nl\PRN104265.print_oddpages: true
print.printer_\\https://dre02.workspace.rug.nl\PRN104265.print_orientation: 0
print.printer_\\https://dre02.workspace.rug.nl\PRN104265.print_page_delay: 50
print.printer_\\https://dre02.workspace.rug.nl\PRN104265.print_paper_data: 32767
print.printer_\\https://dre02.workspace.rug.nl\PRN104265.print_paper_height: 11,00
print.printer_\\https://dre02.workspace.rug.nl\PRN104265.print_paper_size_type: 0
print.printer_\\https://dre02.workspace.rug.nl\PRN104265.print_paper_size_unit: 0
print.printer_\\https://dre02.workspace.rug.nl\PRN104265.print_paper_width: 8,50
print.printer_\\https://dre02.workspace.rug.nl\PRN104265.print_resolution: 1515870810
print.printer_\\https://dre02.workspace.rug.nl\PRN104265.print_reversed: false
print.printer_\\https://dre02.workspace.rug.nl\PRN104265.print_scaling: 1,10
print.printer_\\https://dre02.workspace.rug.nl\PRN104265.print_shrink_to_fit: false
print.printer_\\https://dre02.workspace.rug.nl\PRN104265.print_to_file: false
print.printer_\\https://dre02.workspace.rug.nl\PRN104265.print_unwriteable_margin_bottom: 0
print.printer_\\https://dre02.workspace.rug.nl\PRN104265.print_unwriteable_margin_left: 0
print.printer_\\https://dre02.workspace.rug.nl\PRN104265.print_unwriteable_margin_right: 0
print.printer_\\https://dre02.workspace.rug.nl\PRN104265.print_unwriteable_margin_top: 0
print.printer_myPrint.print_bgcolor: false
print.printer_myPrint.print_bgimages: false
print.printer_myPrint.print_duplex: -437918235
print.printer_myPrint.print_edge_bottom: 0
print.printer_myPrint.print_edge_left: 0
print.printer_myPrint.print_edge_right: 0
print.printer_myPrint.print_edge_top: 0
print.printer_myPrint.print_evenpages: true
print.printer_myPrint.print_footerleft: &PT
print.printer_myPrint.print_footerright: &D
print.printer_myPrint.print_headerleft: &T
print.printer_myPrint.print_headerright: &U
print.printer_myPrint.print_in_color: true
print.printer_myPrint.print_margin_bottom: 0.5
print.printer_myPrint.print_margin_left: 0.5
print.printer_myPrint.print_margin_right: 0.5
print.printer_myPrint.print_margin_top: 0.5
print.printer_myPrint.print_oddpages: true
print.printer_myPrint.print_orientation: 0
print.printer_myPrint.print_page_delay: 50
print.printer_myPrint.print_paper_data: 9
print.printer_myPrint.print_paper_height: 297,00
print.printer_myPrint.print_paper_size_unit: 1
print.printer_myPrint.print_paper_width: 210,00
print.printer_myPrint.print_resolution: 600
print.printer_myPrint.print_reversed: false
print.printer_myPrint.print_scaling: 1,00
print.printer_myPrint.print_shrink_to_fit: true
print.printer_myPrint.print_to_file: false
print.printer_myPrint.print_unwriteable_margin_bottom: 0
print.printer_myPrint.print_unwriteable_margin_left: 0
print.printer_myPrint.print_unwriteable_margin_right: 0
print.printer_myPrint.print_unwriteable_margin_top: 0
privacy.cpd.cache: false
privacy.cpd.cookies: false
privacy.cpd.downloads: false
privacy.cpd.history: false
privacy.cpd.sessions: false
privacy.donottrackheader.enabled: true
privacy.sanitize.migrateClearSavedPwdsOnExit: true
privacy.sanitize.migrateFx3Prefs: true
privacy.sanitize.timeSpan: 0
security.sandbox.content.tempDirSuffix: {695262fa-7fd9-4dc2-bfcb-d767dd391837}
services.sync.declinedEngines: adblockplus
services.sync.engine.prefs.modified: false
services.sync.lastPing: 1485964747
services.sync.lastSync: Thu Feb 02 2017 13:14:16 GMT+0100 (W. Europe Standard Time)
services.sync.numClients: 3
storage.vacuum.last.index: 1
storage.vacuum.last.places.sqlite: 1483547844
ui.osk.debug.keyboardDisplayReason: IKPOS: Touch screen not found.

Important Locked Preferences

Places Database


Incremental GC:


Prevent Accessibility:

Library Versions

Experimental Features


Comment 3

a year ago
Corruption appears to start around pixel-row 8192.


a year ago
Component: Untriaged → Graphics
Product: Firefox → Core

Comment 4

a year ago
If you test with some old versions of Firefox, does it happen too?
http://ftp.mozilla.org/pub/firefox/releases/ (try FF48, 45, 40 e.g.)
Flags: needinfo?(eamon)

Comment 5

a year ago
Since there's so many copies, I used the following command to start new instance without messing up my normal profile or needing full windows profiles (I doubt that affects anything, but just to be sure):

firefox -profile EmnTmpProfile -no-remote -new-instance

I tried various versions (I tested esr versions first, and 32 bit unless otherwise mentioned):

Bugfree: 10.0.0, 31.0.0, 38.8.0, 45.7.0 (32+64 bit), 48.0.2 (32+64-bit)

Buggy: 48.0.2 (32-bit), 51.0.1 (32+64bit)

It's something of a hassle because if you're not careful, the old versions will in-place autoupdate and then you'll be testing something other than what you downloaded.  However, I'm pretty sure I got these tests without browser restarts (and I checked about:support to double check the versions too, which is how I noticed that autoupdated had kicked in sometimes).
Flags: needinfo?(eamon)

Comment 6

a year ago
Amusing trip down memory lane, all those old skins ;-).
Keywords: correctness
OS: Unspecified → Windows
Priority: -- → P3
Whiteboard: [gfx-noted]

Comment 7

a year ago
> Bugfree: 10.0.0, 31.0.0, 38.8.0, 45.7.0 (32+64 bit), 48.0.2 (32+64-bit)
> Buggy: 48.0.2 (32-bit), 51.0.1 (32+64bit)
I just noticed I listed 48 twice as both buggy and non-buggy; this was one of the versions where I accidentally let the auto-update happen, so I'm guessing the "buggy v48" was actually autoupdated to v51, but I'll recheck next time I'm behind that machine.  Sorry for the confusion!

Comment 8

a year ago
You can disable the update system in the options of your testing profile, I do that to have 10 old versions installed on my computer for testing, they never update.
platform-rel: --- → ?
Whiteboard: [gfx-noted] → [gfx-noted][platform-rel-Intel]


11 months ago
platform-rel: ? → +
Using a mozregression GUI tool, specifying 45 as a good release and the latest as a bad one, would let us narrow down this regression a lot better.  Any chance you could try using that?  It doesn't change the version(s) of Firefox you are using, just downloads and runs different ones to narrow things down.
Flags: needinfo?(eamon)

Comment 10

10 months ago
mozregression looks like a huge timesaver - thanks for the pointer!  I'll have access to the machine again on tuesday; I'll be sure to run it then!

Comment 11

10 months ago
I ran the 32-bit bisection a couple of times to be sure (if you scroll too quickly, the bug does not appear, so it took a few times to nail down).

But at this point, I'm sure this is the first problematic build:

app_name: firefox
build_date: 2015-07-25
build_file: C:\Users\nerbonne\.mozilla\mozregression\persist\2015-07-25--mozilla-central--firefox-42.0a1.en-US.win32.zip
build_type: nightly
build_url: https://archive.mozilla.org/pub/firefox/nightly/2015/07/2015-07-25-03-02-09-mozilla-central/firefox-42.0a1.en-US.win32.zip
changeset: d3228c82badd
pushlog_url: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=b0b3dcfa5557&tochange=d3228c82badd
repo_name: mozilla-central
repo_url: https://hg.mozilla.org/mozilla-central

mozregression then prints out a bug of debug messages looking for builds between b0b3dcfa5557..d3228c82badd, but appears not to be able to find any builds in that range.

I also checked about:support in the bad 2015-07-25 and the last working build 2015-07-24; they're identical except for some version info (unsurprising), some temp-dir info, and one more interesting difference: the bug-free 2015-07-24 reports "Asynchronous Pan/Zoom: none", whereas the buggy 2015-07-25 reports "Asynchronous Pan/Zoom: wheel input enabled"

I just checked with my primary profile (currently at 54.0a2 (2017-04-18) (64-bit)) - by default, it exhibits this bug too, but turning off hardware acceleration prevents the bug, as does leaving on hardware acceleration but setting layers.async-pan-zoom.enabled to false.
Flags: needinfo?(eamon)

Comment 12

10 months ago
In the range b0b3dcfa5557..d3228c82badd; this merged: https://bugzilla.mozilla.org/show_bug.cgi?id=1157745
Kats, this sounds vaguely familiar, but I thought only on OS X and with much larger pages.  Do you recall?

Either way, any more information we need, can we tell what's going on?
Flags: needinfo?(bugmail)
I don't recall seeing a bug quite like this one. However it's interesting that the corruption starts at y=8192. From the screenshot it looks like the corruption band is exactly 768 pixels tall. I'm guessing that for some reason we're going down into the codepath at [1] and creating a displayport that's 8192 pixels tall. But I'm not sure why the displayport isn't shifting down as you scroll and why the corruption area is where it is.

I can put together some builds with extra logging to try and get more information on what's going on here. Leaving needinfo on me for now.

[1] http://searchfox.org/mozilla-central/rev/66d9eb3103e429127c85a7921e16c5a02458a127/layout/base/nsLayoutUtils.cpp#1102
Actually, before I do a custom build, it would be useful to get a layers dump of this scenario. Do you happen to have cygwin installed? I find that cygwin shells can capture the stdout/stderr output from firefox whereas other shells such as the standard windows command prompt, powershell, and msys do not.

If you do have cygwin, please open a cygwin command shell and run firefox.exe from there. If you have it set up so that the profile manager window pops up first, please pass the -P <profile_name> option to firefox.exe to bypass the profile manager and start the profile directly. Otherwise firefox restarts when you select a profile and the restarted process doesn't send its output to the shell anymore. Once you have it running, go to about:config, set layers.dump to true, and reproduce the problem. Once you are reproducing the problem, grab the last few screenfuls of output from the command shell window (around 100 lines of output should do it) and attach it to this bug.

If you don't have cygwin and are unwilling to install it, let me know and I can make a build which logs it to a file or somewhere else that's easier to access. Thanks!
Flags: needinfo?(bugmail) → needinfo?(eamon)

Comment 16

10 months ago
Created attachment 8872600 [details]

I set layers.dump to true and used 54.0a2 (2017-04-18) (64-bit) to open one page and autoscroll past the problematic 8192 pixel boundary.  The corruption appeared when I did so (although the flashing seemed a lot slower that usual, perhaps due to the additional logging?)

Since the file compresses down to pretty much nothing, I just attached the whole thing, so I don't accidentally leave out anything relevant.

Aside: as you said, the output streams didn't work in plain cmd.exe, and they also didn't work in the (newish) bash in linux on windows, but they did appear using git bash (which is mingw bash).
Flags: needinfo?(eamon)
Thanks! This is very helpful - it shows that the displayport is 8960 pixels tall, which in a way explains some of the behaviour. For whatever reason we're making the displayport 8960 pixels tall but presumably the graphics card only uses 8192 pixels of that and so the remaining 768 ends up garbage. Some open questions:
- are computing the 8960 correctly? In theory we should not be generating a displayport larger than the max allowed texture size on the graphics card. If the max allowed texture size is being misreported or there is a bug in our calculations here we might end up with a too-large displayport.
- is there a 8192 limit elsewhere in the code? maybe we only upload textures upto 8192 somewhere else in the code, so even though the displayport is correct and the graphics card supports it we're ending up with garbage in the bottom 768 pixels
- why is it possible to scroll into this area of garbage? as the scroll position moves down the displayport should as well so unless you're at the bottom of the page we shouldn't really be seeing the garbage.

I'll put together a build with more logging for you to run that should help answer some of these questions.
It'd be interesting to see if the problem goes away with the about:config value of gfx.max-texture-size set to 8192 (and a restart.)
Sorry for the delay, the build with logging is at https://archive.mozilla.org/pub/firefox/try-builds/kgupta@mozilla.com-e02271c6b0bf4017c579fdbd1c0fe74a2afdceb3/try-win64/ - please run this, reproduce the problem, and collect the output as before. It might be good to do it with layers.dump set to true as before. There isn't much logging I added because honestly I wasn't sure what would be good places to log, but hopefully this will narrow it down a little bit.

And yes, trying the suggestion in comment 18 would also be useful to see if it fixes the problem.
Flags: needinfo?(eamon)

Comment 20

10 months ago
Created attachment 8873386 [details]

I attached the dump of the logging output of the extra build you provided (with layers.dump true).
Flags: needinfo?(eamon)

Comment 21

10 months ago
Created attachment 8873389 [details]

Separately, I also tried playing with gfx.max-texture-size; I tried 4096, 8192, and 16384.  16384 superficially appears to have no effect.  8192 and 4096 break differently; it appears the content sometimes wraps.  This is much harder to notice however, since most of the screen looks reasonable, it's just that there are discontinutities; I attached a screenshot of a fairly obvious example.  But I also encountered situations where the scrollbar was at the top of the extend, and the entire screen looked reasonable, and yet it was obviously not the top of the page.
So the logging indicates the driver/LayerManager is reporting a max texture size of 16384, and the gecko side is capping the max texture at 32767 in the absence of a pref override. So as far as we can tell, displayport sizes anywhere up to 16384 should work fine. Therefore the layout code picks a displayport size of 8960 which should work. However, when we go to actually upload the texture it seems to somehow limit it to 8192 pixels and fill the rest with garbage. I can't find any place in the gecko code that induces this limit, so I suspect it is in the graphics driver.

Also supporting this theory is your results with different gfx.max-texture-size values. When this pref is changed, the displayport size doesn't change (it doesn't take into account the value of this pref, although arguably it should... I'll file something for that). So let's say you've changed gfx.max-texture-size to 8192 - in this case the displayport is still going to be 8960 pixels tall, but this time it's the gecko code that's going to limit the size of the texture upload. And the remaining space is going to be filled with whatever was drawn before, which is why you see the discontinuities but of "reasonable looking" screen contents. In this scenario, at no point do we actually upload garbage from gecko. The discontinuities are a result of the mismatch between the displayport and compositor's notions of the max texture size, which is something we can fix.
Actually I found another place we have a 8192 limit. I'll make another build with both things fixed and let's see if that helps.
Can you please try with the build at https://archive.mozilla.org/pub/firefox/try-builds/kgupta@mozilla.com-aa6d7a3b3c069ebf70c8c841824070a23e89d9af/try-win64/ ? No need to collect logging in this one, just observe the behaviour in the default configuration and with gfx.max-texture-size set to 4096 or 8192. With the modified gfx.max-texture-size at least I would expect the behaviour to be normal (no more discontinuities) but in the default configuration it may or may not be fixed.
Flags: needinfo?(eamon)

Comment 25

9 months ago
Sorry for the delay, I'm on vacation; I'll update once I have access to the problem machine again, which should be at the latest the first week of july.
Flags: needinfo?(eamon)

Comment 26

9 months ago
Back from vacation!

The link you provide https://archive.mozilla.org/pub/firefox/try-builds/kgupta@mozilla.com-aa6d7a3b3c069ebf70c8c841824070a23e89d9af/try-win64/ returns a 404 - perhaps it's expired?  Can you reupload the build?
Flags: needinfo?(bugmail)
The link should work now, I triggered a rebuild of the expired one.
Flags: needinfo?(bugmail) → needinfo?(eamon)

Comment 28

9 months ago
I ran the build you provided multiple times with various values for max-texture size.  When gfx.max-texture size is unset, the corruption occurs as usual. When gfx.max-texture size is set to 4096 or 8192, the issue does not occur.
Flags: needinfo?(eamon)
Thanks, I filed bug 1378355 for updating GetMaxDisplayPortSize. However since the corruption still occurred for you with gfx.max-texture-size unset, the other "8192" that I changed had no effect. I'm suspecting a driver limitation here.
Bug 1378355 is now landed, so if you go to about:config on today's nightly and set gfx.max-texture to 8192 you shouldn't see the issue any more. This allows you to work around what I believe is a driver fault.

Comment 31

8 months ago
Works for me (with gfx.max-texture=8192).

I wouldn't know how to test for this particular driver bug, but it certainly sounds plausible it's a driver issue.  A little worrying to see that in what's probably one of the most common GFX drivers around (intel HD graphics), but then again, the screen layout is unusual (portrait mode 2560x1440).

Thanks for the fix!

Comment 32

8 months ago
(Incidentally, I just tried reinstalling the latest driver from windows update; no change).
I'm tempted to limit Intel HD to 8k maximum texture size.  It shouldn't be that much of a limiting factor, and we have proof by example that some devices in that range do not like larger textures.
Flags: needinfo?(jmuizelaar)
This is a Haswell Gen7.5 which is pretty common so we might want to investigate more.
Flags: needinfo?(jmuizelaar)
You need to log in before you can comment on or make changes to this bug.