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

Memory leak in HlsMediaChunk #2319

Closed
bene25 opened this issue Jan 12, 2017 · 10 comments
Closed

Memory leak in HlsMediaChunk #2319

bene25 opened this issue Jan 12, 2017 · 10 comments
Assignees
Labels

Comments

@bene25
Copy link

bene25 commented Jan 12, 2017

Hello.
We have m3u8 file format such as:


#EXTM3U
#EXT-X-STREAM-INF:BANDWIDTH=490000,RESOLUTION=640x360
http://XXX.XXX.XX.XXX:31213/MEDIA/76336503.....583609776254/161/4161/
#EXT-X-STREAM-INF:BANDWIDTH=1500000,RESOLUTION=720x576
http://XXX.XXX.XX.XXX:31213/MEDIA/76336503.....583609776254/161/3161/
#EXT-X-STREAM-INF:BANDWIDTH=2500000,RESOLUTION=1280x720
http://XXX.XXX.XX.XXX:31213/MEDIA/76336503.....583609776254/161/2161/

Each EXT-X-STREAM-INF tag link to file like:

#EXTM3U
#EXT-X-TARGETDURATION:5
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:35156
#EXT-X-START:TIME-OFFSET=-25,PRECISE=YES
#EXT-X-KEY:METHOD=AES-128,URI="http://XXX.XXX.XX.XXX:02444/xxXXXXX/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/191/2191/aeskey_191_
#EXTINF:5,
http://XXX.XXX.XX.XXX:XXXXX/SSEGMENT/3020314583628416652818934133893/191/2191/seg_XXXXX.ts
#EXTINF:5,
http://XXX.XXX.XX.XXX:XXXXX/SSEGMENT/6545456465456456465454564/191/2191/seg_191_XXXXX.ts
#EXTINF:5,
http://XXX.XXX.XX.XXX:XXXXX/SSEGMENT/6545456465456456465454564/191/2191/seg_191_XXXXX.ts
#EXTINF:5,
http://XXX.XXX.XX.XXX:XXXXX/SSEGMENT/6545456465456456465454564/191/2191/seg_191_XXXXX.ts
#EXTINF:5,
http://XXX.XXX.XX.XXX:XXXXX/SSEGMENT/6545456465456456465454564/191/2191/seg_191_XXXXX.ts

Large heap set to true.
After 2-3 hours of playing we have this video freeze and log is - Log2.zip

If we set large heap to false, then video freezes much faster and then we have out of memory exception.

@AquilesCanta AquilesCanta self-assigned this Jan 12, 2017
@AquilesCanta
Copy link
Contributor

Looks like a memory leak. I'll have a look.

@AquilesCanta
Copy link
Contributor

By the way, next time please provide all the information required in the issue template. In this case, I am interested in the exoplayer version you are using. Have you reproduced the issue in the DemoApp? If so, would you kindly send a link to the stream to dev.exoplayer@gmail.com?

@bene25
Copy link
Author

bene25 commented Jan 12, 2017

Here is fresh log with memory large heap set to true.
log_12.01_1.zip

VERSION = "2.1.1";

Devices: Minix X7, Minix X8

No, I didn't try demo, but I will.

@AquilesCanta
Copy link
Contributor

Thanks, I'll wait. If you manage to reproduce, please send the stream to the provided e-mail address.

@bene25
Copy link
Author

bene25 commented Jan 13, 2017

It is reproduced on Minix X8, with demo app.
Here is log (log level - info) -
13.01_log.zip

Sound is playing, video is freezed for some time and then app crashed.

@AquilesCanta
Copy link
Contributor

Can you please send a link that reproduces the issue to dev.exoplayer@gmail.com? Don't forget to include the issue number in the subject.

@cubatertech
Copy link

Yes Exactly I face little bit like the same issue.
I'm using Toro lib for auto playback video in Recycler view. Its working fine.
But face issue when app goes to onPause state & again resume from there. Then only hearing voice not showing video. Toro inside using ExoPlayer. Please provide some tips. Thanks.

@AquilesCanta
Copy link
Contributor

After 5+ hours of playback, the heap hasn't gone over 50MB for most of my streams. So I will need a stream that reproduces the issue, or I will have to close the issue due to lack of information.

@bene25
Copy link
Author

bene25 commented Jan 16, 2017

Ok. I am testing now. I will give you feedback asap.

@AquilesCanta
Copy link
Contributor

After playing a encryption-clear stream for a day, I noticed the heap size was 80MB. I suspect using encrypted streams increases the leakage size. Good news is I have already found a cause for the issue for which I will soon push a fix. After that, please try reproducing again and let me know the outcome.

@AquilesCanta AquilesCanta changed the title Video freezes, audio continue playing. Memory leak in HlsMediaChunk Jan 19, 2017
ojw28 pushed a commit that referenced this issue Jan 20, 2017
Issue:#2319

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145089668
@ojw28 ojw28 closed this as completed Jan 20, 2017
@google google locked and limited conversation to collaborators Jun 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants