NewPipe
NewPipe copied to clipboard
Selecting an option in suggested video popup can crash NewPipe
Checklist
- [X] I am able to reproduce the bug with the latest version.
- [X] I made sure that there are no existing issues - open or closed - which I could contribute my information to.
- [X] I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
- [X] This issue contains only one bug.
- [X] I have read and understood the contribution guidelines.
Affected version
0.23.1 from NewPipe's F-Droid repository
Steps to reproduce the bug
- Start playing a queue of videos (playlist or by manually enqueueing videos)
- Skip to near the end of the current video
- Longpress on a suggested similar video below the player to bring up the popup with possible actions (enqueue, Start playing in background/popup, Add to playlist, etc.)
- Wait for current video to end and the next one to start
- Observe that the suggested videos have changed to those of the newly playing video but that the popup is still open.
- Select "Enqueue" option in popup (Probably also works with other menu entries)
- Observe the crash
Expected behavior
Either:
- The popup remembers the video suggestion it was opened for even after there are new suggested videos OR
- The popup is automatically closed if the shown video suggestions are changed.
Actual behavior
I assume the popup holds a reference of some kind to the entry in the old suggestion list and cannot properly handle the data it is referring to changing under it's nose (invalid assumption of immutability) or the data it references was invalidated / discarded and can no longer be accessed properly. This causes the application to crash.
Screenshots/Screen recordings
Screen recording of the crash in action: https://nextcloud.jotoho.de/s/LLdNHkEFe9bbbBF (link will expire in a year)
Logs
Exception
- User Action: ui error
- Request: ACRA report
- Content Country: DE
- Content Language: de-DE
- App Language: en
- Service: none
- Version: 0.23.1
- OS: Linux Android 11 - 30
Crash log
java.lang.IllegalStateException: Fragment RelatedItemsFragment{399366f} (3be008c6-4977-4384-a279-dfeb5d606d8f) not attached to a context.
at androidx.fragment.app.Fragment.requireContext(Fragment.java:900)
at org.schabi.newpipe.info_list.dialog.StreamDialogDefaultEntry.lambda$static$3(StreamDialogDefaultEntry.java:51)
at org.schabi.newpipe.info_list.dialog.StreamDialogDefaultEntry.$r8$lambda$vJPfXGxkVEGzC3RaucaklOZ4WRo(Unknown Source:0)
at org.schabi.newpipe.info_list.dialog.StreamDialogDefaultEntry$$ExternalSyntheticLambda17.onClick(Unknown Source:0)
at org.schabi.newpipe.info_list.dialog.InfoItemDialog.lambda$new$2(InfoItemDialog.java:76)
at org.schabi.newpipe.info_list.dialog.InfoItemDialog.$r8$lambda$rolB38hFbFwRPfIy0nmFKZx8iWo(Unknown Source:0)
at org.schabi.newpipe.info_list.dialog.InfoItemDialog$$ExternalSyntheticLambda0.onClick(Unknown Source:6)
at androidx.appcompat.app.AlertController$AlertParams$3.onItemClick(AlertController.java:1068)
at android.widget.AdapterView.performItemClick(AdapterView.java:330)
at android.widget.AbsListView.performItemClick(AbsListView.java:1187)
at android.widget.AbsListView$PerformClick.run(AbsListView.java:3179)
at android.widget.AbsListView.onTouchUp(AbsListView.java:4109)
at android.widget.AbsListView.onTouchEvent(AbsListView.java:3867)
at android.view.View.dispatchTouchEvent(View.java:14402)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3120)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2792)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3126)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2806)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3126)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2806)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3126)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2806)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3126)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2806)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3126)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2806)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3126)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2806)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3126)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2806)
at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:491)
at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1871)
at android.app.Dialog.dispatchTouchEvent(Dialog.java:859)
at androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:69)
at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:449)
at android.view.View.dispatchPointerEvent(View.java:14665)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:6104)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:5900)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5390)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5448)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5413)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:5566)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5421)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:5623)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5394)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5448)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5413)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5421)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5394)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:8223)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:8174)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:8135)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:8352)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:220)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:335)
at android.os.Looper.loop(Looper.java:183)
at android.app.ActivityThread.main(ActivityThread.java:7955)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:603)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Affected Android/Custom ROM version
Android 11
Affected device model
Nokia G21
Additional information
No response
I should note that this crash is not a recent addition to the app. The first time this happened to me was some months ago.