-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected exception handling load completed - java.lang.IndexOutOfBoundsException during Player re-prepare #10838
Comments
That's odd indeed. Can you give me a bit more details how this can be reproduced? From your description it sounds like you handle a
Then this exception is thrown when the player is re-prepared. Is this correct? It would be great to have a chance to repro this, so if you have a live stream that you can share with us, that would be super helpful. If you're unable to share bug reports or test content publicly, please send them to [email protected] using a subject in the format "Issue #10838". If it's not possible to send a stream, can you try whether you can avoid this exception by creating setting the source again in the case of the exception? Something like that instead of the above:
I have a hypothesis why this exception happens, and if you can avoid the exception with doing the above this would be a data point for me to dig some deeper there. |
thanks @marcbaechinger. As you mentioned, I added the mediasource to the player while re-preparing the player. |
Yes, if that works I'm pretty sure it works reliably if you set a new media source. However, we need to fix that on our end because it is not working as intended that an app needs to replace the media source. |
When the source is prepared again after stop, the period uid is calculated by subtracting the `firstPeriodId` from the period uid that is passed in to `createPeriod`. When this happens after stop, the uid from the old period uid that is still stored and has the value of the last played uid. Hence the `firstPeriodId` must not be reset when released. Issue: google/ExoPlayer#10838 PiperOrigin-RevId: 539028570
When the source is prepared again after stop, the period uid is calculated by subtracting the `firstPeriodId` from the period uid that is passed in to `createPeriod`. When this happens after stop, the uid from the old period uid that is still stored and has the value of the last played uid. Hence the `firstPeriodId` must not be reset when released. Issue: #10838 PiperOrigin-RevId: 539028570
When the source is prepared again after stop, the period uid is calculated by subtracting the `firstPeriodId` from the period uid that is passed in to `createPeriod`. When this happens after stop, the uid from the old period uid that is still stored and has the value of the last played uid. Hence the `firstPeriodId` must not be reset when released. Issue: google/ExoPlayer#10838 PiperOrigin-RevId: 539028570 (cherry picked from commit 319854d)
When the source is prepared again after stop, the period uid is calculated by subtracting the `firstPeriodId` from the period uid that is passed in to `createPeriod`. When this happens after stop, the uid from the old period uid that is still stored and has the value of the last played uid. Hence the `firstPeriodId` must not be reset when released. Issue: #10838 PiperOrigin-RevId: 539028570 (cherry picked from commit de2ad14)
ExoPlayer Version
2.18.1
Devices that reproduce the issue
Samsung Galaxy M31
OS Version 12
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Yes
Reproduction steps
1)Play the Live content with SSAI enabled/multi-period and pause the playback
2) Resume the playback after few minutes(to say 8 mins or more).
Expected result
playback should recover from behindlivewindowexception and continues to play from the nearliveedge
Actual result
Exception During playback
Media
Not Applicable
Bug Report
adb bugreport
to [email protected] after filing this issue.The text was updated successfully, but these errors were encountered: