Skip to content

Captions and/or attempting to change resolution crash NewPipe (similar to #9862)  #12327

@Windows81

Description

@Windows81

Checklist

  • I am able to reproduce the bug with the latest version given here: CLICK THIS LINK.
  • I made sure that there are no existing issues - open or closed - which I could contribute my information to.
  • I have read the FAQ and my problem isn't listed.
  • I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • This issue contains only one bug.
  • I have read and understood the contribution guidelines.

Affected version

0.27.7

Steps to reproduce the bug

  1. Navigate to a video
  2. Touch the expand arrow on the top right
  3. Click on "No Captions"

Expected behavior

Probably show a list of subtitle languages

Actual behavior

Screen goes grey for a second; error log shows up almost immediately

Screenshots/Screen recordings

Image

Logs

Exception

  • User Action: ui error
  • Request: ACRA report
  • Content Country: GB
  • Content Language: en-GB
  • App Language: en_GB
  • Service: none
  • Timestamp: 2025-06-01T20:55:50.245Z
  • Package: org.schabi.newpipe
  • Service: none
  • Version: 0.27.7
  • OS: Linux Android 12 - 32
Crash log

java.lang.UnsupportedOperationException: Tried to obtain display from a Context not associated with one. Only visual Contexts (such as Activity or one created with Context#createWindowContext) or ones created with Context#createDisplayContext are associated with displays. Other types of Contexts are typically related to background entities and may return an arbitrary display.
	at android.app.ContextImpl.getDisplay(ContextImpl.java:2844)
	at android.content.ContextWrapper.getDisplay(ContextWrapper.java:1098)
	at android.content.ContextWrapper.getDisplay(ContextWrapper.java:1098)
	at android.content.ContextWrapper.getDisplay(ContextWrapper.java:1098)
	at android.view.View.getWindowDisplayFrame(View.java:15180)
	at android.widget.PopupWindow.getMaxAvailableHeight(PopupWindow.java:1985)
	at androidx.appcompat.widget.ListPopupWindow$Api24Impl.getMaxAvailableHeight(ListPopupWindow.java:1491)
	at androidx.appcompat.widget.ListPopupWindow.getMaxAvailableHeight(ListPopupWindow.java:1460)
	at androidx.appcompat.widget.ListPopupWindow.buildDropDown(ListPopupWindow.java:1297)
	at androidx.appcompat.widget.ListPopupWindow.show(ListPopupWindow.java:666)
	at androidx.appcompat.view.menu.StandardMenuPopup.tryShow(StandardMenuPopup.java:181)
	at androidx.appcompat.view.menu.StandardMenuPopup.show(StandardMenuPopup.java:208)
	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.onCaptionClicked(VideoPlayerUi.java:1346)
	at org.schabi.newpipe.player.ui.VideoPlayerUi.$r8$lambda$KXowSePGJJS7bIvlhbnxF_l79mk(VideoPlayerUi.java:0)
	at org.schabi.newpipe.player.ui.VideoPlayerUi$$ExternalSyntheticLambda24.run(R8$$SyntheticClass:0)
	at org.schabi.newpipe.player.ui.VideoPlayerUi.lambda$makeOnClickListener$27(VideoPlayerUi.java:1442)
	at org.schabi.newpipe.player.ui.VideoPlayerUi.$r8$lambda$sLz84DjfIdKegRqDuEqocysGYyg(VideoPlayerUi.java:0)
	at org.schabi.newpipe.player.ui.VideoPlayerUi$$ExternalSyntheticLambda43.onClick(R8$$SyntheticClass:0)
	at android.view.View.performClick(View.java:7471)
	at android.view.View.performClickInternal(View.java:7448)
	at android.view.View.access$3700(View.java:845)
	at android.view.View$PerformClick.run(View.java:29049)
	at android.os.Handler.handleCallback(Handler.java:938)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loopOnce(Looper.java:201)
	at android.os.Looper.loop(Looper.java:288)
	at android.app.ActivityThread.main(ActivityThread.java:7874)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)


Affected Android/Custom ROM version

Android 12L (stock for device)

Affected device model

Surface Duo 1

Additional information

I have Captions enabled in the accessibility options.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateIssue or discussion is a duplicate of an existing issue or discussiontemplate ignoredThe user didn't follow the template/instructions (or removed them)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions