-
Notifications
You must be signed in to change notification settings - Fork 406
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
MediaController.releaseFuture() cancellation race #345
Comments
All of the methods of |
Ah, right, I think I looked at that earlier and decided to go with it for that reason (release() must be called on the right thread). The intended contract is not obvious, though, as To validate correctness I'd need to find the internals of where the future is marked done. Perhaps the javadoc could clarify the contract. Also, can't you skip the |
The reason I tripped over this was my MediaSessionService leaking, so I did a code inspection. I just use the main thread at the moment, on the Controller side. |
Thanks for the suggestion - we can mention it in the docs (and use |
And remove unnecessary check for isDone. Issue: #345 PiperOrigin-RevId: 525999615
Media3 Version
Media3 1.0.1
Devices that reproduce the issue
N/A
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Not tested
Reproduction steps
MediaController.releaseFuture()
seems to have a cancellation race that could leak the controller when the future gets done betweenisDone()
andcancel()
:media/libraries/session/src/main/java/androidx/media3/session/MediaController.java
Lines 520 to 532 in 3c01488
Expected result
N/A
Actual result
N/A
Media
N/A
Bug Report
adb bugreport
to dev.exoplayer@gmail.com after filing this issue.The text was updated successfully, but these errors were encountered: