java.lang.IllegalArgumentException: session is already released
Open
@marcbaechinger is already working on this.
Since May 30, 2023.
bug
- Dominant language
- Java
- Stars
- 3k
- Forks
- 955
- Avg merge
- 12d 14h
- Merged PRs (30d)
- 2
Description
Media3 Version
Media3 1.0.1
Devices that reproduce the issue
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Not tested
Reproduction steps
- Rollout Voice 7.0.12:
https://github.com/PaulWoitaschek/Voice/blob/7.0.12/playback/src/main/kotlin/voice/playback/session/PlaybackService.kt - See crashes in Crashlytics
Expected result
It doesn't crash
Actual result
I'm seeing multilpe permutations of this crash.
The biggest one is this, which is strange because that version of Voice does not declare any MEDIA_BUTTON receiver.
Fatal Exception: java.lang.RuntimeException: Unable to start service voice.playback.session.PlaybackService@60513f1 with Intent { act=android.intent.action.MEDIA_BUTTON dat=androidx.media3.session.MediaSessionImpl:/2360112758 flg=0x10000000 cmp=de.ph1b.audiobook/voice.playback.session.PlaybackService (has extras) }: java.lang.IllegalArgumentException: session is already released
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4808)
at android.app.ActivityThread.access$2100(ActivityThread.java:271)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2163)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:210)
at android.os.Looper.loop(Looper.java:299)
at android.app.ActivityThread.main(ActivityThread.java:8250)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:556)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1045)
Caused by java.lang.IllegalArgumentException: session is already released
at androidx.media3.common.util.Assertions.checkArgument(Assertions.java:1)
at androidx.media3.session.MediaSessionService.addSession(MediaSessionService.java:10)
at androidx.media3.session.MediaSessionService.onStartCommand(MediaSessionService.java:120)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4790)
at android.app.ActivityThread.access$2100(ActivityThread.java:271)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2163)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:210)
at android.os.Looper.loop(Looper.java:299)
at android.app.ActivityThread.main(ActivityThread.java:8250)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:556)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1045)
Media
not media related
Bug Report
- You will email the zip file produced by
adb bugreportto dev.exoplayer@gmail.com after filing this issue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.