androidx / androidx/media

ANR when tap seek to button and play/pause button simultaneously

Open
#1,197 6 comments 0 reactions 1 assignee View on GitHub

@marcbaechinger is already working on this.

Since Mar 19, 2024.

bug
Dominant language
Java
Stars
3k
Forks
955
Avg merge
12d 14h
Merged PRs (30d)
2

Description

Version

Media3 1.3.0

More version details

No response

Devices that reproduce the issue

Pixel 4 XL (Android 13)

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Not tested

Reproduction steps
  1. Seek to song and play/pause simultaneously in my app.
  2. The app got ANR.
Expected result

It works normally.

Actual result
  at androidx.media3.session.ConnectedControllersManager.getController(ConnectedControllersManager.java:231)
  - waiting to lock <0x0b8f42ff> (a java.lang.Object) held by thread 22
  at androidx.media3.session.MediaSessionStub.queueSessionTaskWithPlayerCommand(MediaSessionStub.java:292)
  at androidx.media3.session.MediaSessionStub.seekToNextMediaItem(MediaSessionStub.java:1418)
  at androidx.media3.session.MediaControllerImplBase.lambda$seekToNextMediaItem$42$androidx-media3-session-MediaControllerImplBase(MediaControllerImplBase.java:1373)
  at androidx.media3.session.MediaControllerImplBase$$ExternalSyntheticLambda5.run(D8$$SyntheticClass:0)
  at androidx.media3.session.MediaControllerImplBase.dispatchRemoteSessionTask(MediaControllerImplBase.java:373)
  at androidx.media3.session.MediaControllerImplBase.dispatchRemoteSessionTaskWithPlayerCommand(MediaControllerImplBase.java:311)
  at androidx.media3.session.MediaControllerImplBase.seekToNextMediaItem(MediaControllerImplBase.java:1372)
  at androidx.media3.session.MediaController.seekToNextMediaItem(MediaController.java:1497)
  at com.kyant.music.core.player.StatefulAudioPlayer$skipToNext$1.invokeSuspend(StatefulAudioPlayer.kt:95)
  at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
  at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
  at android.os.Handler.handleCallback(Handler.java:942)
  at android.os.Handler.dispatchMessage(Handler.java:99)
  at android.os.Looper.loopOnce(Looper.java:201)
  at android.os.Looper.loop(Looper.java:288)
  at android.app.ActivityThread.main(ActivityThread.java:7898)
  at java.lang.reflect.Method.invoke(Native method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
Media

anr_2024-03-19-00-42-14-290.zip

Bug Report
  • You will email the zip file produced by adb bugreport to android-media-github@google.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.