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): Random memory leaks #166

Open
jericjan opened this issue Dec 3, 2021 · 8 comments
Open

(Bug): Random memory leaks #166

jericjan opened this issue Dec 3, 2021 · 8 comments
Labels
bug Something isn't working

Comments

@jericjan
Copy link

jericjan commented Dec 3, 2021

Browser

Google Chrome

Browser Version

Version 96.0.4664.45

Extension or Userscript?

Extension

Extension/Userscript Version

1.0.0.2

What happened?

It seems to be completely random but I know that it's from this extension because when the memory leak happens, my PC gets super slow and when I disable the extension, it instantly goes back to running normally. I can't provide a video link because as I said, it's completely random. Iirc, I've mostly seen it happen when I'm not focused in a YT tab but that could be completely unrelated.

@jericjan jericjan added the bug Something isn't working label Dec 3, 2021
@PickleNik
Copy link
Collaborator

PickleNik commented Dec 4, 2021

Screen Shot 2021-12-04 at 4 02 41 PM

Screen Shot 2021-12-04 at 4 02 02 PM

Been trying to reproduce, so far no luck.

@Frontesque
Copy link
Collaborator

I can't seem the reproduce this either. Could you show us the Chrome Task Manager to show high memory usage?

@jericjan
Copy link
Author

jericjan commented Dec 5, 2021

Finally saw it happen. Still random though.
01
02
It just shows me that the Browser itself is all of a sudden using a ton of CPU. And when I disabled and re-enabled the extension, it immediately dropped as seen in the second image.

@jericjan
Copy link
Author

I think I have a theory for why this happens and why yall can't reproduce it. It might not even be a memory leak.

I open lots of YouTube tabs, probably in the hundreds. While I'm opening them one by one, the extension doesn't use up all of my CPU. It seems to happen when the hundreds of tabs have been "discarded" by Chrome from inactivity and I come back to the window and it's as if every single tab is being worked on at once by the extension.

Just today, Chrome's Task Manager told me that the Browser used up 700% of my CPU, which doesn't even make sense because I only have 2 cores.

I disabled the extension again and well, the usage dropped like I expected.

I'm still not 100% sure this is the real cause but I think an update where it doesn't work on unfocused tabs would be the fix for it perhaps.

@Frontesque
Copy link
Collaborator

I open lots of YouTube tabs, probably in the hundreds. While I'm opening them one by one, the extension doesn't use up all of my CPU. It seems to happen when the hundreds of tabs have been "discarded" by Chrome from inactivity and I come back to the window and it's as if every single tab is being worked on at once by the extension.

That's a good theory and I'll have to do some testing on that. Based on the way that chrome extensions work, that might actually be possible.

Just today, Chrome's Task Manager told me that the Browser used up 700% of my CPU, which doesn't even make sense because I only have 2 cores.

As for the 700% thing... I know that chrome may display up to "200%" if you have a hyperthreaded processor (eg 2 cores 4 threads) but I've never heard of 700%.

@jericjan
Copy link
Author

I encountered it again today. I tried closing the tabs themselves, but it still used up around the 100% range of my CPU. No tabs open whatsoever. Restarted the extension and back to normal again.

@Anarios
Copy link
Owner

Anarios commented Dec 23, 2021

I encountered it again today. I tried closing the tabs themselves, but it still used up around the 100% range of my CPU. No tabs open whatsoever. Restarted the extension and back to normal again.

thanks for report

@Karlos-Fandango
Copy link

Also getting hit about once a week with high CPU, toggling off/on the extensions clears it
I usually have two chrome windows with a large number of tabs open (40+), including several youtube videos, generally a few paused. I tend to see it when coming back to my laptop after 30 mins plus and unlocking. Not seen it after a start from hibernate.
I enabled the "collect errors" option in the extension manager.
Happy to run more debug if requested

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants