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

IMA Extension Memory Leak #4114

Closed
MajDroid opened this issue Apr 12, 2018 · 3 comments
Closed

IMA Extension Memory Leak #4114

MajDroid opened this issue Apr 12, 2018 · 3 comments
Assignees

Comments

@MajDroid
Copy link

Issue description

Using IMA Extension and in the sample main demo app, a memory leak happens when you serve a VMAP and quit the player activity during content playback and after ad/pods playback.

In my opinion, it's an IMA problem and managed to reproduce the issue even without an IMA Extension and following exactly their integration guide but according to them they're claiming it's an IMA-Extension problem and not theirs
https://groups.google.com/forum/#!topic/ima-sdk/ZM-WsPL1xdQ

Reproduction steps

Link to test content

Provide a link to media that reproduces the issue. If you don't wish to post it
publicly, please submit the issue, then email the link to
dev.exoplayer@gmail.com using a subject in the format "Issue #1234".

Version of ExoPlayer being used

V2.7.3

Device(s) and version(s) of Android being used

Tested on Pixel XL (Oreo 8.1), Xperia XZ (Oreo 8.0) but can be reproduced on any device

@andrewlewis
Copy link
Collaborator

I'd expect the ads loader to be destroyed and free all its resources when the player activity is destroyed, but not when it's just backgrounded. We need to keep state for the IMA SDK in memory while in the background so that it's possible to resume ad playback. Are you seeing that IMA objects have leaked after the player activity's onDestroy lifecycle method has been called?

I understand that you're not using the ExoPlayer IMA extension in your app, but this is just a way to reproduce the issue. Are you seeing that objects have leaked after calling AdsManager.destroy in your own integration?

Maybe related: we have seen an issue where IMA leaks its WebView when playing an expired ad tag even if the ads manager is destroyed [internal reference: b/64388488]. But if your ad tag hasn't expired this shouldn't apply.

@MajDroid
Copy link
Author

The issue is easily reproducible in the main demo sample app which uses IMA Extension; PlayerActivity leaks and remains in memory once you serve an ad as explained in my original post.

However, the good news is that it seems an IMA issue and not IMA-extension, you can find a response from IMA team confirming it:
https://groups.google.com/d/msg/ima-sdk/ZM-WsPL1xdQ/by98SaAcBAAJ

@andrewlewis
Copy link
Collaborator

[Internal reference: b/77574091]

ojw28 pushed a commit that referenced this issue Jan 8, 2019
ojw28 pushed a commit that referenced this issue Jan 15, 2019
@mr-thierry mr-thierry mentioned this issue Jan 17, 2019
ojw28 pushed a commit that referenced this issue Jan 29, 2019
This brings in a memory leak fix.

Issue: #4114
PiperOrigin-RevId: 230880521
@ojw28 ojw28 closed this as completed Jan 30, 2019
ojw28 pushed a commit that referenced this issue Jan 30, 2019
This brings in a memory leak fix.

Issue: #4114
PiperOrigin-RevId: 230880521
@google google locked and limited conversation to collaborators Aug 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants