Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: severe memory leak and freeze on certain web players with 'prevent changing playback speed' option #165

Open
DarkKronicle opened this issue Aug 9, 2023 · 4 comments

Comments

@DarkKronicle
Copy link

DarkKronicle commented Aug 9, 2023

About

In certain circumstances when you skip to a specific time in playback, this extension leads to a massive memory leak (~1 gb of ram every 3 seconds). I'm only able to get this to happen when I use "prevent changing playback speed on playback speed update" option in the extension settings. I'm also only able to currently produce this on Crunchyroll and not other websites like YouTube.

Steps to reproduce

  1. Ensure option 2 on "Whenever playback rate gets changed by other scripts" is set to "On some websites I visit..."
  2. Go to Crunchyroll, start a video, jump to some other time (only happens about 80% of the time. Large skips work well)
  3. View system monitor and see firefox ram consumption go up rapidly. Quitting normally also doesn't work.

System Information

I'm running firefox on Kubuntu. I don't think any of my other extensions are messing with video playing/speed.

If no one is able to reproduce, I'll try starting a new firefox profile.

@DarkKronicle DarkKronicle changed the title bug: severe memory leak and freeze on certain web players with "Don't let websites change playback" option bug: severe memory leak and freeze on certain web players with 'prevent changing playback speed' option Aug 9, 2023
@DarkKronicle
Copy link
Author

My (uneducated) guess is that this is causing the map to get populated. But I don't know why the media element would be continuously changing.

@WofWca
Copy link
Owner

WofWca commented Aug 30, 2023

Hello!
Thanks for filing this report, it's valuable! And sorry for such a late response.
The issue is not trivial for me. I did some debugging, but couldn't figure out what's going on (there is a lot).

this is causing the map to get populated

It sounds unlikely that it's precisely this piece of code that causes the leak (you're saying that it's ~333 MB per second, but ratechange events can't be firing that often). But yeah, I have noticed that there are several media elements on that site, so your guess that the elements changing is what causes this could be true.

I will try to debug this some time later. Thanks again!

@WofWca
Copy link
Owner

WofWca commented Sep 2, 2023

Another thing I noticed is whenever the "I want to control playback rate (sounded speed) through the website's UI or through other extensions, not just this one. This will update sounded speed whenever playback rate gets changed." option is set, playback rate gets set to 0 sometimes (because of ads it is, I believe).

@DarkKronicle
Copy link
Author

Thanks for checking this out! Yesterday I noticed, on Crunchyroll again, with the "Update sounded speed whenever gets changed" option, sometimes clicking through the video will cause the sounded speed to increase. If I keep on clicking it goes higher and higher, even past what I have set the sounded speed to go through.

Repository owner deleted a comment from mrpanday93 Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants