Open Bug 1698054 Opened 4 years ago Updated 2 years ago

Black Video Frames in WebGL when hardware accelleration is enabled

Categories

(Core :: Graphics: CanvasWebGL, defect, P2)

Firefox 98
defect

Tracking

()

People

(Reporter: luca, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36 Edg/89.0.774.45

Steps to reproduce:

We are waiting for a videos "canplay" event and then use it as a WebGl Texture.

The error appeared since firefox version 86 and still appears in the developer editions 87.
It seems to only occur when the perfomance settings use hardware accelleration.
The duration (fraction of a second up to 5 seconds) and propability of the problem seems to differ from system to sytem.

you can try to reproduce it on this site:
https://wiebkes-wirre-welt.de/
Click "Start" -> Wait for loader to finish -> select "skip intro" -> if the error occurs you will see black boxes appearing (see screenshot attached). This will not always happen, so you might have to refresh some times... keeping the developer tools open seem to increase the propability for the error to appear.

Actual results:

In some cases the texture displays black frames instead of the the actual frame image, while the videos sound is already running.
This is not happening on other browsers or firefox versions 85 and below.

The developer console is logging the following error, but we are not sure how this is triggered:
"WebGL warning: tex(Sub)Image[23]D: Failed to retrieve source bytes for CPU upload."

Expected results:

The expected behaviour is the "pre Firefox 86" behavior: a loaded video should be able to render video frames when the "canplay" event has been triggered.

The Bugbug bot thinks this bug should belong to the 'Core::Canvas: WebGL' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Canvas: WebGL
Product: Firefox → Core

I believe this was fixed, but I don't know where.
Please reopen if it's still not fixed for you!

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Status: RESOLVED → UNCONFIRMED
Resolution: FIXED → ---
Version: Firefox 86 → Firefox 98

unfortunately the problem still persists. It's relativly hard to reproduce as it only happens seemingly arbitrarily.

FWIW, you mention that you wait for canplay before trying to use the video. That's not necessarily waiting long enough. You want to await video.play(); to make sure that webgl will find data to upload: https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/play


I can repro a blank frame at the stage where "skip intro" appears (with the young man typing on the keyboard). A brief flash of black for that video appeared, and I see in console:

WebGL warning: tex(Sub)Image[23]D: Failed to retrieve source bytes for CPU upload. (23 repeats)

That's from here:
https://searchfox.org/mozilla-central/source/dom/canvas/ClientWebGLContext.cpp#4314

Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: