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

Processing logs causes OutOfMemoryError when downloading long streams #250

Open
JunkFood02 opened this issue Oct 3, 2023 · 0 comments
Open
Labels
bug Something isn't working

Comments

@JunkFood02
Copy link
Collaborator

java.lang.OutOfMemoryError: Failed to allocate a 75497480 byte allocation with 73634792 free bytes and 70MB until OOM, target footprint 268435456, growth limit 268435456
 at java.util.Arrays.copyOf(Arrays.java:3766)
 at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:125)
 at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:650)
 at java.lang.StringBuilder.append(StringBuilder.java:203)
 at com.yausername.youtubedl_android.StreamProcessExtractor.run(SourceFile:41)

Originally reported by a Seal user, who was trying to download a 3hrs live stream, a large number of logs got accumulated in a single string builder object, caused this error

Walkaround: pass -q to yt-dlp to make sure it doesn't print log when downloading

A possible solution is to split strings to multiple chunks, but it might be complicated to refactor the current code base

@JunkFood02 JunkFood02 added the bug Something isn't working label Oct 3, 2023
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

1 participant