DashManifest playback results in IndexOutOfBoundsException
Version
Media3 1.2.1
More version details
No response
Devices that reproduce the issue
Bravia 4K GB(and other Bravia TVs) - Android versions 9-12 Hopper Plus - Android 11 Various other smart TVs - Android version 9-12 Google Chromecast TV - Android 12 Galaxy S20 FE 5G - Android 13
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
No response
Reproduction steps
Cannot reproduce, crash logs in Crashlytics
Expected result
Expect to play Dash manifest without crashes, even if there is an error
Actual result
Dash playback crashes on some devices
Fatal Exception: java.lang.IndexOutOfBoundsException: Index: 12, Size: 9
at java.util.ArrayList.get(ArrayList.java:437)
at androidx.media3.exoplayer.dash.manifest.DashManifest.getPeriod(DashManifest.java:128)
at androidx.media3.exoplayer.dash.DashMediaPeriod.
Media
DRM protected private media
Bug Report
- [ ] You will email the zip file produced by
adb bugreportto [email protected] after filing this issue.
We fixed https://github.com/google/ExoPlayer/issues/10838 in Media3 1.2.0, which looks very similar. So just to double-check - you are seeing this on version Media3 1.2.1?
I found the likely reason for this issue that still exists even after the linked bug was fixed. The linked issue only fixed it for immediate player.prepare() calls after an exception. But if the new playback attempt happens at a later point, this problem can still happen.
Hi @tonihei , sorry for the late response but yes we are on 1.2.1.
I see you found a new possible cause, thank you for looking into this!
The commits above should this the issue I believe (will be released with 1.4.0-alpha02). If you are seeing it again after this release, please let us know.