Description
openedon Nov 7, 2022
ExoPlayer Version
2.18.1
Devices that reproduce the issue
Devices: Moto, Samsung, Pixel
Android Versions: 12, 13
Devices that do not reproduce the issue
Has not been observed on any android versions under 12
Reproducible in the demo app?
Trying, haven't been able to reproduce
Reproduction steps
I've been able to reproduce it locally by triggering rapid volume changes when exiting playback. I've done it both via spamming ADB commands and also holding the physical volume slider on the phone.
Looking across multiple instances of it occurring, it seems to happen to a non-insignificant number of users after the playback activity / fragments trigger their destroyed lifecycle methods.
It's worth noting that our playback activity is locked to landscape, so users often get configuration changes when exiting it (many users lock their phones in portrait). Reproducing this using the volume method as described above is rather flakey - but as of right now I haven't been able to reproduce while keeping the phone in landscape across both activities.
java.lang.IllegalStateException
at com.google.android.exoplayer2.util.Assertions.checkState
at com.google.android.exoplayer2.util.FlagSet$Builder.build(SourceFile:150)
at com.google.android.exoplayer2.util.ListenerSet$ListenerHolder.release
at com.google.android.exoplayer2.util.ListenerSet.release(SourceFile:236)
at com.google.android.exoplayer2.analytics.DefaultAnalyticsCollector.releaseInternal
at com.google.android.exoplayer2.StreamVolumeManager$VolumeChangeReceiver$$InternalSyntheticLambda$3$f8a604daa12c21ed8502402f441ed63734c776977dc7c4af3d0e402bf56df29e$0.run$bridge(SourceFile:0)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8751)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
Expected result
ExoPlayer would not throw an IllegalStateException after the activity has been destroyed.
Actual result
ExoPlayer occasionally enters a state where an exception is thrown.
Media
N/A
Bug Report
- You will email the zip file produced by
adb bugreport
to dev.exoplayer@gmail.com after filing this issue.