ExoPlayer icon indicating copy to clipboard operation
ExoPlayer copied to clipboard

Attempt to invoke virtual method 'java.lang.Object java.lang.ref.WeakReference.get()' on onTimelineChanged

Open vimal1695 opened this issue 3 years ago • 2 comments

ExoPlayer Version

2.18.1

Devices that reproduce the issue

Galaxy A20s Lenovo Tab P10

Devices that do not reproduce the issue

Example Unable to reproduce the crash

Reproducible in the demo app?

No

Reproduction steps

Unable to reproduce

Expected result

The media play successfully

Actual result

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.lang.ref.WeakReference.get()' on a null object reference at c.h.a.a.b.k.onTimelineChanged(:2) at c.h.a.a.b.k.onTimelineChanged(:2) at com.google.android.exoplayer2.analytics.DefaultAnalyticsCollector.d0(DefaultAnalyticsCollector.java:1) at c.f.a.b.n2.f1.invoke(:6) at com.google.android.exoplayer2.util.ListenerSet$ListenerHolder.invoke(ListenerSet.java:4) at com.google.android.exoplayer2.util.ListenerSet.b(ListenerSet.java:2) at c.f.a.b.a3.a.run(:6) at com.google.android.exoplayer2.util.ListenerSet.flushEvents(ListenerSet.java:8) at com.google.android.exoplayer2.util.ListenerSet.sendEvent(ListenerSet.java:2) at com.google.android.exoplayer2.analytics.DefaultAnalyticsCollector.sendEvent(DefaultAnalyticsCollector.java:2) at com.google.android.exoplayer2.analytics.DefaultAnalyticsCollector.onTimelineChanged(DefaultAnalyticsCollector.java:3) at com.google.android.exoplayer2.ExoPlayerImpl.t(ExoPlayerImpl.java:1) at c.f.a.b.g1.invoke(:6) at com.google.android.exoplayer2.util.ListenerSet$ListenerHolder.invoke(ListenerSet.java:4) at com.google.android.exoplayer2.util.ListenerSet.b(ListenerSet.java:2) at c.f.a.b.a3.a.run(:6) at com.google.android.exoplayer2.util.ListenerSet.flushEvents(ListenerSet.java:8) at com.google.android.exoplayer2.ExoPlayerImpl.updatePlaybackInfo(ExoPlayerImpl.java:55) at com.google.android.exoplayer2.ExoPlayerImpl.handlePlaybackInfo(ExoPlayerImpl.java:24) at com.google.android.exoplayer2.ExoPlayerImpl.d(ExoPlayerImpl.java:1) at com.google.android.exoplayer2.ExoPlayerImpl.e() at c.f.a.b.i1.run(:4) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6758) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

Media

Not applicable

Bug Report

  • [ ] You will email the zip file produced by adb bugreport to [email protected] after filing this issue.

vimal1695 avatar Sep 05 '22 09:09 vimal1695

Please can you provide an unobfuscated stack trace so we can understand exactly what line is throwing the NPE? I couldn't spot any WeakReference usages near to DefaultAnalyticsCollector in the ExoPlayer code - so I wonder if this could be coming from an implementation of AnalyticsListener.onTimelineChanged in your app?

icbaker avatar Sep 05 '22 16:09 icbaker

Hey @vimal1695. We need more information to resolve this issue but there hasn't been an update in 14 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot avatar Sep 23 '22 01:09 google-oss-bot

Since there haven't been any recent updates here, I am going to close this issue.

@vimal1695 if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

google-oss-bot avatar Oct 04 '22 01:10 google-oss-bot