Closed Bug 1097941 Opened 10 years ago Closed 10 years ago

B2G: Scrolling browser frame in landscape mode is broken

Categories

(Core :: Graphics, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla37
blocking-b2g 2.1+
Tracking Status
firefox35 --- wontfix
firefox36 --- wontfix
firefox37 --- fixed
b2g-v2.0 --- unaffected
b2g-v2.1 --- verified
b2g-v2.2 --- verified

People

(Reporter: gwagner, Assigned: BenWa)

References

()

Details

(Keywords: regression, Whiteboard: [systemsfe])

Attachments

(7 files, 3 obsolete files)

STR:
Open link in landscape mode
Open overflow menu
scroll to hide/open rocketbar

See video
[Blocking Requested - why for this release]:
Major gfx glitch.
blocking-b2g: --- → 2.1?
Flags: needinfo?(milan)
Keywords: regression
Let's get a regression range once we get this 2.1+.
Flags: needinfo?(milan)
Scrolling is broken.
blocking-b2g: 2.1? → 2.1+
QA Contact: ckreinbring
The bug repros on Flame 2.2 and 2.1 engineering with shallow flash:
Actual result: With the Software Home Button enabled, opening the options menu from the ... button then closing it will cause the options menu to reappear as the user scrolls down the page.  The software home button did not change location when the landscape view was switched to.

Flame 2.2
BuildID: 20141112125016
Gaia: 65d593cdd9d88648045a30a63fc329b7bb5d340b
Gecko: 66cdb18f36da
Platform Version: 36.0a1
Firmware Version: V188-1
User Agent: Mozilla/5.0 (Mobile; rv:36.0) Gecko/36.0 Firefox/36.0

Flame 2.1
BuildID: 20141112105608
Gaia: 4c159e75a1568afbbf0c83c1235ec56facfbe87d
Gecko: a8e5d71d941d
Platform Version: 34.0
Firmware Version: V188-1
User Agent: Mozilla/5.0 (Mobile; rv:34.0) Gecko/34.0 Firefox/34.0

--------------------------------------------------------------------------------------------------------

The bug does not repro on Flame 2.0 engineering with shallow flash.
Actual result: There is no ... button, and tapping the 1> button then tapping Back will not cause the menu to appear as the user scrolls down the page.  The software home button's location is changed to remain at the bottom of the screen when the browser is viewed in landscape mode.

BuildID: 20141112124311
Gaia: ab83632c92f9fc571b11d8468b6901cc4ed905c0
Gecko: 5214ffe06d45
Platform Version: 32.0
Firmware Version: V188-1
User Agent: Mozilla/5.0 (Mobile; rv:32.0) Gecko/32.0 Firefox/32.0
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(jmitchell)
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(jmitchell)
could we assign dev to follow up? thanks.
Flags: needinfo?(pchang)
Flags: needinfo?(milan)
I couldn't reproduce in my local, how about the reproduce rate? Does it still happen if you disable HwcComposer from Developer option?
Flags: needinfo?(pchang) → needinfo?(anygregor)
(In reply to peter chang[:pchang][:peter] from comment #6)
> I couldn't reproduce in my local, how about the reproduce rate? Does it
> still happen if you disable HwcComposer from Developer option?

100% reproducible. As noted in comment 4, you have to enable the software home button.
Flags: needinfo?(anygregor)
Let's get the regression range so that we can narrow down Gaia vs. Gecko first.
Flags: needinfo?(milan)
Regression window
Last working
BuildID: 20141030125215
Gaia: cddf7f505c4c280bacb74c22af3fa4959ccb555a
Gecko: 2df5473a8fbb
Platform Version: 36.0a1
Firmware Version: V188-1
User Agent: Mozilla/5.0 (Mobile; rv:36.0) Gecko/36.0 Firefox/36.0

First broken
BuildID: 20141030130305
Gaia: 8ae6598f3ab7b0c34ac42a73083ddb74266affba
Gecko: 9e2062306f62
Platform Version: 36.0a1
Firmware Version: V188-1
User Agent: Mozilla/5.0 (Mobile; rv:36.0) Gecko/36.0 Firefox/36.0

Working Gaia / Broken Gecko = No repro
Gaia: cddf7f505c4c280bacb74c22af3fa4959ccb555a
Gecko: 9e2062306f62
Broken Gaia / Working Gecko = Repro
Gaia: 8ae6598f3ab7b0c34ac42a73083ddb74266affba
Gecko: 2df5473a8fbb
Gaia pushlog: https://github.com/mozilla-b2g/gaia/compare/cddf7f505c4c280bacb74c22af3fa4959ccb555a...8ae6598f3ab7b0c34ac42a73083ddb74266affba


B2G Inbound
Last working
BuildID: 20141030035317
Gaia: 872f8d3fe6e5f6b6101ff4ce5e895fea2aa8c451
Gecko: 4ce6ab22c779
Platform Version: 36.0a1
Firmware Version: V188-1
User Agent: Mozilla/5.0 (Mobile; rv:36.0) Gecko/36.0 Firefox/36.0

First broken
BuildID: 20141030062317
Gaia: 0f6aa5d044073b2ec08b21aad48026ae8be57c49
Gecko: 2e4c2e5c7135
Platform Version: 36.0a1
Firmware Version: V188-1
User Agent: Mozilla/5.0 (Mobile; rv:36.0) Gecko/36.0 Firefox/36.0

Working Gaia / Broken Gecko = No repro
Gaia: 872f8d3fe6e5f6b6101ff4ce5e895fea2aa8c451
Gecko: 2e4c2e5c7135
Broken Gaia / Working Gecko = Repro
Gaia: 0f6aa5d044073b2ec08b21aad48026ae8be57c49
Gecko: 4ce6ab22c779
Gaia pushlog: https://github.com/mozilla-b2g/gaia/compare/872f8d3fe6e5f6b6101ff4ce5e895fea2aa8c451...0f6aa5d044073b2ec08b21aad48026ae8be57c49
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(jmitchell)
Broken by Bug 1071114 ? can you take a look Etienne
Blocks: 1071114
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(jmitchell) → needinfo?(etienne)
QA Contact: ckreinbring
Taking this. Bug 1071114 was needed to solve many blockers, so it was uplifted. My guess is that it needed a branch patch. I will investigate.
Assignee: nobody → kgrandon
Status: NEW → ASSIGNED
Flags: needinfo?(etienne)
It is a bit strange that landscape scrolling was verified in bug 1071114 comment 29, but that this is showing up in a regression window. My hunch is that either the regression window might not be correct, or that several different issues could be causing this, bug 1071114 just being the final straw that reveals it.
Component: Graphics → Gaia::System
Product: Core → Firefox OS
Whiteboard: [systemsfe]
Target Milestone: --- → 2.1 S9 (21Nov)
Just to update, I'm still looking into this. I think what's possibly happened is that the landing of bug 1071114 has exposed a platform or graphics bug. Backing out bug 1071114 is out is not really an option as it exposes lots of other ugliness, and at least 1 blocker.

I'm currently still investigating this to see if I can narrow it down further, but not too much luck yet.
Etienne - I'm continuing to look at this, but I'm not sure if I'll be able to fix it by this Friday. Any chance you could also take a look to see if something from gaia could be causing this? It seems unlikely, but maybe there's some workaround we can implement?
Flags: needinfo?(etienne)
(In reply to Kevin Grandon :kgrandon (In Europe/Conf until 11/24) from comment #14)
> Etienne - I'm continuing to look at this, but I'm not sure if I'll be able
> to fix it by this Friday. Any chance you could also take a look to see if
> something from gaia could be causing this? It seems unlikely, but maybe
> there's some workaround we can implement?

Yes there's a fair amount of black magic going on with this menu, clearing it properly from the DOM should probably help avoid the issue.
Keeping the ni? flag, I'll have a look tomorrow.
Kats - do you think this could possibly be bug 844911?
Flags: needinfo?(bugmail.mozilla)
Unlikely, I think. This bug has similar visual symptoms but in this case there's no fixed position layer anywhere in the layer tree. Also in this case I do see the layer tree change while scrolling which doesn't happen in that bug.
Flags: needinfo?(bugmail.mozilla)
In an interesting turn of events, I can't reproduce the issue anymore on today's master (central from ~2 days ago).

Can somebody else confirm? Should we move to a 2.1 only workaround?
Flags: needinfo?(etienne) → needinfo?(anygregor)
I was able to reproduce it yesterday on Flame and using cnn.com, but I had to try a few times with opening the menu and rotating the phone. It also didn't happen without the software home button.
Thanks Kats, I was missing the SHB part, taking a look...
Bad news: the issue is still there even when removing the menu from the DOM entirely...
Thanks for the investigation Etienne. I suppose if that's the case we should move this into the Gfx component?

I'm not sure what the next best step is, perhaps trying to grab a layer dump? I also wonder if the effect is as long as the duration of the rocketbar animation. Maybe we can try extending the animation for several seconds to see what it does.

I suppose I can keep the assignee for now, but anyone can steal this.
Component: Gaia::System → Graphics
Flags: needinfo?(anygregor)
Product: Firefox OS → Core
Benoit, can you land a hand here?
Assignee: kgrandon → bgirard
Here's the layers dump I grabbed when I repro'd it yesterday. If you split it into the individual dumps using "split -p LayerManager <input-file> dump_" you can find the bad ones just by looking at the file sizes. It didn't really help me that much without knowing which layer is what though.
[Blocking Requested - why for this release]:
With the partner situation changing, we should re-evaluate whether this is a shipment blocker for 2.1 build.
blocking-b2g: 2.1+ → 2.1?
(In reply to No-Jun Park [:njpark] from comment #26)
> [Blocking Requested - why for this release]:
> With the partner situation changing, we should re-evaluate whether this is a
> shipment blocker for 2.1 build.

Note: This bug is only reproducible when SHB is enabled, per Comment 19
We are supporting SHB with 2.1
blocking-b2g: 2.1? → 2.1+
OS: All → Gonk (Firefox OS)
Hardware: All → ARM
I've ruled out hardware composer (Hwc). Still looking.
Bug 1100549 is another bug that happens when scrolling in landscape mode. Seems odd that these both happen when using rocketbar, and only in landscape. Just making a note in case they are potentially related.
Attached patch gaia workaroundSplinter Review
This has to do with the display item size it looks like. I don't really know how to debug this effectively =\.
Attached file Display List Dump
(In reply to Kevin Grandon :kgrandon from comment #30)
> Bug 1100549 is another bug that happens when scrolling in landscape mode.
> Seems odd that these both happen when using rocketbar, and only in
> landscape. Just making a note in case they are potentially related.

The bug seems related but so far I'm leaning towards no. I ruled out invalidation by invalidating everything and this bug doesn't go away. It's actually keeping a cache off the old content somehow and not just a layer I don't think. I don't think there's a link with bug 1100549.

I still haven't been able to determine which component of gecko is responsible for this bug so I have no ETA.
Alright some good process today:
- The wrong layer tree is sent to the compositor, it's not a compositor bug. I now also know which layer it's coming from. Tomorrow I will look into how that layer is being constructed.
- I'm seeing a really bad layer generation coming from the SHB. We will want to look into that in another bug. This will lead to wasted memory usage, wasted memory bandwidth, wasted power usage.
Attached image Bad layer texture data (obsolete) —
Attached image Bad layer texture data
I think this one is actually the bad texture. I pushed the changes to visualize these layer trees:
https://github.com/bgirard/cleopatra/commit/ecbf313233275bf834c90936b2674a169e4a231f

With this it's really easy to debug. I'm fairly sure we're just not respecting the visible region of the surface. I'll confirm tomorrow.
Attachment #8529976 - Attachment is obsolete: true
This might be it:
http://mxr.mozilla.org/mozilla-central/source/gfx/layers/composite/ContentHost.cpp#76

The bad layer has paint-will-resample. This code path would be causing us to draw the full bounds, the middle of which is just whatever was painted there before (the popup menu).
Attachment #8530406 - Flags: review?(jmuizelaar)
Comment on attachment 8530406 [details] [diff] [review]
Properly disable paint-will-resample on b2g

Review of attachment 8530406 [details] [diff] [review]:
-----------------------------------------------------------------

I'd prefer that you use a new define for this like:
#define MOZ_HANDLE_PAINT_WILL_RESAMPLE

and use that in all the places that need to match.
Attachment #8530406 - Flags: review?(jmuizelaar) → review+
https://hg.mozilla.org/mozilla-central/rev/756000f8f25c
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Please request b2g34 approval on this patch when you get a chance.
Flags: needinfo?(bgirard)
Target Milestone: 2.1 S9 (21Nov) → mozilla37
Comment on attachment 8530452 [details] [diff] [review]
Properly disable paint-will-resample on b2g

NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings.

[Approval Request Comment]
Bug caused by (feature/regressing bug #): need this patch to fix bug 1088452
User impact if declined: video playback broken
Testing completed: been on trunk for a while
Risk to taking this patch (and alternatives if risky): no known alternative to uplifting this patch. Patch looks straightforward
String or UUID changes made by this patch: none
Attachment #8530452 - Flags: approval-mozilla-b2g34?
Thanks roc, I was just getting around to this. +1 for uplift request.
Flags: needinfo?(bgirard)
Keywords: verifyme
Attachment #8530452 - Flags: approval-mozilla-b2g34? → approval-mozilla-b2g34+
Verified the issue is fixed on 2.2 Flame

No "Menu" appears when scrolling a page in "landscape" mode after the "menu" was previously opened

"Flame 2.2

Device: Flame 2.2 Master (319mb)(Kitkat Base)(Full Flash)
BuildID: 20141208040202
Gaia: 0e429d970c160e580e19e61ad8ff5612de159f00
Gecko: c4c7442e9113
Gonk: 48835395daa6a49b281db62c50805bd6ca24077e
Version: 37.0a1 (2.2 Master)
Firmware: V188-1
User Agent: Mozilla/5.0 (Mobile; rv:37.0) Gecko/37.0 Firefox/37.0"
==================================================================
Leaving "verifyme" for 2.1 patch uplift
Status: RESOLVED → VERIFIED
QA Whiteboard: [QAnalyst-Triage+] → [QAnalyst-Triage?]
Flags: needinfo?(ktucker)
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(ktucker)
Attached video verify (21).3gp (obsolete) —
Attachment #8534167 - Attachment is obsolete: true
Attached video Verify_Video_Flame.MP4
This issue has been verified successfully on Flame  2.1.
See attachment: Verify_Video_Flame.MP4
Reproducing rate: 0/10

Flame 2.1 version:
Gaia-Rev        c226db212db4d824c09617cd6dc407b2d4258d9b
Gecko-Rev       https://hg.mozilla.org/releases/mozilla-b2g34_v2_1/rev/cf8bebfa4703
Build-ID        20141209170126
Version         34.0
Device-Name     flame
FW-Release      4.4.2
FW-Incremental  eng.cltbld.20141209.212104
FW-Date         Tue Dec  9 21:21:15 EST 2014
Bootloader      L1TC00011880
Depends on: 1106611
Keywords: verifyme
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: