Closed Bug 1921586 Opened 1 year ago Closed 1 year ago

Rapidly resizing the demo-pane on a Codepen demo makes the animation stop until you switch back to the tab (Best STR in comment #5)

Categories

(Core :: Graphics: Canvas2D, defect)

Firefox 132
x86_64
Windows 11
defect

Tracking

()

VERIFIED FIXED
134 Branch
Tracking Status
firefox-esr128 --- unaffected
firefox131 --- disabled
firefox132 --- disabled
firefox133 --- wontfix
firefox134 --- verified
firefox135 --- verified
firefox136 --- verified

People

(Reporter: mayankleoboy1, Assigned: sotaro)

References

(Blocks 1 open bug, Regression, )

Details

(Keywords: regression)

Attachments

(4 files, 1 obsolete file)

Enable gpu-canvas
Open https://lab.hakim.se/sphere/ in two foreground windows
Drag-and-resize one of the Windows horizontally (such that the other window/demo will resize) BUT keep on holding the mouse for maybe 10s.

AR: The demo in the resized window will become black and wont render at all. It will not fix even if you reload the window.
ER: Not so
Profile with graphics preset logging: https://share.firefox.dev/3zCcOr8
In about:support, you get these gfxlogs :
(#0) GP+[GFX1-]: RemoteTexture ready timeout
(#1) GP+[GFX1-]: RemoteTexture ready timeout

The STR are quite similar to bug 1899231

Doesnt repro if I set gfx.canvas.remote.use-canvas-translator-event = False.
Tentatively marking regressed by on bug 1899231

Keywords: regression
Regressed by: 1899231
See Also: 1899231
Attached file about:support

:sotaro, since you are the author of the regressor, bug 1899231, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Flags: needinfo?(sotaro.ikeda.g)

Another STR is:
Go to https://codepen.io/Mertl/pen/vYPXMao
Once the demo starts, quickly and continuously keep on resizing the demo-pane horizontally making sure to move the slider maximum possible each side.
After 5s-10s, the demo will stop animating.
Profile with graphics logging preset: https://share.firefox.dev/3TMOc5Z

This STR is very similar to https://bugzilla.mozilla.org/show_bug.cgi?id=1898650#c6

Even simpler STR:

  1. enable gpu-canvas.
  2. go to https://lab.hakim.se/sphere/
  3. drag the tab to make a new window.
  4. Rapidly resize the window diagonally.
    AR: After 5s-10s, the demo will stop painting nad wont resize.

Set release status flags based on info from the regressing bug 1899231

Flags: needinfo?(lsalzman)

Slightly retitling the bug to match with the best STR of comment #5.

Summary: Canvas demo opened in two forground tabs stops rendering/resizing if you click-and-hold to resize one of the windows for 5-10s → Rapidly resizing the demo-pane on a Codepen demo makes the animation stop (Best STR in comment #5)
Summary: Rapidly resizing the demo-pane on a Codepen demo makes the animation stop (Best STR in comment #5) → Rapidly resizing the demo-pane on a Codepen demo makes the animation stop until you switch back to the tab (Best STR in comment #5)

Has this issue been fixed by the patch that landed on Bug 1899231 some time ago?

Severity: -- → S3
Flags: needinfo?(mayankleoboy1)
OS: Unspecified → Windows 11
Hardware: Unspecified → x86_64
Version: unspecified → Firefox 132

No, it is regressed by that bug.

Flags: needinfo?(mayankleoboy1)

(In reply to Ashley Hale [:ahale] from comment #10)

Has this issue been fixed by the patch that landed on Bug 1899231 some time ago?

Are there any updates since this was triaged? Bug 1910138 enabled this for Fx133.
Wondering about expectations for a fix in time for Fx133. Next week is the final week of beta for Fx133.

Flags: needinfo?(ahale)

I don't know that Sotaro has the opportunity to investigate this in time, so I am marking this as fix-optional as it seems like something that shouldn't be a release blocker.

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

The problem seemed to happen when pending CanvasTranslator events were cleared in CanvasTranslator::ActorDestroy().

It happened when CanvasChild was destroyed in CanvasManagerChild::EndCanvasTransaction().

Attachment #9436776 - Attachment description: WIP: Bug 1921586 - Handle pending CanvasTranslator events cleared by CanvasChild destroy → Bug 1921586 - Handle pending CanvasTranslator events cleared by CanvasChild destroy
Attachment #9436776 - Attachment is obsolete: true

The problem was triggered by destroying CanvasChild in CanvasManagerChild::EndCanvasTransaction() by mCanvasChild->ShouldBeCleanedUp() == true.

Then if mCanvasChild->ShouldBeCleanedUp() == false during handling Texture in CanvasTranslator. The problem seemed not happen. It could be possible, by holding RefPtr<CanvasDrawEventRecorder>.

Attachment #9437628 - Attachment description: WIP: Bug 1921586 - Keep alive CanvasDrawEventRecorder until texture destruction in CanvasTranslator → Bug 1921586 - Keep alive CanvasDrawEventRecorder until texture destruction in CanvasTranslator
Attachment #9437628 - Attachment description: Bug 1921586 - Keep alive CanvasDrawEventRecorder until texture destruction in CanvasTranslator → WIP: Bug 1921586 - Do not destroy CanvasChild when texture is alive in CanvasTranslator
Attachment #9437628 - Attachment description: WIP: Bug 1921586 - Do not destroy CanvasChild when texture is alive in CanvasTranslator → Bug 1921586 - Do not destroy CanvasChild when texture is alive in CanvasTranslator
Pushed by sikeda.birchill@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fb3bf13757a1 Do not destroy CanvasChild when texture is alive in CanvasTranslator r=lsalzman
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 134 Branch

This is fixed for me in the latest Nightly.

Status: RESOLVED → VERIFIED

The patch landed in nightly and beta is affected.
:sotaro, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox133 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(sotaro.ikeda.g)
Flags: needinfo?(sotaro.ikeda.g)
Flags: qe-verify+
Blocks: 1925840

I was able to reproduce the issue on Windows 10 x64 using Firefox build 131.0a1 (2024-09-27).
Verified as fixed on Windows 10 x64 using Firefox build 136.0a1 and 135.0b9.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: