-
Notifications
You must be signed in to change notification settings - Fork 361
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 about wrong thread Player access upon MediaSessionService connection #318
Labels
Comments
Thanks for reporting! We identified the underlying issue and can provide a fix for it in the next bugfix release. |
rohitjoins
pushed a commit
that referenced
this issue
Apr 17, 2023
The sessions may have different application threads for their players, and the service with its notification provider runs on the main thread. To ensure everything runs on the correct thread, this change labels methods where needed and fixes thread access in some places. Issue: #318 PiperOrigin-RevId: 524849598
rohitjoins
pushed a commit
to google/ExoPlayer
that referenced
this issue
Apr 17, 2023
The sessions may have different application threads for their players, and the service with its notification provider runs on the main thread. To ensure everything runs on the correct thread, this change labels methods where needed and fixes thread access in some places. Issue: androidx/media#318 PiperOrigin-RevId: 524849598
rohitjoins
pushed a commit
that referenced
this issue
Apr 18, 2023
The sessions may have different application threads for their players, and the service with its notification provider runs on the main thread. To ensure everything runs on the correct thread, this change labels methods where needed and fixes thread access in some places. Issue: #318 PiperOrigin-RevId: 524849598 (cherry picked from commit ffa3743)
rohitjoins
pushed a commit
to google/ExoPlayer
that referenced
this issue
Apr 18, 2023
The sessions may have different application threads for their players, and the service with its notification provider runs on the main thread. To ensure everything runs on the correct thread, this change labels methods where needed and fixes thread access in some places. Issue: androidx/media#318 PiperOrigin-RevId: 524849598 (cherry picked from commit 73c216d)
rohitjoins
pushed a commit
that referenced
this issue
Apr 18, 2023
The sessions may have different application threads for their players, and the service with its notification provider runs on the main thread. To ensure everything runs on the correct thread, this change labels methods where needed and fixes thread access in some places. Issue: #318 PiperOrigin-RevId: 524849598 (cherry picked from commit ffa3743)
1.0.1 does fix this issue. Thank you! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Media3 Version
Media3 1.0.0
Devices that reproduce the issue
Android emulator
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Not tested
Reproduction steps
I have a custom player class extending SimpleBasePlayer, using a non-main looper. It is part of a MediaSessionService that runs in a separate process from the client.
The service crashes, complaining about the looper, apparently when the client connects. I suspect this may be a bug in media3, I do not see any any of my own code in the stacktrace. I also do not see a way to influence the media3 behavior here, short of possibly implementing my own notification scheme, running the player on the main looper, or not offering a Timeline right away.
The only place on the service side where I specify the non-main looper is in the SimpleBasePlayer constructor. I have not seen another applicable API to customize the looper.
I assume the stacktrace will be sufficient to pinpoint the logic error here.
Expected result
No service crash when connecting to MediaSessionService.
Actual result
The MediaSessionService crashes:
Media
N/A
Bug Report
adb bugreport
to [email protected] after filing this issue.The text was updated successfully, but these errors were encountered: