-
-
Notifications
You must be signed in to change notification settings - Fork 454
fix(YouTube): Always use single threaded layout to resolve layout bugs in unpatched YouTube #5226
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
fix(YouTube): Always use single threaded layout to resolve layout bugs in unpatched YouTube #5226
Conversation
… memory bugs found in unpatched YouTube
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
I don't understand how changing threads count solve the issue. Why would multiple threads cause a leak and one not? |
Good question. Reducing threads amount fixed playlist hiding issue too. |
It's not yet confirmed if this fixes the memory leak issue with the player comment box. But if this does fix it, it likely is a thread contention/race issue where data is corrupted by interleaved thread calls. The watch history incorrectly hiding is almost certainly the same or similar issue. This PR definitely fixes that because it's easy to verify the issue is present with/without this change. |
Technically it's not a memory leak, as the memory is getting cleared out as evident by the excessive garbage collection log messages. A true memory leak would cause the app to eventually crash with OOM exception, and that's not happening. I think it's some intermediate objects or an internal state becomes corrupted by multiple threads modifying the same data. And then that corrupted intermediate object/state is continually rebuilt/recalculated/whatever which causes a high memory usage and high CPU usage. |
How do I apply this patch? I'm just a Revanced user, don't know how to code. |
You'll need to patch using a computer and CLI tools as the first post describes. If you're not familiar or don't want to figure out then you'll need to wait until this is merged into the regular release. If you need further help visit the discord or Reddit support links, GitHub is not for troubleshooting. |
# [5.29.0-dev.1](v5.28.1-dev.2...v5.29.0-dev.1) (2025-06-23) ### Bug Fixes * **YouTube:** Always use single threaded layout to resolve layout bugs in unpatched YouTube ([#5226](#5226)) ([1f539b1](1f539b1)) ### Features * **YouTube:** Add an option to disable toasts when changing default playback speed or quality ([#5230](#5230)) ([c68cde3](c68cde3))
# [5.29.0](v5.28.0...v5.29.0) (2025-06-26) ### Bug Fixes * Add scrollable content to modern style settings dialogs ([#5211](#5211)) ([e6876d5](e6876d5)) * **Google Photos:** Resolve startup crash for Android 5.0 devices ([0294533](0294533)) * **YouTube - Hide ads:** Hide new type of product ad in video description ([#5225](#5225)) ([1e2efad](1e2efad)) * **YouTube - Hide layout components:** Fix "Hide video description attributes" ([#5250](#5250)) ([2f22d45](2f22d45)) * **YouTube - Hide Shorts components:** Fix "Hide Use this sound button" ([#5233](#5233)) ([5d6ec9e](5d6ec9e)) * **YouTube - Hide Shorts components:** Fix "Hide Use this template button" ([#5249](#5249)) ([b399ecb](b399ecb)) * **YouTube:** Always use single threaded layout to resolve layout bugs in unpatched YouTube ([#5226](#5226)) ([1f539b1](1f539b1)) * **YouTube:** Fix refactoring app startup exception ([1b00c90](1b00c90)) ### Features * Add `Spoof app signature` patch ([#5158](#5158)) ([78b25aa](78b25aa)) * **Cricbuzz:** Add `Hide ads` patch ([#4998](#4998)) ([83ccfa8](83ccfa8)) * **Crunchyroll:** Add `Hide ads` patch ([#5201](#5201)) ([46b4398](46b4398)) * **YouTube - Hide Shorts components:** Add `Hide Effects button` ([#5255](#5255)) ([240897a](240897a)) * **YouTube - Hide video action buttons:** Add `Hide Stop ads` ([#5245](#5245)) ([274dcc6](274dcc6)) * **YouTube:** Add an option to disable toasts when changing default playback speed or quality ([#5230](#5230)) ([c68cde3](c68cde3)) * **YouTube:** Support version `20.13.41` ([#5253](#5253)) ([d284c3d](d284c3d))
This change fixes an issue where the You tab watch history or playlist shelf is incorrectly set hidden (it's not ReVanced that is incorrectly hiding the shelves).
This might also fix a known issue in unpatched YouTube, where if a comment is made in the video player then the app starts consuming a lot of battery life until the app is force closed or fully restarted.