TeamNewPipe / NewPipe

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

Crash during Video Resolution change in Samsung Dex #5264

Closed bibbca closed 2 years ago

bibbca commented 3 years ago

Checklist

Steps to reproduce the bug

  1. Open NewPipe on the external screen in Samsung Dex
  2. Start playing a video on the external screen
  3. Select a new video resolution.

Actual behaviour

App crashes with an error message.

Expected behavior

I would like the video to continue to play in the new resolution.

Logs

Exception

android.view.WindowManager$BadTokenException: Unable to add window -- token android.view.ViewRootImpl$W@beb8ea6 is not valid; is your activity running?
    at android.view.ViewRootImpl.setView(ViewRootImpl.java:1150)
    at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:471)
    at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:95)
    at android.widget.PopupWindow.invokePopup(PopupWindow.java:1621)
    at android.widget.PopupWindow.showAsDropDown(PopupWindow.java:1456)
    at android.widget.ListPopupWindow.show(ListPopupWindow.java:762)
    at com.android.internal.view.menu.StandardMenuPopup.tryShow(StandardMenuPopup.java:239)
    at com.android.internal.view.menu.StandardMenuPopup.show(StandardMenuPopup.java:274)
    at com.android.internal.view.menu.MenuPopupHelper.showPopup(MenuPopupHelper.java:288)
    at com.android.internal.view.menu.MenuPopupHelper.tryShow(MenuPopupHelper.java:180)
    at com.android.internal.view.menu.MenuPopupHelper.show(MenuPopupHelper.java:144)
    at android.widget.PopupMenu.show(PopupMenu.java:230)
    at org.schabi.newpipe.player.VideoPlayer.onQualitySelectorClicked(VideoPlayer.java:759)
    at org.schabi.newpipe.player.VideoPlayer.onClick(VideoPlayer.java:693)
    at org.schabi.newpipe.player.VideoPlayerImpl.onClick(VideoPlayerImpl.java:767)
    at android.view.View.performClick(View.java:7862)
    at android.widget.TextView.performClick(TextView.java:15004)
    at android.view.View.performClickInternal(View.java:7831)
    at android.view.View.access$3600(View.java:879)
    at android.view.View$PerformClick.run(View.java:29359)
    at android.os.Handler.handleCallback(Handler.java:883)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loop(Looper.java:237)
    at android.app.ActivityThread.main(ActivityThread.java:8167)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)


ShareASmile commented 3 years ago

@TobiGr would you please look into it since it is Samsung Dex Support related https://github.com/TeamNewPipe/NewPipe/pull/3948

litetex commented 2 years ago

Is this still a problem?

github-actions[bot] commented 2 years 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.

bibbca commented 2 years ago

I haven't had this issue in a few versions. I assume it's fixed?

jweickm commented 2 years ago

I still have this issue on a Galaxy S10 with Android 12 and Dex (connecting the phone via USB-C to an external display). Was surprised to see that this issue was already reported two years ago. Does anybody else still have this issue? If not, are there any known steps to fixing this (New Pipe is on the newest version as of today)?

opusforlife2 commented 2 years ago

@jweickm Open a new issue?

jweickm commented 2 years ago

@opusforlife2 Since it is the same issue that was described here, I'd rather if we reopen this issue here (if possible).

litetex commented 2 years ago

@jweickm See also #7865