Skip to content

Infinite time blocking may occurs in MediaSessionService.onUpdateNotification() #9052

@h6ah4i

Description

@h6ah4i

Hi. I am using ExoPlayer's Media2 integration and I found an issue with MediaSessionService.

Using a dedicated thread instead of the main thread for handling media session callbacks, SessionPlayerConnecter may be stuck in a certain situation. (However, I am not sure that this is an ExoPlayer's bug, the Media2 library's bug, or just my fault.)

Steps to reproduce the issue

  1. Clone the following repository (branch: feature/exoplayer-on-update-notification-issue)
  2. Open the project on Android Studio
  3. Build and debug run on an emulator or a physical device
  4. Click the [4] ERROR_NO_EXIST_FILE item listed on the playlist
    • 👉 this triggers an error due to trying to play no existed media file
  5. Click the Pause Program button of the debugger
  6. You can see the following call stack
    image

Expected behavior

No stucking in MediaSessionService.onUpdateNotification().


  • ExoPlayer version number: r2.14.0
  • AndroidX Media2 version: 1.1.3
  • Android version: 9 (API level 28)
  • Android device: Emulator

bugreport-sdk_gphone_x86_arm-PSR1.180720.117-2021-06-12-22-08-58.zip

Thanks.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions