jumpcutter icon indicating copy to clipboard operation
jumpcutter copied to clipboard

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

Open DarkKronicle opened this issue 2 years ago • 4 comments

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 avatar Aug 09 '23 03:08 DarkKronicle

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.

DarkKronicle avatar Aug 09 '23 03:08 DarkKronicle

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 avatar Aug 30 '23 06:08 WofWca

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).

WofWca avatar Sep 02 '23 15:09 WofWca

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.

DarkKronicle avatar Sep 02 '23 15:09 DarkKronicle