Closed Bug 1910990 Opened 2 months ago Closed 2 months ago

drag and drop of local video files onto x.com / twitter.com page for posting causes page content to go blank and tab to be broken in late beta and upcoming release

Categories

(Core :: Graphics: Canvas2D, defect, P1)

Unspecified
Windows
defect

Tracking

()

VERIFIED FIXED
130 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr128 --- unaffected
firefox128 --- unaffected
firefox129 + verified
firefox130 + verified

People

(Reporter: aryx, Assigned: sotaro)

References

(Regression)

Details

(Keywords: regression)

Crash Data

Attachments

(2 files)

Firefox 129.0 release candidate 1, based on bisection late beta builds are affected. Windows 10

Drag and drop of local video files onto x.com page for posting causes page content to go blank and tab to be broken in late beta and upcoming release.

  1. Have an account at x.com
  2. Open https://x.com/home
  3. In the left sidebar, click the 'Post' button.
  4. Drag and drop a local video file into the area where the new post gets composed.

Actual results:

  • Whole browser window goes blank for a short time.
  • Content area of tab is blank
  • Entering urls into the location bar and attempts to load them will fails (nothing happens)
  • menu Tools > Browser Tools > Browser Console opens but fails to load console message

Expected:

  • thumbnail for video shown
  • video gets uploaded

This issue can be reproduced with videos uploaded successfully before with Firefox 128.0.x builds.

Other observations:

  • Dragging and dropping images into the Compose area first, cancelling the composition and then starting a new one with the video dragged and dropped works as expected.
  • If the Browser Toolbox is enabled, drag and drop of the video works as expected, even if the option 'Disable Cache' is not active.
  • Toggling the options media.hls.enabled and media.eme.playready.enabled did not change behavior.
  • Drag and drop of a video at https://imgur.com/upload works as expected but that site does not try to show a video thumbnail during upload.

Do you have further ideas how to debug this and which preference could alter the behavior in late beta and release?

Flags: needinfo?(padenot)
Flags: needinfo?(cchang)
Keywords: regression

Selecting the "Media playback" "Logging preset" on about:logging and logging to the profiler might capture something helpful.
Include hidden threads when uploading. Screenshots might be helpful too.

Video code should not be affecting location bar interactivity, but perhaps something in the parent process might be surprised by a change in video processing behavior.

Severity: -- → S2
Priority: -- → P1

Logging is unlikely to capture what is going wrong in front-end code.
I'd try opening the Browser Toolbox at a later time.

Profiler: https://share.firefox.dev/4do8U3x
If the file does not get dragged and dropped but selected with the file picker launched from the compose area, there are no issues observed.

Nightly notified me now (after a restart post-update) about unsubmitted crash reports. The stack points a canvas issue.

The stack points to bug 1903047 as regressing change.

Component: Audio/Video: Playback → Graphics: Canvas2D
Flags: needinfo?(sotaro.ikeda.g)
Flags: needinfo?(padenot)
Flags: needinfo?(lsalzman)
Flags: needinfo?(cchang)
Regressed by: 1903047

I take the bug.

Assignee: nobody → sotaro.ikeda.g
Flags: needinfo?(sotaro.ikeda.g)
Flags: needinfo?(lsalzman)

Sorry, had not posted the crash report in comment 4: bp-eebcd962-93c9-4f64-ae01-28ea70240801

Crash Signature: [@ <unknown in atidxx64.dll> | CAsynchronous<T>::GetData<T> ]

I could not reproduce the problem with my Win11 PC with NVIDIA GPUs. The basic query handling was added by Bug 1817617.

The query is used with the followings

  • [1] hardware video decoding
  • [2] reuse decoder device is used for hardware video decoding
  • [3] zero copy video frame is not enabled.

[2] always happens on AMD GPUs in DeviceManagerDx::CreateDecoderDevice()

The problem might happen with specific AMD GPUs.

:aryx, can you attach about:support to this bug?

Flags: needinfo?(aryx.bugmail)
OS: Unspecified → Windows

If the problem happens only with AMD GPUs, it seems better to disable Canvas 2d video rendering optimization if GpuProcessQueryId exists with AMD GPUs for now.

See Also: → 1817617
See Also: → 1851630

That is a build based on Nightly and the issue is only observed for late beta builds and release. Is it correct this requires a try build based on release to verify the changes fixes it?

Flags: needinfo?(aryx.bugmail) → needinfo?(sotaro.ikeda.g)

:aryx, can you test with pref media.wmf.zero-copy-nv12-textures = false in about:config? It is affected by Bug 1899450. Sorry, I forgot to mention about it.

Even with default nightly, pref media.wmf.zero-copy-nv12-textures = false in about:config should cause the problem with AMD GPUs.

Flags: needinfo?(sotaro.ikeda.g)
Flags: needinfo?(aryx.bugmail)
See Also: → 1899450
Pushed by sikeda.birchill@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a75fa02a9407
Don't use ID3D11Query to wait for video copy complete for remote canvas. with AMD GPUs r=gfx-reviewers,lsalzman

:ahale confirmed the problem is addressed with D218390.

Comment on attachment 9417426 [details]
Bug 1910990 - Don't use ID3D11Query to wait for video copy complete for remote canvas. with AMD GPUs

Beta/Release Uplift Approval Request

  • User impact if declined: Crash happens with STR of Bug 1910990 with AMD GPUs when hardware video decoding is used without zero copy video.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: none
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): The change reverts to already used slow path with AMD GPUs.
  • String changes made/needed: none
  • Is Android affected?: No
Attachment #9417426 - Flags: approval-mozilla-beta?
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 130 Branch

Comment on attachment 9417426 [details]
Bug 1910990 - Don't use ID3D11Query to wait for video copy complete for remote canvas. with AMD GPUs

Fx129 is in release, switch beta uplift request to release for inclusion in a later dot release

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

I have reproduced the issue using Firefox 129.0 (20240729133145) and verified the fix using Firefox 130.0a1 (20240803095257) on a PC with a Radeon Rx550 GPU.

Comment on attachment 9417426 [details]
Bug 1910990 - Don't use ID3D11Query to wait for video copy complete for remote canvas. with AMD GPUs

Approved for 129.0.1

Attachment #9417426 - Flags: approval-mozilla-release? → approval-mozilla-release+

I have verified the fix using Firefox 129.0.1 (20240812083151) on Windows 10 with AMD Rx550 GPU.

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: