IndexOutOfBoundsException in SinglePeriodTimeline.getWindow
java.lang.IndexOutOfBoundsException: at com.google.android.exoplayer2.util.Assertions.checkIndex (Assertions.java:68) at com.google.android.exoplayer2.source.SinglePeriodTimeline.getWindow (SinglePeriodTimeline.java:151) at com.google.android.exoplayer2.source.ForwardingTimeline.getWindow (ForwardingTimeline.java:62) at com.google.android.exoplayer2.source.AbstractConcatenatedTimeline.getWindow (AbstractConcatenatedTimeline.java:164) at com.google.android.exoplayer2.Timeline.getWindow (Timeline.java:633) at com.google.android.exoplayer2.Timeline.getWindow (Timeline.java:620) at com.google.android.exoplayer2.ui.PlayerControlView.updateProgress (PlayerControlView.java:731) at com.google.android.exoplayer2.ui.PlayerControlView.access$000 (PlayerControlView.java:162) at com.google.android.exoplayer2.ui.PlayerControlView$ComponentListener.onTimelineChanged (PlayerControlView.java:1094) at com.google.android.exoplayer2.ExoPlayerImpl.updatePlaybackInfo (ExoPlayerImpl.java:659) at com.google.android.exoplayer2.ExoPlayerImpl.handlePlaybackInfo (ExoPlayerImpl.java:611) at com.google.android.exoplayer2.ExoPlayerImpl.handleEvent (ExoPlayerImpl.java:557) at com.google.android.exoplayer2.ExoPlayerImpl$1.handleMessage (ExoPlayerImpl.java:106) at android.os.Handler.dispatchMessage (Handler.java:102) at android.os.Looper.loop (Looper.java:154) at android.app.ActivityThread.main (ActivityThread.java:6119) at java.lang.reflect.Method.invoke (Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:776)
This issue is being closed because it does not adhere to our issue template, and/or because it omits information requested in the issue template that is required for us to investigate the problem efficiently. The issue template can be found here.
If you’re able to provide complete information as requested in the issue template, please do so below and we’ll re-open the issue. Thanks!
Most likely, the issue is caused by one of two reasons:
- You are accessing the player from multiple threads. (see e.g. #4278). If you switch to the latest 2.9.0 release, you should see warnings in the log if that happens.
- A bug which happens when removing playlist elements (see e.g. #4871). That is also fixed in 2.9.0.
implementation 'com.google.android.exoplayer:exoplayer:2.9.0' shows error AAPT2 error: check logs for details