NPE on MediaPeriodInfo causing unexpected runtime error
Open
@tianyif is already working on this.
Since Mar 26, 2026.
bug
needs triage
- Dominant language
- Java
- Stars
- 3k
- Forks
- 955
- Avg merge
- 12d 14h
- Merged PRs (30d)
- 2
Description
Version
Media3 main branch
More version details
We are using media 1.9.3 currently and i can see a lot of player errors caused by following code
Caused by java.lang.NullPointerException: Attempt to read from field 'androidx.media3.exoplayer.MediaPeriodInfo androidx.media3.exoplayer.MediaPeriodHolder.info' on a null object reference
at androidx.media3.exoplayer.ExoPlayerImplInternal.seekToCurrentPosition(ExoPlayerImplInternal.java:1203)
at androidx.media3.exoplayer.ExoPlayerImplInternal.reselectTracksInternalAndSeek(ExoPlayerImplInternal.java:2280)
at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:793)
I wonder if there is anything on our side to try to prevent this.
Devices that reproduce the issue
From reports i can tell it happens on multiple different devices including Nvidia Shield Pro running android 11
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
No
Reproduction steps
N/a
Expected result
Player to not error during playback
Actual result
Player errors
Media
Can't include at the moment
Bug Report
- You will email the zip file produced by
adb bugreportto android-media-github@google.com after filing this issue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.