android.view.WindowManager$BadTokenException: Unable to add window -- token android.view.ViewRootImpl$W@ea34c19 is not valid; is your activity running?
at android.view.ViewRootImpl.setView(ViewRootImpl.java:1764)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:567)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:148)
at android.widget.PopupWindow.invokePopup(PopupWindow.java:1687)
at android.widget.PopupWindow.showAsDropDown(PopupWindow.java:1488)
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:1170)
at org.schabi.newpipe.player.ui.VideoPlayerUi.$r8$lambda$iMhrWss0nWtwij0xWfN28ICWQUk(VideoPlayerUi.java:0)
at org.schabi.newpipe.player.ui.VideoPlayerUi$$ExternalSyntheticLambda17.run(R8$$SyntheticClass:0)
at org.schabi.newpipe.player.ui.VideoPlayerUi.lambda$makeOnClickListener$26(VideoPlayerUi.java:1336)
at org.schabi.newpipe.player.ui.VideoPlayerUi.$r8$lambda$-liQzwojzgb3c-WB0sRgyQOP0b4(VideoPlayerUi.java:0)
at org.schabi.newpipe.player.ui.VideoPlayerUi$$ExternalSyntheticLambda39.onClick(R8$$SyntheticClass:0)
at android.view.View.performClick(View.java:7892)
at android.widget.TextView.performClick(TextView.java:16219)
at android.view.View.performClickInternal(View.java:7869)
at android.view.View.-$$Nest$mperformClickInternal(Unknown Source:0)
at android.view.View$PerformClick.run(View.java:30880)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8757)
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:1067)
Affected Android/Custom ROM version
android 13 /oneUI 5.1
Affected device model
samsung galaxy s22 /dex mode
Additional information
this crash only happened when i use the app on samsung dex mode but in normal phone oneUI i can change the resolution normaly without any issue
Checklist
Affected version
0.25.0
Steps to reproduce the bug
clicking on 720p button
Expected behavior
change the resolution to 1080p
Actual behavior
crash
Screenshots/Screen recordings
No response
Logs
Exception
Crash log
Affected Android/Custom ROM version
android 13 /oneUI 5.1
Affected device model
samsung galaxy s22 /dex mode
Additional information
this crash only happened when i use the app on samsung dex mode but in normal phone oneUI i can change the resolution normaly without any issue