Open Bug 1924400 Opened 1 day ago Updated 2 hours ago

canvas and/or requestAnimationFrame stop working correctly after for an unknown amount of time

Categories

(Core :: Graphics: Canvas2D, defect)

Firefox 131
defect

Tracking

()

UNCONFIRMED

People

(Reporter: lixam.vincent, Unassigned)

References

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0

Steps to reproduce:

leaving any page with a canvas using requestAnimationFrame to animate something ends up doing a weird stutter locked between 2 frames after some time

I have searched many hours what could be the cause of this, but nothing seems to cause it on its own, it just happens at some point

I've had this bug occur on my current machine, for at least the past month, and also on a machine running Ubuntu (I'm not sure of the Ubuntu version, and don't currently have access to this machine)

I've tried it on google chrome, no issues, tried in a private Firefox window with all extensions disabled, still an issue

Actual results:

any animation ends up in one of 3 states:
-locked on a frame
-alternating between 2 frames that seem to be one after another

  • alternating between 1 fixed frame and the animation continuing as normal (most frequent of what I've tried)

I've checked the timestamp in the requestAnimationFrame callback, and even when the bug occurs, the timestamp runs as expected

Expected results:

the animation should continue and not lock up like shown in the video

The Bugbug bot thinks this bug should belong to the 'Core::Graphics: Canvas2D' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Graphics: Canvas2D
Product: Firefox → Core

Thanks for reporting the bug. This looks similar to bug 1922278 which has been fixed on Nightly.

I cannot reproduce this bug on my Win11x64 machine.

  1. Can you download the latest Nightly and check if this bug is fixed for you?
  2. Please type "about:support" in your Firefox browser and copy-paste its contents here.
  3. If this demo worked correctly for you in a previous version of Firefox, please use mozregression to do a bisection.
Flags: needinfo?(lixam.vincent)
See Also: → 1922278
Attached file logs
(In reply to Mayank Bansal from comment #2) > Thanks for reporting the bug. This looks similar to bug 1922278 which has been fixed on Nightly. > > I cannot reproduce this bug on my Win11x64 machine. > > 1. Can you download the latest Nightly and check if this bug is fixed for you? > 2. Please type "about:support" in your Firefox browser and copy-paste its contents here. > 3. If this demo worked correctly for you in a previous version of Firefox, please use [mozregression ](https://mozilla.github.io/mozregression/)to do a bisection. 1. Just did that, will let it run for a bit before reporting 2. Here is the full data:

sorry sent early

  1. the bug has been occuring for quite some time now, i'll try with mozregression, but since each version test takes up to 30 minutes, it'll be some time before I get results
Flags: needinfo?(lixam.vincent)

(In reply to Mayank Bansal from comment #2)

Thanks for reporting the bug. This looks similar to bug 1922278 which has been fixed on Nightly.

I cannot reproduce this bug on my Win11x64 machine.

  1. Can you download the latest Nightly and check if this bug is fixed for you?
  2. Please type "about:support" in your Firefox browser and copy-paste its contents here.
  3. If this demo worked correctly for you in a previous version of Firefox, please use mozregression to do a bisection.

after leaving the page run on firefox nightly, the bug still occurs as described before, I haven't had time to try with mozregression for now.

Doing some more testing with nightly and mozreggression, the bug seems to occur only when the tab goes into the background
looking at a few forums on the subject, it seems that requestAnimationFrame pauses when in the background, so maybe a misstimed callback from requestAnimationFrame? I'll check again with google chrome to make sure my first tests were valid

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

Attachment

General

Creator:
Created:
Updated:
Size: