Skip to content

NullPointerException when enqueueing from sparse feed #9609

Open
@ktprograms

Description

@ktprograms

Checklist

  • I am able to reproduce the bug with the latest version.
  • 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.24.1

Steps to reproduce the bug

In a subscription feed with "fast loading" enabled (where feed items from YouTube are "sparse"), have some videos playing, then enqueue one or more sparse items.
This only happens sometimes, and I'm not sure what causes it to happen/not happen sometimes.

Expected behavior

No crash

Actual behavior

Crash

(sorry about these short answers, what else is expected from a NullPointerException?)

Screenshots/Screen recordings

No response

Logs

Exception

  • User Action: ui error
  • Request: ACRA report
  • Content Country: GB
  • Content Language: en-GB
  • App Language: en_GB
  • Service: none
  • Version: 0.24.1
  • OS: Linux Android 12 - 31
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:892)
	at org.schabi.newpipe.util.NavigationHelper.enqueueOnPlayer(NavigationHelper.java:186)
	at org.schabi.newpipe.util.NavigationHelper.enqueueOnPlayer(NavigationHelper.java:200)
	at org.schabi.newpipe.info_list.dialog.StreamDialogDefaultEntry.lambda$static$2(StreamDialogDefaultEntry.java:54)
	at org.schabi.newpipe.info_list.dialog.StreamDialogDefaultEntry.$r8$lambda$HrNW3ftQD3NQNetYZjrz1JDwzD4(Unknown Source:0)
	at org.schabi.newpipe.info_list.dialog.StreamDialogDefaultEntry$$ExternalSyntheticLambda15.accept(Unknown Source:4)
	at org.schabi.newpipe.util.SparseItemUtil.lambda$fetchItemInfoIfSparse$0(SparseItemUtil.java:60)
	at org.schabi.newpipe.util.SparseItemUtil.$r8$lambda$rd2kSpgtBScfiwrztd_5JrCbEyQ(Unknown Source:0)
	at org.schabi.newpipe.util.SparseItemUtil$$ExternalSyntheticLambda2.accept(Unknown Source:4)
	at org.schabi.newpipe.util.SparseItemUtil.lambda$fetchStreamInfoAndSaveToDatabase$4(SparseItemUtil.java:121)
	at org.schabi.newpipe.util.SparseItemUtil.$r8$lambda$cfmnXoy0qdCzt8EeO-smvalxWsM(Unknown Source:0)
	at org.schabi.newpipe.util.SparseItemUtil$$ExternalSyntheticLambda0.accept(Unknown Source:6)
	at io.reactivex.rxjava3.internal.observers.ConsumerSingleObserver.onSuccess(ConsumerSingleObserver.java:62)
	at io.reactivex.rxjava3.internal.operators.single.SingleObserveOn$ObserveOnSingleObserver.run(SingleObserveOn.java:81)
	at io.reactivex.rxjava3.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:123)
	at android.os.Handler.handleCallback(Handler.java:938)
	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:8669)
	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:1135)

Affected Android/Custom ROM version

Android 12 (Samsung OneUI 4.1)

Affected device model

Samsung Galaxy A23

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue is related to a bugfeedIssue is related to the feedgood first issueEasy/simple issues perfect for newcomers to get involved in the project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions