TeamNewPipe / NewPipe

A libre lightweight streaming front-end for Android.
https://newpipe.net
GNU General Public License v3.0
29.44k stars 2.95k forks source link

Opening video quality/captions selector menu crashes on Quest #9862

Open DevanWolf opened 1 year ago

DevanWolf commented 1 year ago

Checklist

Affected version

0.27.0 and earlier

Steps to reproduce the bug

  1. Play any video
  2. Open the video quality/resolution setting menu (e.g. 720p)

Expected behavior

The quality list menu is supposed to show up as if it were viewing on other devices (phone/tablet).

Actual behavior

App crash

Screenshots/Screen recordings

No response

Logs

Opening video resolution menu on Quest crashes app

Exception

android.view.WindowManager$BadTokenException: Unable to add window -- token android.view.ViewRootImpl$W@5e5b01d is not valid; is your activity running?
    at android.view.ViewRootImpl.setView(ViewRootImpl.java:941)
    at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:387)
    at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:95)
    at android.widget.PopupWindow.invokePopup(PopupWindow.java:1577)
    at android.widget.PopupWindow.showAsDropDown(PopupWindow.java:1424)
    at androidx.appcompat.widget.AppCompatPopupWindow.showAsDropDown(AppCompatPopupWindow.java:77)
    at androidx.core.widget.PopupWindowCompat$Api19Impl.showAsDropDown(PopupWindowCompat.java:247)
    at androidx.core.widget.PopupWindowCompat.showAsDropDown(PopupWindowCompat.java:71)
    at androidx.appcompat.widget.ListPopupWindow.show(ListPopupWindow.java:757)
    at androidx.appcompat.view.menu.CascadingMenuPopup.showMenu(CascadingMenuPopup.java:487)
    at androidx.appcompat.view.menu.CascadingMenuPopup.show(CascadingMenuPopup.java:266)
    at androidx.appcompat.view.menu.MenuPopupHelper.showPopup(MenuPopupHelper.java:299)
    at androidx.appcompat.view.menu.MenuPopupHelper.tryShow(MenuPopupHelper.java:185)
    at androidx.appcompat.view.menu.MenuPopupHelper.show(MenuPopupHelper.java:147)
    at androidx.appcompat.widget.PopupMenu.show(PopupMenu.java:238)
    at org.schabi.newpipe.player.ui.VideoPlayerUi.onQualityClicked(VideoPlayerUi.java:1165)
    at org.schabi.newpipe.player.ui.VideoPlayerUi.onClick(VideoPlayerUi.java:1369)
    at org.schabi.newpipe.player.ui.MainPlayerUi.onClick(MainPlayerUi.java:863)
    at android.view.View.performClick(View.java:7259)
    at android.view.View.performClickInternal(View.java:7236)
    at android.view.View.access$3600(View.java:801)
    at android.view.View$PerformClick.run(View.java:27892)
    at android.os.Handler.handleCallback(Handler.java:886)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:227)
    at android.app.ActivityThread.main(ActivityThread.java:7436)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)


Affected Android/Custom ROM version

Android 10/12L / Meta Quest Platform

Affected device model

Meta Quest 2/Pro/3

Additional information

Device is an HMD

SameenAhnaf commented 1 year ago

0.25.0 is the latest version. Please update to the latest version and check if the bug still persists.

DevanWolf commented 1 year ago

Same problem on that latest version, even the caption menu does it.

opusforlife2 commented 1 year ago

Update your description to state the correct version.

github-actions[bot] commented 1 year ago

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.

av01d1ngx4 commented 1 year ago

This error notice indicates that an attempt was made to add a new window to the currently running activity, but the activity may have been terminated or was not operating when the window was added.

This error can occur in a variety of situations, including attempting to display a dialog or a popup window after the activity has been destroyed, or attempting to display a popup window from a background thread.

DevanWolf commented 1 month ago

Bug is still present in the latest version (v0.27.0)

opusforlife2 commented 1 month ago

Update your description to state the correct version.

^

Also, replace that old crash report with one from the latest version, just so we can be sure the log is the same.

DevanWolf commented 2 weeks ago

I did (assuming it's the same log).