androidx / androidx/media

MediaSessionService never destroyed

Open
#389 16 comments 1 reaction 1 assignee View on GitHub

@marcbaechinger is already working on this.

Since May 12, 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

Android emulator API 33

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Not tested

Reproduction steps

I first mentioned this issue in #346.

  1. Connect MediaController in one process to MediaSession (via MediaSessionService) in another process.
  2. Perform some amount of player interaction, like starting and pausing playback.
  3. Release MediaController on client.
  4. Observe MediaController being disconnected on server side.
  5. For good measure, manually release MediaSession and Player from MediaSession.Callback.onDisconnected()
  6. Wait for a long time (30+ minutes)
  7. Observe that MediaSessionService.onDestroy() still has not been called

Notably this issue does not occur when there is no player interaction, i.e. Player and MediaSession created but not really used, e.g. no call to prepare().

Expected result

MediaSessionService.onDestroy() called shortly after MediaController released.

Actual result

MediaSessionService.onDestroy() never called.

Media

N/A

Bug Report
  • You will email the zip file produced by adb bugreport to dev.exoplayer@gmail.com after filing this issue.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.