Closed Bug 1553969 Opened 5 years ago Closed 5 years ago

Alternative player for Twitch.tv video sometimes becomes permanently black when left playing in a background tab.

Categories

(Core :: Graphics: WebRender, defect, P3)

66 Branch
defect

Tracking

()

VERIFIED FIXED
mozilla69
Tracking Status
firefox-esr60 --- unaffected
firefox67 - wontfix
firefox67.0.1 --- wontfix
firefox68 --- verified
firefox69 --- verified

People

(Reporter: rowbot, Assigned: sotaro)

References

(Blocks 1 open bug)

Details

(Keywords: regression)

Attachments

(2 files, 1 obsolete file)

This was reported by a reddit[1] user as happening in 66 and 67. I was able to reproduce this using the latest nightly on Win 10, although reproduction seems sporadic. Perhaps some bad interaction with the tab being an add-ons tab (uses the moz-extension:// scheme) and lowering the priority of background tabs? Anyways, filing in gfx to start with.

STR:

  1. Install addon https://addons.mozilla.org/en-US/firefox/addon/twitch_5/
  2. Go to https://twitch.tv and watch any stream.
  3. In the top right corner, click the HTML5 button to activate the alternative player.
  4. Switch to another tab, so that the tab with the stream is in a background tab.
  5. Remove focus from the browser, such as minimizing it.
  6. Wait a few minutes.
  7. Refocus the browser and switch to the tab with the stream.

AR:
The video is black, but the audio is still playing.

ER:
The video should be rendered.

[1] https://www.reddit.com/r/firefox/comments/brw6c7/post_your_webrender_results/eoip18d?utm_source=share&utm_medium=web2x

EDIT: Updated STR to be more reliable.

Trevor,
Can you please test this with [1]68Beta?
(I think this seems to be duplication of Bug 1532495)

[1]https://www.mozilla.org/en-US/firefox/channel/desktop/#beta

Flags: needinfo?(smokey101stair)

Hi Alice0775,

I don't think this is a dupe. I am able to reproduce this on today's nightly, which already has the fix from Bug 1532495. In addition, that bug seems to be related to media files with loop=true, whereas the stream I reproduced this with had loop=false. I can also reproduce with media.suspend-bkgnd-video.enabled=false, which seemed like it was a workaround for Bug 1532495.

Flags: needinfo?(smokey101stair)

Is this a regression between releases? If so would it be possible to narrow it down with mozregression? [1]

And is this a WR specific issue? Judging from the reddit thread it seems that way, but want to confirm.

[1] https://mozilla.github.io/mozregression/

Component: Graphics → Graphics: WebRender
Flags: needinfo?(smokey101stair)
Priority: -- → P3

I wasn't sure at the time of filing that it was webrender only, which is why I filed in gfx. I'll try to get some answers over the weekend for you. Leaving ni? as a reminder.

Just an update. This is webrender specific. When this occurs I get the following output in about:support.

Failure Log
(#0) GP+[GFX1-]: Shared surface does not exist for extId:167503724589
(#1) GP+[GFX1-]: Shared surface does not exist for extId:167503724682
(#2) GP+[GFX1-]: Shared surface does not exist for extId:167503724874
(#3) GP+[GFX1-]: Incompatible CompositableHost at WebRenderBridgeParent.

The error message seems the be coming from https://searchfox.org/mozilla-central/source/gfx/layers/wr/WebRenderBridgeParent.cpp#1514

I think this is a regression and I am trying to get a better idea of when this started.

Flags: needinfo?(smokey101stair)

Here is what I came up with. Unfortunately, mozregression couldn't narrow things down any further.

Last good: 2017-11-05
First bad: 2071-11-06
Pushlog: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=ee21e5f7f1c1726e0ed2697eb45df54cdceedd36&tochange=179dae92e4d794e7f45ad080ff01908c80691f31

I have the same exact problem if I enable webrender on W10.

Sotaro, can you see if you can reproduce this?

Flags: needinfo?(sotaro.ikeda.g)

(In reply to Trevor Rowbotham [:rowbot] from comment #5)

(#2) GP+[GFX1-]: Shared surface does not exist for extId:167503724874
(#3) GP+[GFX1-]: Incompatible CompositableHost at WebRenderBridgeParent.

With Firefox 67 on Win10/GTX1060, I got a similar failure log without any crash report when I wanted to check whether the problem described in
https://www.reddit.com/r/firefox/comments/bu5m4h/this_started_happening_on_reddit_tonight_im/ is a WebRender bug or not.
I switched to Reddit's dark theme, opened multiple tabs of https://www.reddit.com/r/PS4/ and was AFK for about 15 minutes. When I came back and switched to another tab, there was a small delay and then I saw black. I don't recall if only videos or the whole tab were black, I was too tired. But it was fixed with F5.

Some additional notes from trying to narrow this down further.

  • This has nothing to do with the color black, it just happens to be the page's background color.
  • This has nothing to do with the tab being in the background as I've had the video stop rendering twice, while the tab was focused in the foreground. It just seems to occur a lot more frequently when the tab is in the background.
  • I have not been able to reproduce in a clean profile. Had to have mozregression clone my profile, but I'm struggling to figure out what might be profile specific that would cause errors from comment 5 to be emitted. I've gone through all the modified prefs between my profile and a clean profile, paying special attention to the gfx., media., and layers.* prefs. The gfx., media., and layers.* prefs were all the same. The only other prefs left for me to test that might be of some consequence are some network and content blocking prefs, but if those are to blame, why does it only affect video and not audio?
  • The Devtools Media Panel extension doesn't seem to work with tabs using the moz-extension:// scheme.
  • The GP+[GFX1-]: Incompatible CompositableHost at WebRenderBridgeParent happens 100% of the time when this issue occurs, the GP+[GFX1-]: Shared surface does not exist for extId only happens sometimes and may or may not be related.

Hm, I think(?) my failure log also mentioned "DataSourceSurface". (also seen in bug 1524280 / bug 1553522)

At least for this extension, refreshing the page or putting the video in fullscreen does not fix the issue.

I can't say that I've seen the DataSourceSurface error while testing this.

Attachment #9068632 - Attachment is obsolete: true
Flags: needinfo?(sotaro.ikeda.g)

(In reply to Jeff Muizelaar [:jrmuizel] from comment #8)

Sotaro, can you see if you can reproduce this?

I am going to check if I could reproduce it.

Flags: needinfo?(sotaro.ikeda.g)

I could reproduce the problem with the following STR.

STR:

  • Install Firefox profiler addon https://perf-html.io/
  • Install addon https://addons.mozilla.org/en-US/firefox/addon/twitch_5/
  • Go to https://twitch.tv and watch any stream.
  • In the top right corner, click the HTML5 button to activate the alternative player.
  • Switch to another tab, so that the tab with the stream is in a background tab.
  • Push Firefox profiler button and show the profiler ui
  • Remove focus from the browser, such as minimizing it.
  • Refocus the browser and switch to the tab with the stream.
Flags: needinfo?(sotaro.ikeda.g)
Assignee: nobody → sotaro.ikeda.g

In the STR in comment 15, when profiler UI is opened as popup. The popup is non-accelerated widget. Then it disables WebRender at ImageBridgeChild.

Attached image extension buttons.png

hi, i am developer of the "Alternative player for Twitch.tv" extension. on my hardware WebRender is not working, but user tells me another way to reproduce issue: hover mouse above any extension button on Firefox navigation toolbar. see attached screenshot (extension buttons.png).

[Tracking Requested - why for this release]:
WebRender bug - potential candidate to keep on the radar for next 67 dot release.

Pushed by sikeda@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2d88330b1f3c
Do not disable WebRender at ImageBridgeChild when gecko uses WebRender r=nical

(In reply to CoolCmd from comment #19)

Created attachment 9069923 [details]
extension buttons.png

hi, i am developer of the "Alternative player for Twitch.tv" extension. on my hardware WebRender is not working, but user tells me another way to reproduce issue: hover mouse above any extension button on Firefox navigation toolbar. see attached screenshot (extension buttons.png).

Thanks for the reporting. I could reproduce the problem with the STR. And Attachment 9069880 [details] addressed the problem for me.

Blocks: 1557251
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69

Please nominate this for Beta approval when you get a chance. It grafts cleanly as-landed.

(In reply to Ryan VanderMeulen [:RyanVM] from comment #24)

Please nominate this for Beta approval when you get a chance. It grafts cleanly as-landed.

The fix affect to Bug 1557105 . I am thinking to wait Bug 1557105 fix for uplifting for now.

Depends on: 1557105
No longer blocks: 1557251
Depends on: 1557251

Comment on attachment 9069880 [details]
Bug 1553969 - Do not disable WebRender at ImageBridgeChild when gecko uses WebRender

Beta/Release Uplift Approval Request

  • User impact if declined: Media player that is implemented as add-on like "Alternate Player for Twitch.tv" sometimes does not render a video.

  • Is this code covered by automated tests?: Yes

  • Has the fix been verified in Nightly?: Yes

  • Needs manual test from QE?: No

  • If yes, steps to reproduce:

  • List of other uplifts needed: none

  • Risk to taking this patch: Medium

  • Why is the change risky/not risky? (and alternatives if risky): The fix is relatively simple.
    The change affects to a use case that a video is rendered to a popup widget on Windows. On Windows, popup is always rendered without using WebRender. It caused conflict with WebRender widget and non-WebRender widget. This bug give a precedence to WebRender widget on ImageBridge.
    The use case is already broken and the use case is very rare. We do not know the use case than Bug 1557105 . It is addressed by Bug 1557105 . It is orthogonal to this bug.

  • String changes made/needed: None

Flags: needinfo?(sotaro.ikeda.g)
Attachment #9069880 - Flags: approval-mozilla-beta?

(In reply to Sotaro Ikeda [:sotaro] from comment #26)

  • List of other uplifts needed: None

Can you clarify the relationship with the bugs listed as dependencies?

Flags: needinfo?(sotaro.ikeda.g)

(In reply to Julien Cristau [:jcristau] from comment #27)

(In reply to Sotaro Ikeda [:sotaro] from comment #26)

  • List of other uplifts needed: None

Can you clarify the relationship with the bugs listed as dependencies?

Sorry, The fix affects to how Bug 1557105 appeared, but it is orthogonal problem . And updated Comment 26.

Flags: needinfo?(sotaro.ikeda.g)

Comment on attachment 9069880 [details]
Bug 1553969 - Do not disable WebRender at ImageBridgeChild when gecko uses WebRender

wr fix for 68.0b10

Attachment #9069880 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Flags: qe-verify+
QA Whiteboard: [qa-triaged]

Verified - Fixed on latest Beta 68.0b10 (64-bit) and Nightly 69.0a1 (2019-06-13) on Windows 10 x64.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triaged]
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: