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

ExoPlayer memory leak #2257

Closed
Koitharu opened this issue Mar 31, 2019 · 9 comments · Fixed by #2697
Closed

ExoPlayer memory leak #2257

Koitharu opened this issue Mar 31, 2019 · 9 comments · Fixed by #2697
Labels
bug Issue is related to a bug player Issues related to any player (main, popup and background)

Comments

@Koitharu
Copy link
Contributor

Koitharu commented Mar 31, 2019

I noticed one problem, the allocated video memory is increased after seeking playback position.

Screenshot_20190331_183423
This bug available only on one of my devices. I found this. Look like this is a internal bug of ExoPlayer, but I`m not sure. Are anyone has the same problem?

@raihanabbas232
Copy link

raihanabbas232 commented Apr 5, 2019

nv95 I am also facing this problem.
Untitled

Is there any update regarding to this issue?
I am using Exoplayer v2.9.6
Thanks

@potatoker
Copy link

I do not operate seek, but I still found there are lot of memory allocated to allocationnode when I scroll the video list. I'm sure that I've released the player when the textureview is out of screen. But I still often get OOM problem.

image

really confused about the oom in video list.

anyone can help? thanks

@Stypox Stypox added bug Issue is related to a bug player Issues related to any player (main, popup and background) labels Sep 27, 2019
@Yowlen
Copy link

Yowlen commented Sep 29, 2019

Interesting. I had already figured out how the memory leak works elsewhere (thank you to the person who referenced this issue report in mine and alerted me to it), but I didn't even think of seeking within the same video being a potential cause for it too. Nice find.

@opusforlife2
Copy link
Collaborator

@Redirion You said in your PR

This might close

So Github automatically tagged this for closing. Reopening it.

@Yowlen Could you try this as well in 0.20.0?

@opusforlife2 opusforlife2 reopened this Oct 10, 2020
@litetex
Copy link
Member

litetex commented Mar 6, 2022

I think we can close this or?

@litetex litetex added the waiting for author If the author doesn't respond, the issue will be auto-closed. Otherwise the label will be removed. label Mar 6, 2022
@Koitharu
Copy link
Contributor Author

Koitharu commented Mar 7, 2022

Can't check if it's relevant now because it only reproduced on only one of my devices which is now broken.

@github-actions github-actions bot removed the waiting for author If the author doesn't respond, the issue will be auto-closed. Otherwise the label will be removed. label Mar 7, 2022
@litetex
Copy link
Member

litetex commented Mar 7, 2022

Okay the I guess we can close it and reopen/create a new issue if it's relevant again.

@litetex litetex closed this as completed Mar 7, 2022
@IriaSomobu
Copy link

Apparently I can reproduce this issue on certain (that lasts 6+ hours) youtube videos.

Exception
com.google.android.exoplayer2.ExoPlaybackException: Source error
	at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:580)
	at android.os.Handler.dispatchMessage(Handler.java:98)
	at android.os.Looper.loop(Looper.java:154)
	at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by: com.google.android.exoplayer2.upstream.Loader$UnexpectedLoaderException: Unexpected OutOfMemoryError: Failed to allocate a 65548 byte allocation with 26040 free bytes and 25KB until OOM
	at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:446)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
	at java.lang.Thread.run(Thread.java:761)
Caused by: java.lang.OutOfMemoryError: Failed to allocate a 65548 byte allocation with 26040 free bytes and 25KB until OOM
	at com.google.android.exoplayer2.upstream.DefaultAllocator.allocate(DefaultAllocator.java:104)
	at com.google.android.exoplayer2.source.SampleDataQueue.preAppend(SampleDataQueue.java:240)
	at com.google.android.exoplayer2.source.SampleDataQueue.sampleData(SampleDataQueue.java:174)
	at com.google.android.exoplayer2.source.SampleQueue.sampleData(SampleQueue.java:579)
	at com.google.android.exoplayer2.extractor.TrackOutput$-CC.$default$sampleData(TrackOutput.java:159)
	at com.google.android.exoplayer2.source.SampleQueue.sampleData(SampleQueue.java)
	at com.google.android.exoplayer2.extractor.mp4.Mp4Extractor.readSample(Mp4Extractor.java:615)
	at com.google.android.exoplayer2.extractor.mp4.Mp4Extractor.read(Mp4Extractor.java:249)
	at com.google.android.exoplayer2.source.BundledExtractorsAdapter.read(BundledExtractorsAdapter.java:127)
	at com.google.android.exoplayer2.source.ProgressiveMediaPeriod$ExtractingLoadable.load(ProgressiveMediaPeriod.java:1049)
	at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:417)
	... 3 more

@opusforlife2
Copy link
Collaborator

@IriaSomobu Please open a new issue with full details.

@IriaSomobu IriaSomobu mentioned this issue Apr 23, 2022
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug player Issues related to any player (main, popup and background)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants