Version
Media3 1.10.1
More version details
Regression introduced between 1.9.4 (works) and 1.10.0/1.10.1 (crashes).
Root cause traced back to commit f066180c8de61fb8be4746f3d7f5237ee3969f1e
("Refactor DASH initial discontinuity handling", PiperOrigin-RevId: 871747537, Issue: #3057).
Still present (unchanged code) on release-1.11.0-alpha01 and release-1.11.0-beta01.
Devices that reproduce the issue
device independent
Devices that do not reproduce the issue
device independent
Reproducible in the demo app?
Not tested
Reproduction steps
- Start playback of a multi‑period DASH stream (e.g. server‑side ad insertion) with a subtitle
track enabled in the track selector.
- Have the source deliver a Period whose subtitle
AdaptationSet Representation uses a
SegmentTemplate with an empty <SegmentTimeline/>, typically emitted at an ad→content transition
while segments are not yet listed.
- When that Period is prepared and its tracks are selected, the player crashes.
Expected result
The player should tolerate a valid‑but‑empty segment index (as Media3 1.9.4 did — playback continues) instead of throwing.
Actual result
Playback stops with ExoPlaybackException: Unexpected runtime error /
ERROR_CODE_UNSPECIFIED caused by IndexOutOfBoundsException during period preparation:
androidx.media3.exoplayer.ExoPlaybackException: Unexpected runtime error
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.get(ArrayList.java:437)
at androidx.media3.exoplayer.dash.manifest.SegmentBase$SingleSegmentBase...
at androidx.media3.exoplayer.dash.DashMediaPeriod.buildSampleStream(DashMediaPeriod.java:858)
at androidx.media3.exoplayer.dash.DashMediaPeriod.selectNewStreams(DashMediaPeriod.java:477)
at androidx.media3.exoplayer.dash.DashMediaPeriod.selectTracks(DashMediaPeriod.java:293)
at androidx.media3.exoplayer.source.MaskingMediaPeriod.selectTracks(MaskingMediaPeriod.java:189)
at androidx.media3.exoplayer.MediaPeriodQueue.getMediaPeriodInfoForContent(MediaPeriodQueue.java:1249)
at androidx.media3.exoplayer.ExoPlayerImplInternal.handleLoadingPeriodPrepared(ExoPlayerImplInternal.java:3093)
at androidx.media3.exoplayer.ExoPlayerImplInternal.handlePeriodPrepared(ExoPlayerImplInternal.java:3074)
at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:815)
Media
no test stream available. I will send an example for a manifest together with a bugreport via mail
Bug Report
Version
Media3 1.10.1
More version details
Regression introduced between 1.9.4 (works) and 1.10.0/1.10.1 (crashes).
Root cause traced back to commit
f066180c8de61fb8be4746f3d7f5237ee3969f1e("Refactor DASH initial discontinuity handling", PiperOrigin-RevId: 871747537, Issue: #3057).
Still present (unchanged code) on
release-1.11.0-alpha01andrelease-1.11.0-beta01.Devices that reproduce the issue
device independent
Devices that do not reproduce the issue
device independent
Reproducible in the demo app?
Not tested
Reproduction steps
track enabled in the track selector.
AdaptationSetRepresentationuses aSegmentTemplatewith an empty<SegmentTimeline/>, typically emitted at an ad→content transitionwhile segments are not yet listed.
Expected result
The player should tolerate a valid‑but‑empty segment index (as Media3 1.9.4 did — playback continues) instead of throwing.
Actual result
Playback stops with
ExoPlaybackException: Unexpected runtime error/ERROR_CODE_UNSPECIFIEDcaused byIndexOutOfBoundsExceptionduring period preparation:Media
no test stream available. I will send an example for a manifest together with a bugreport via mail
Bug Report
adb bugreportto [email protected] after filing this issue.