-
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
IllegalStateException in DefaultDrmSession in ExoPlayer 2.12.2 #8328
Comments
I can't reproduce this using the steps provided on 2.12.2 on a Pixel 3a XL running Android R. I back & foregrounded the demo app >10 times (home key to put it in background, then long-press home to bring up app switcher and tap demo app to bring it back to foreground) What happens to playback when you see the warning in the logs? I did accidentally manage to trigger the warning a different way:
I couldn't see any impact on playback - when the warning is triggered the current video keeps playing fine. It's arguably a bug that we trigger this warning at all - but it's obviously higher priority if you're seeing an impact on playback. |
Hi @icbaker , Thanks for trying hard to reproduce it finally. I also don't see any issue with the playback but i was afraid if this is because of some potential issue which i am not aware of. I can think of why you don't see in Pixel 3, it may be because of soc that it has. If device is capable enough to handle this DRM session acquisition in those frequent attempts then it is difficult to reproduce on such device. I am using Moto G6 (India) variant. But it would be really helpful if you can see the underlying warning cause. Still I am afraid of an issue on DRM playbacks. |
I think i've worked out the sequence of operations that causes this exception to be logged: When dealing with DRM playback using the Roughly this happens when opening a new session:
In my repro steps (repeatedly opening different DRM videos) the playback looper is killed each time we return to the sample selector screen (because the player is being released). If this happens fast enough after playback starts, it happens between the two bullets above (i.e. while waiting for a response from the server). The
I'll have a play with some different ways we can avoid trying to schedule work on a dead thread in this case. |
Thanks @icbaker for the in depth explanation. I can understand that it could be on a low priority due to bit unusual scenario but I will curiously wait for the solution. |
This prevents trying to post the response to possibly dead threads, which causes an IllegalStateException to be logged. Issue: #8328 PiperOrigin-RevId: 352388155
What I can think of that when we go in BG, drmSession is released. This warning comes when coming in FG, drmSession is being tried to acquire on dead thread.
The text was updated successfully, but these errors were encountered: