-
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
ExoPlayer crash with IMAloader onTimelineChanged Assertions.checkArgument #5831
Comments
The failing assertion is It looks like Could you confirm that you are always just playing an |
Thank you for replying |
@tonihei - Can you think of any way that this could happen (in 2.9.4, if not 2.10.0)? My suspicion would be that there's some path somewhere that ends up calling |
The problem seems to be caused by a Timeline update coming from the internal player with an empty Timeline, while ExoPlayerImpl has a non-empty Timeline. The internal player sets the timeline in two places only: for updates coming from the MediaSource, or when resetting the internal state. The former can't possibly be an empty Timeline when coming from a HlsMediaSource. The latter is only called after calling prepare(..,resetState=true) or stop(reset=true). @amjadmasri Do your logs contain any information on the circumstances of the error? For example app or player events happening before or at this time which would help to narrow down the cause? @ojw28 Agree that we can make the check broader and ignore all empty timelines as a precaution. |
unfortunately we couldn't reproduce the bug, so we only have what Firebase crashalytics gives us. we use the following code to pause and resume playback
pause is called on the onPause lifecycle also the code snippet in the original question with the following code at the beginning is called to init the player
on the onStart Lifecycle we don't call the Player.stop() also we have been getting reports of another bug on the Firebase Console that is related to the Timeline being null
|
We previously only checked whether the reason for the timeline change is RESET which indicates an empty timeline. Change this to an explicit check for empty timelines to also ignore empty media or intermittent timeline changes to an empty timeline which are not marked as RESET. Issue:#5831 PiperOrigin-RevId: 248499118
Thanks for all the information, I'll have a look again to see if I can find a potential source for the problem. The other stack trace is definitely a bug, because a seek could always happen before we get the first timeline update. |
I still can't see a concrete reason why the original problem may have occurred, but I believe the problem may be fixed in 2.10 because we added more robustness to our listener notification system (e.g. always ensure correct order, never send updates after a listener has been removed). The commit above also works around the problem should it still occur for some reason, so I think we can close this issue (as soon as the second problem is also fixed) |
We previously only checked whether the reason for the timeline change is RESET which indicates an empty timeline. Change this to an explicit check for empty timelines to also ignore empty media or intermittent timeline changes to an empty timeline which are not marked as RESET. Issue:#5831 PiperOrigin-RevId: 248499118
@tonihei
thank you! |
Glad to hear that!
Yes, the potential fix hasn't been released yet because we were still testing various scenarios to see that it actually works. |
Any seek before the first timeline becomes available will result in a NPE. Change it to handle that case gracefully. Issue:#5831 PiperOrigin-RevId: 264603061
Any seek before the first timeline becomes available will result in a NPE. Change it to handle that case gracefully. Issue:#5831 PiperOrigin-RevId: 264603061
[REQUIRED] Issue description
Our app just recently released and we found in the Firebase Crashalytics an increasing number of crashes which I included below
we are using an HlsMediaSource for the content then adding the AdsMediaSourceand for the ads and
here is the code of how we are initializing the player:
[REQUIRED] Reproduction steps
we couldn't reproduce the issue , we only see the crashes on the crashlytics console.
[REQUIRED] Link to test content
[REQUIRED] A full bug report captured from the device
[REQUIRED] Version of ExoPlayer being used
2.9.4
[REQUIRED] Device(s) and version(s) of Android being used
Samsung galaxy S6
HTC Desire 820s
HUAWEI MediaPad T3 7
android 6, 7 and 8
The text was updated successfully, but these errors were encountered: