Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Enqueue UI app crash #5470

Closed
3 of 4 tasks
erikeah opened this issue Jan 21, 2021 · 7 comments · Fixed by #11614
Closed
3 of 4 tasks

Enqueue UI app crash #5470

erikeah opened this issue Jan 21, 2021 · 7 comments · Fixed by #11614
Labels
bug Issue is related to a bug template ignored The user didn't follow the template/instructions (or removed them)

Comments

@erikeah
Copy link

erikeah commented Jan 21, 2021

Checklist

Steps to reproduce the bug

(You should have auto play next video enabled)

  1. Play in the background anything.
  2. In the video recomendation section of the content that you are already playing long press any content to show the menu.
  3. Wait that the content that you have already played has ended while the menu is still displayed.
  4. When the next content is being played, press enqueue.
  5. Crash

Actual behaviour

The app crash and close, after a guru meditation windows shows up.

Expected behavior

Screenshots/Screen recordings

Logs

Exception

  • User Action: ui error
  • Request: App crash, UI failure
  • Content Country: GB
  • Content Language: en-GB
  • App Language: en_GB
  • Service: none
  • Version: 0.20.8
  • OS: Linux Android 10 - 29
Crash log

java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference
	at android.widget.Toast.makeText(Toast.java:315)
	at org.schabi.newpipe.util.NavigationHelper.enqueueOnBackgroundPlayer(NavigationHelper.java:198)
	at org.schabi.newpipe.util.NavigationHelper.enqueueOnBackgroundPlayer(NavigationHelper.java:191)
	at org.schabi.newpipe.util.StreamDialogEntry.lambda$static$0(StreamDialogEntry.java:35)
	at org.schabi.newpipe.util.-$$Lambda$StreamDialogEntry$62aigyTTdqr26LrXhhJwc-oYHBk.onClick(Unknown Source:0)
	at org.schabi.newpipe.util.StreamDialogEntry.clickOn(StreamDialogEntry.java:132)
	at org.schabi.newpipe.fragments.list.BaseListFragment.lambda$showStreamDialog$1(BaseListFragment.java:365)
	at org.schabi.newpipe.fragments.list.BaseListFragment.lambda$showStreamDialog$1$BaseListFragment(Unknown Source:0)
	at org.schabi.newpipe.fragments.list.-$$Lambda$BaseListFragment$PrX9_25MbpqEQd6DTy65QLAhdlQ.onClick(Unknown Source:4)
	at com.android.internal.app.AlertController$AlertParams$3.onItemClick(AlertController.java:1222)
	at android.widget.AdapterView.performItemClick(AdapterView.java:330)
	at android.widget.AbsListView.performItemClick(AbsListView.java:1196)
	at android.widget.AbsListView$PerformClick.run(AbsListView.java:3207)
	at android.widget.AbsListView$3.run(AbsListView.java:4125)
	at android.os.Handler.handleCallback(Handler.java:883)
	at android.os.Handler.dispatchMessage(Handler.java:100)
	at android.os.Looper.loop(Looper.java:224)
	at android.app.ActivityThread.main(ActivityThread.java:7561)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:995)


Device info

  • Android version/Custom ROM version: MIUI 12/Android 10
  • Device model: Xiaomi Note 9 (merlin)
@erikeah erikeah added the bug Issue is related to a bug label Jan 21, 2021
@vkay94
Copy link
Contributor

vkay94 commented Jan 21, 2021

Thank you for reporting this bug ;) I checked and could reproduce it. In fact, this crash is not limited to the enqueue action but also happens on choosing "Share" for example.

The easiest way to fix it is by closing the menu dialog whenever the stream changed (= related streams change).

@SumatraPeter
Copy link

Exception

  • User Action: ui error
  • Request: ACRA report
  • Content Country: US
  • Content Language: en-US
  • App Language: en_US
  • Service: none
  • Version: 0.21.7
  • OS: Linux Android 5.0.1 - 21
Crash log

java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference
	at android.widget.Toast.makeText(Toast.java:294)
	at org.schabi.newpipe.util.NavigationHelper.enqueueOnVideoPlayer(NavigationHelper.java:168)
	at org.schabi.newpipe.util.NavigationHelper.enqueueOnVideoPlayer(NavigationHelper.java:161)
	at org.schabi.newpipe.util.StreamDialogEntry.lambda$static$1(StreamDialogEntry.java:51)
	at org.schabi.newpipe.util.-$$Lambda$StreamDialogEntry$P8nCsNt_qHShgSaccFUg1FFUTIE.onClick(lambda)
	at org.schabi.newpipe.util.StreamDialogEntry.clickOn(StreamDialogEntry.java:153)
	at org.schabi.newpipe.fragments.list.BaseListFragment.lambda$showStreamDialog$1(BaseListFragment.java:384)
	at org.schabi.newpipe.fragments.list.BaseListFragment.lambda$showStreamDialog$1$BaseListFragment(BaseListFragment.java)
	at org.schabi.newpipe.fragments.list.-$$Lambda$BaseListFragment$PrX9_25MbpqEQd6DTy65QLAhdlQ.onClick(lambda)
	at androidx.appcompat.app.AlertController$AlertParams$3.onItemClick(AlertController.java:1068)
	at android.widget.AdapterView.performItemClick(AdapterView.java:300)
	at android.widget.AbsListView.performItemClick(AbsListView.java:1143)
	at android.widget.AbsListView$PerformClick.run(AbsListView.java:3044)
	at android.widget.AbsListView$3.run(AbsListView.java:3833)
	at android.os.Handler.handleCallback(Handler.java:739)
	at android.os.Handler.dispatchMessage(Handler.java:95)
	at android.os.Looper.loop(Looper.java:135)
	at android.app.ActivityThread.main(ActivityThread.java:5306)
	at java.lang.reflect.Method.invoke(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:372)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)


I just got the above crash report. Not quite sure exactly but IIRC was indeed trying to enqueue something. It's the same issue and I don't need to open a new report, right?

@TacoTheDank
Copy link
Member

Hello, does this issue still occur on the latest version?

@erikeah
Copy link
Author

erikeah commented Mar 29, 2022

Yes, It's still occurring.

@TacoTheDank
Copy link
Member

@erikeah Could you post a new crashlog please (of the issue occurring on the latest version)? The current crashlog is no longer useful considering there have been many changes since then.

@litetex litetex added the template ignored The user didn't follow the template/instructions (or removed them) label Mar 30, 2022
@opusforlife2 opusforlife2 added the waiting for author If the author doesn't respond, the issue will be auto-closed. Otherwise the label will be removed. label Apr 1, 2022
@github-actions
Copy link

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.

@ShareASmile ShareASmile removed the waiting for author If the author doesn't respond, the issue will be auto-closed. Otherwise the label will be removed. label Oct 16, 2024
@ShareASmile
Copy link
Collaborator

Can reproduce it with current v0.27.2 with below stacktrace, however..

Following policy of 1 bug 1 issue,

Marking it as a duplicate of #11091 (because that one contains latest stacktrace) & this bug will be tracked there,.

Exception

  • User Action: ui error
  • Request: ACRA report
  • Content Country: IN
  • Content Language: pa-
  • App Language: pa
  • Service: none
  • Version: 0.27.2
  • OS: Linux samsung/a22xnnxx/a22x:13/TP1A.220624.014/A226BXXU7DWH4:user/release-keys 13 - 33
Crash log

java.lang.IllegalStateException: Fragment RelatedItemsFragment{dc76785} (75b5b1bb-0bfd-47a6-b0ac-ca6b6f844dcb) not attached to a context.
	at androidx.fragment.app.Fragment.requireContext(Fragment.java:972)
	at org.schabi.newpipe.info_list.dialog.StreamDialogDefaultEntry.lambda$static$3(StreamDialogDefaultEntry.java:53)
	at org.schabi.newpipe.info_list.dialog.StreamDialogDefaultEntry.$r8$lambda$vJPfXGxkVEGzC3RaucaklOZ4WRo(StreamDialogDefaultEntry.java:0)
	at org.schabi.newpipe.info_list.dialog.StreamDialogDefaultEntry$$ExternalSyntheticLambda5.onClick(R8$$SyntheticClass: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(InfoItemDialog.java:0)
	at org.schabi.newpipe.info_list.dialog.InfoItemDialog$$ExternalSyntheticLambda2.onClick(R8$$SyntheticClass:0)
	at androidx.appcompat.app.AlertController$AlertParams$3.onItemClick(AlertController.java:1068)
	at android.widget.AdapterView.performItemClick(AdapterView.java:376)
	at android.widget.AbsListView.performItemClick(AbsListView.java:1287)
	at android.widget.AbsListView$PerformClick.run(AbsListView.java:3563)
	at android.widget.AbsListView$3.run(AbsListView.java:4716)
	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:8762)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)


# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Issue is related to a bug template ignored The user didn't follow the template/instructions (or removed them)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants