Skip to content

NPE on MediaPeriodInfo causing unexpected runtime error #3132

@TRtomasz

Description

@TRtomasz

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions