androidx / androidx/media

MediaSession IllegalArgumentException on PlayerInfoChangedHandler.handleMessage

Open
#1,447 4 comments 0 reactions 1 assignee View on GitHub

@microkatz is already working on this.

Since Jun 14, 2024.

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

Description

Version

Media3 1.1.1 / ExoPlayer 2.19.1

More version details

No response

Devices that reproduce the issue

Across all devices
65% Samsung all models
26% Amazon all models

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Not tested

Reproduction steps

Happening on Live streams only, VOD is fine
The crash happens after 15-30mins, possibly when there's Server side ad replacement

Expected result

No Crash should happen

Actual result

Fatal Exception: java.lang.IllegalArgumentException: Multiple entries with same key: a5.r0@49ed724c=g-3:emsg and a5.r0@49ed724c=f-3:emsg
at com.google.common.collect.ImmutableMap$Builder$DuplicateKey.exception(ImmutableMap.java:661)
at com.google.common.collect.RegularImmutableMap.createHashTableOrThrow(RegularImmutableMap.java:290)
at com.google.common.collect.RegularImmutableBiMap.(RegularImmutableBiMap.java:58)
at com.google.common.collect.ImmutableBiMap$Builder.buildOrThrow(ImmutableBiMap.java:458)
at androidx.media3.session.MediaSessionStub.generateAndCacheUniqueTrackGroupIds(MediaSessionStub.java:1804)
at androidx.media3.session.MediaSessionImpl.dispatchOnPlayerInfoChanged(MediaSessionImpl.java:363)
at androidx.media3.session.MediaSessionImpl.access$600(MediaSessionImpl.java:87)
at androidx.media3.session.MediaSessionImpl$PlayerInfoChangedHandler.handleMessage(MediaSessionImpl.java:1376)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7785)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:612)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:997)

Media

Can provide further details if needed

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.