FATAL EXCEPTION: main
Process: com.github.libretube.debug, PID: 23910
java.lang.NullPointerException
at com.github.libretube.ui.views.CustomExoPlayerView.initialize(CustomExoPlayerView.kt:263)
at com.github.libretube.ui.fragments.PlayerFragment.playVideo(PlayerFragment.kt:979)
at com.github.libretube.ui.fragments.PlayerFragment.access$playVideo(PlayerFragment.kt:120)
at com.github.libretube.ui.fragments.PlayerFragment$playerListener$1.onMediaMetadataChanged(PlayerFragment.kt:320)
at androidx.media3.session.MediaControllerImplBase.lambda$notifyPlayerInfoListenersWithReasons$83(MediaControllerImplBase.java:2379)
at androidx.media3.session.MediaControllerImplBase$$ExternalSyntheticLambda66.invoke(D8$$SyntheticClass:0)
at androidx.media3.common.util.ListenerSet$ListenerHolder.invoke(ListenerSet.java:339)
at androidx.media3.common.util.ListenerSet.lambda$queueEvent$0(ListenerSet.java:223)
at androidx.media3.common.util.ListenerSet$$ExternalSyntheticLambda1.run(D8$$SyntheticClass:0)
at androidx.media3.common.util.ListenerSet.flushEvents(ListenerSet.java:245)
at androidx.media3.session.MediaControllerImplBase.notifyPlayerInfoListenersWithReasons(MediaControllerImplBase.java:2488)
at androidx.media3.session.MediaControllerImplBase.onPlayerInfoChanged(MediaControllerImplBase.java:2754)
at androidx.media3.session.MediaControllerStub.lambda$onPlayerInfoChangedWithExclusions$9(MediaControllerStub.java:258)
at androidx.media3.session.MediaControllerStub$$ExternalSyntheticLambda5.run(D8$$SyntheticClass:0)
at androidx.media3.session.MediaControllerStub.lambda$dispatchControllerTaskOnHandler$14(MediaControllerStub.java:374)
at androidx.media3.session.MediaControllerStub$$ExternalSyntheticLambda6.run(D8$$SyntheticClass:0)
at androidx.media3.common.util.Util.postOrRun(Util.java:794)
at androidx.media3.session.MediaControllerStub.dispatchControllerTaskOnHandler(MediaControllerStub.java:366)
at androidx.media3.session.MediaControllerStub.onPlayerInfoChangedWithExclusions(MediaControllerStub.java:257)
at androidx.media3.session.MediaSessionStub$Controller2Cb.onPlayerInfoChanged(MediaSessionStub.java:2045)
at androidx.media3.session.MediaSessionImpl.dispatchOnPlayerInfoChanged(MediaSessionImpl.java:602)
at androidx.media3.session.MediaSessionImpl.access$900(MediaSessionImpl.java:101)
at androidx.media3.session.MediaSessionImpl$PlayerInfoChangedHandler.handleMessage(MediaSessionImpl.java:1893)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
Acknowledgements
[X] I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.
[X] I have written a short but informative title.
[X] I will fill out all of the requested information in this form.
Steps to reproduce
Expected behavior
No crashing when switching to the next video in PiP
Actual behavior
In PiP, the app crashes when switching to the next video and is removed from the taskbar
https://github.com/user-attachments/assets/7c49d4b3-05a2-447b-ae95-f35712febd3c
LibreTube version
0.26.0 Debug
Android version
All
Other details
FATAL EXCEPTION: main Process: com.github.libretube.debug, PID: 23910 java.lang.NullPointerException at com.github.libretube.ui.views.CustomExoPlayerView.initialize(CustomExoPlayerView.kt:263) at com.github.libretube.ui.fragments.PlayerFragment.playVideo(PlayerFragment.kt:979) at com.github.libretube.ui.fragments.PlayerFragment.access$playVideo(PlayerFragment.kt:120) at com.github.libretube.ui.fragments.PlayerFragment$playerListener$1.onMediaMetadataChanged(PlayerFragment.kt:320) at androidx.media3.session.MediaControllerImplBase.lambda$notifyPlayerInfoListenersWithReasons$83(MediaControllerImplBase.java:2379) at androidx.media3.session.MediaControllerImplBase$$ExternalSyntheticLambda66.invoke(D8$$SyntheticClass:0) at androidx.media3.common.util.ListenerSet$ListenerHolder.invoke(ListenerSet.java:339) at androidx.media3.common.util.ListenerSet.lambda$queueEvent$0(ListenerSet.java:223) at androidx.media3.common.util.ListenerSet$$ExternalSyntheticLambda1.run(D8$$SyntheticClass:0) at androidx.media3.common.util.ListenerSet.flushEvents(ListenerSet.java:245) at androidx.media3.session.MediaControllerImplBase.notifyPlayerInfoListenersWithReasons(MediaControllerImplBase.java:2488) at androidx.media3.session.MediaControllerImplBase.onPlayerInfoChanged(MediaControllerImplBase.java:2754) at androidx.media3.session.MediaControllerStub.lambda$onPlayerInfoChangedWithExclusions$9(MediaControllerStub.java:258) at androidx.media3.session.MediaControllerStub$$ExternalSyntheticLambda5.run(D8$$SyntheticClass:0) at androidx.media3.session.MediaControllerStub.lambda$dispatchControllerTaskOnHandler$14(MediaControllerStub.java:374) at androidx.media3.session.MediaControllerStub$$ExternalSyntheticLambda6.run(D8$$SyntheticClass:0) at androidx.media3.common.util.Util.postOrRun(Util.java:794) at androidx.media3.session.MediaControllerStub.dispatchControllerTaskOnHandler(MediaControllerStub.java:366) at androidx.media3.session.MediaControllerStub.onPlayerInfoChangedWithExclusions(MediaControllerStub.java:257) at androidx.media3.session.MediaSessionStub$Controller2Cb.onPlayerInfoChanged(MediaSessionStub.java:2045) at androidx.media3.session.MediaSessionImpl.dispatchOnPlayerInfoChanged(MediaSessionImpl.java:602) at androidx.media3.session.MediaSessionImpl.access$900(MediaSessionImpl.java:101) at androidx.media3.session.MediaSessionImpl$PlayerInfoChangedHandler.handleMessage(MediaSessionImpl.java:1893) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at android.app.ActivityThread.main(ActivityThread.java:8669) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
Acknowledgements