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

NPE in HlsMediaSource.releaseSource() #2264

Closed
komissarovdenis opened this issue Dec 27, 2016 · 1 comment
Closed

NPE in HlsMediaSource.releaseSource() #2264

komissarovdenis opened this issue Dec 27, 2016 · 1 comment
Assignees
Labels

Comments

@komissarovdenis
Copy link

komissarovdenis commented Dec 27, 2016

Sometimes I have a crash with this stacktrace.
Probably it happens when non prepared Source is goes to be released.
Could you, please, add check playlistTracker for null when releaseSource() is called?
Lib version is 2.1.1

AndroidRuntime: FATAL EXCEPTION: ExoPlayerImplInternal:Handler
    Process: com.xxx, PID: 5770
    java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.exoplayer2.source.hls.playlist.HlsPlaylistTracker.release()' on a null object reference
                 at com.google.android.exoplayer2.source.hls.HlsMediaSource.releaseSource(HlsMediaSource.java:97)
                 at com.google.android.exoplayer2.ExoPlayerImplInternal.resetInternal(ExoPlayerImplInternal.java:698)
                 at com.google.android.exoplayer2.ExoPlayerImplInternal.stopInternal(ExoPlayerImplInternal.java:658)
                 at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:367)
                 at android.os.Handler.dispatchMessage(Handler.java:98)
                 at android.os.Looper.loop(Looper.java:154)
                 at android.os.HandlerThread.run(HandlerThread.java:61)
                 at com.google.android.exoplayer2.util.PriorityHandlerThread.run(PriorityHandlerThread.java:40)
                 at InfoAboutApp.VersionCode(numberVersionCode:1047)
  @Override
  public void releaseSource() {
    playlistTracker.release();
    playlistTracker = null;
    sourceListener = null;
  }
@ojw28 ojw28 added the bug label Jan 2, 2017
@ojw28
Copy link
Contributor

ojw28 commented Jan 3, 2017

Yup, we will do this. Thanks!

@ojw28 ojw28 self-assigned this Jan 3, 2017
ojw28 added a commit that referenced this issue Jan 4, 2017
Issue: #2264

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143550088
@ojw28 ojw28 closed this as completed Jan 4, 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

2 participants