Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Crash when trying to play/download some streams (failure to sort streams) #10883

Closed
6 tasks done
skylarmt opened this issue Mar 16, 2024 · 6 comments · Fixed by #10909
Closed
6 tasks done

Crash when trying to play/download some streams (failure to sort streams) #10883

skylarmt opened this issue Mar 16, 2024 · 6 comments · Fixed by #10909
Labels
bug Issue is related to a bug downloader Issue is related to the downloader player Issues related to any player (main, popup and background)

Comments

@skylarmt
Copy link

skylarmt commented Mar 16, 2024

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.26.1

Steps to reproduce the bug

  1. Try to play Mr. Beast's latest video: https://www.youtube.com/watch?v=mKdjycj-7eE
  2. As soon as you press play, an error occurs. The video does not play. Video does not appear to buffer before playing, the crash is instantaneous.

Expected behavior

Video should play.

Actual behavior

Error notification, three "error occurred" toasts display, one after another.

Screenshots/Screen recordings

No response

Logs

Exception

  • User Action: play stream
  • Request: Loading failed for [Protect The Lamborghini, Keep It!]: https://www.youtube.com/watch?v=mKdjycj-7eE
  • Content Country: US
  • Content Language: en-
  • App Language: en_US
  • Service: YouTube
  • Version: 0.26.1
  • OS: Linux Android 12 - 32
Crash log

java.lang.Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference
	at org.schabi.newpipe.player.playback.MediaSourceManager.lambda$getLoadedMediaSource$7(MediaSourceManager.java:454)
	at org.schabi.newpipe.player.playback.MediaSourceManager.$r8$lambda$7wkrzYpwfZdms79okpk8_MCaW4U(MediaSourceManager.java:0)
	at org.schabi.newpipe.player.playback.MediaSourceManager$$ExternalSyntheticLambda5.apply(R8$$SyntheticClass:0)
	at io.reactivex.rxjava3.internal.operators.single.SingleOnErrorReturn$OnErrorReturn.onError(SingleOnErrorReturn.java:55)
	at io.reactivex.rxjava3.internal.operators.single.SingleMap$MapSingleObserver.onError(SingleMap.java:70)
	at io.reactivex.rxjava3.internal.operators.single.SingleMap$MapSingleObserver.onSuccess(SingleMap.java:61)
	at io.reactivex.rxjava3.internal.operators.single.SingleDoOnError$DoOnError.onSuccess(SingleDoOnError.java:52)
	at io.reactivex.rxjava3.internal.operators.single.SingleSubscribeOn$SubscribeOnObserver.onSuccess(SingleSubscribeOn.java:68)
	at io.reactivex.rxjava3.internal.operators.maybe.MaybeToSingle$ToSingleMaybeSubscriber.onSuccess(MaybeToSingle.java:83)
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableElementAtMaybe$ElementAtSubscriber.onNext(FlowableElementAtMaybe.java:80)
	at io.reactivex.rxjava3.internal.operators.maybe.MaybeConcatArray$ConcatMaybeObserver.drain(MaybeConcatArray.java:136)
	at io.reactivex.rxjava3.internal.operators.maybe.MaybeConcatArray$ConcatMaybeObserver.request(MaybeConcatArray.java:78)
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableElementAtMaybe$ElementAtSubscriber.onSubscribe(FlowableElementAtMaybe.java:66)
	at io.reactivex.rxjava3.internal.operators.maybe.MaybeConcatArray.subscribeActual(MaybeConcatArray.java:42)
	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:16013)
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableElementAtMaybe.subscribeActual(FlowableElementAtMaybe.java:36)
	at io.reactivex.rxjava3.core.Maybe.subscribe(Maybe.java:5377)
	at io.reactivex.rxjava3.internal.operators.maybe.MaybeToSingle.subscribeActual(MaybeToSingle.java:46)
	at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4855)
	at io.reactivex.rxjava3.internal.operators.single.SingleSubscribeOn$SubscribeOnObserver.run(SingleSubscribeOn.java:89)
	at io.reactivex.rxjava3.core.Scheduler$DisposeTask.run(Scheduler.java:644)
	at io.reactivex.rxjava3.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:65)
	at io.reactivex.rxjava3.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:56)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at java.lang.Thread.run(Thread.java:920)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference
	at java.lang.Enum.compareTo(Enum.java:184)
	at java.lang.Enum.compareTo(Enum.java:61)
	at j$.util.Comparator$-CC.lambda$comparing$77a9974f$1(Unknown Source:10)
	at j$.util.Comparator$$ExternalSyntheticLambda5.compare(Unknown Source:2)
	at j$.util.Comparator$-CC.$private$lambda$thenComparing$36697e65$1(Unknown Source:7)
	at j$.util.Comparator$$ExternalSyntheticLambda1.compare(Unknown Source:4)
	at java.util.TimSort.binarySort(TimSort.java:296)
	at java.util.TimSort.sort(TimSort.java:221)
	at java.util.Arrays.sort(Arrays.java:1492)
	at j$.util.stream.SortedOps$SizedRefSortingSink.end(Unknown Source:7)
	at j$.util.stream.AbstractPipeline.copyInto(Unknown Source:25)
	at j$.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source:10)
	at j$.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source:4)
	at j$.util.stream.AbstractPipeline.evaluate(Unknown Source:34)
	at j$.util.stream.ReferencePipeline.collect(Unknown Source:61)
	at org.schabi.newpipe.util.ListHelper.getFilteredAudioStreams(ListHelper.java:324)
	at org.schabi.newpipe.player.resolver.VideoPlaybackResolver.resolve(VideoPlaybackResolver.java:81)
	at org.schabi.newpipe.player.Player.sourceOf(Player.java:1911)
	at org.schabi.newpipe.player.playback.MediaSourceManager.lambda$getLoadedMediaSource$6(MediaSourceManager.java:425)
	at org.schabi.newpipe.player.playback.MediaSourceManager.$r8$lambda$TrlxO9KUeHA8dnLgSgaWsUWa_Ko(MediaSourceManager.java:0)
	at org.schabi.newpipe.player.playback.MediaSourceManager$$ExternalSyntheticLambda4.apply(R8$$SyntheticClass:0)
	at io.reactivex.rxjava3.internal.operators.single.SingleMap$MapSingleObserver.onSuccess(SingleMap.java:58)
	... 22 more


Affected Android/Custom ROM version

Android 12 (LineageOS)

Affected device model

Moto Z3 Play

Additional information

No response

@skylarmt skylarmt added bug Issue is related to a bug needs triage Issue is not yet ready for PR authors to take up labels Mar 16, 2024
@skylarmt
Copy link
Author

Tried to play well over a dozen videos from my feed and from trending, they all worked. Just not Mr. Beast's most recent video. His older videos do play.

@AudricV AudricV removed the needs triage Issue is not yet ready for PR authors to take up label Mar 16, 2024
@AudricV AudricV changed the title Some videos won't play at all Crash when trying to play some streams (failure to sort streams) Mar 16, 2024
@BinTianqi
Copy link

Tried to play well over a dozen videos from my feed and from trending, they all worked. Just not Mr. Beast's most recent video. His older videos do play.

Me too. My error log is exactly the same as yours.

I tried the latest CI build , it still crash when I tried to play MrBeast's Lamborghini video.

@davotoula

This comment was marked as spam.

@FaqatZubair1

This comment was marked as spam.

@Stypox
Copy link
Member

Stypox commented Mar 27, 2024

Here is a fix, let me know if it works for you: #10909

@BinTianqi
Copy link

it works

Screenshot_20240328-215021_NewPipe fix-getAudioTrackType-null

@AudricV AudricV changed the title Crash when trying to play some streams (failure to sort streams) Crash when trying to play/download some streams (failure to sort streams) Mar 28, 2024
@AudricV AudricV added downloader Issue is related to the downloader player Issues related to any player (main, popup and background) labels Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug downloader Issue is related to the downloader player Issues related to any player (main, popup and background)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants