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 after adding item to a playlist #11573

Closed
6 tasks done
86ul opened this issue Sep 29, 2024 · 12 comments · Fixed by #11651
Closed
6 tasks done

Crash after adding item to a playlist #11573

86ul opened this issue Sep 29, 2024 · 12 comments · Fixed by #11651
Labels
bug Issue is related to a bug playlist Anything to do with playlists in the app

Comments

@86ul
Copy link

86ul commented Sep 29, 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.27.2

Steps to reproduce the bug

  1. Refresh the What's new page
  2. Adding several items to a Playlist...*
  3. ... until NewPipe crashes

*I have over 50 playlists, and the playlist I am adding to is just a playlist of items that I would like to watch. When I have watched it, I just delete that item from this playlist.

Expected behavior

  1. Refresh the What's new page
  2. Adding several items to a Playlist...*
  3. Continue to add items to a playlist, without crashing.

Actual behavior

  1. Refresh the What's new page
  2. Adding several items to a Playlist...*
  3. ... until NewPipe crashes

Screenshots/Screen recordings

No response

Logs

Exception

  • User Action: ui error
  • Request: ACRA report
  • Content Country: BE
  • Content Language: en-BE
  • App Language: en_BE
  • Service: none
  • Version: 0.27.2
  • OS: Linux Android 14 - 34
Crash log

java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
	at org.schabi.newpipe.local.dialog.PlaylistAppendDialog.lambda$onPlaylistSelected$4(PlaylistAppendDialog.java:163)
	at org.schabi.newpipe.local.dialog.PlaylistAppendDialog.$r8$lambda$zTWALft3TUabC8jelCR2F7daRCg(PlaylistAppendDialog.java:0)
	at org.schabi.newpipe.local.dialog.PlaylistAppendDialog$$ExternalSyntheticLambda4.accept(R8$$SyntheticClass:0)
	at io.reactivex.rxjava3.internal.operators.maybe.MaybeCallbackObserver.onSuccess(MaybeCallbackObserver.java:71)
	at io.reactivex.rxjava3.internal.operators.maybe.MaybeObserveOn$ObserveOnMaybeObserver.run(MaybeObserveOn.java:103)
	at io.reactivex.rxjava3.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:123)
	at android.os.Handler.handleCallback(Handler.java:959)
	at android.os.Handler.dispatchMessage(Handler.java:100)
	at android.os.Looper.loopOnce(Looper.java:232)
	at android.os.Looper.loop(Looper.java:317)
	at android.app.ActivityThread.main(ActivityThread.java:8592)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)


Affected Android/Custom ROM version

LineageOS 21 21-20240925-NIGHTLY-FP3

Affected device model

FairPhone 3

Additional information

No response

@86ul 86ul added bug Issue is related to a bug needs triage Issue is not yet ready for PR authors to take up labels Sep 29, 2024
@86ul
Copy link
Author

86ul commented Sep 29, 2024

Hum, when I click on Show Channel Details, those pages load slower than usual. Related?

@86ul
Copy link
Author

86ul commented Sep 29, 2024

An update on the crashes themselfs: most of the time NewPipe crashes after adding one or two items successfully from What's New to a playlist, or adding an item while playing. I had once a crash after three items successfully, but my max so far is adding six items successfully to the very same playlist. The log of that crash after those six items is the following:

Exception

  • User Action: ui error
  • Request: ACRA report
  • Content Country: BE
  • Content Language: en-BE
  • App Language: en_BE
  • Service: none
  • Version: 0.27.2
  • OS: Linux Android 14 - 34
Crash log

java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
	at org.schabi.newpipe.local.dialog.PlaylistAppendDialog.lambda$onPlaylistSelected$4(PlaylistAppendDialog.java:163)
	at org.schabi.newpipe.local.dialog.PlaylistAppendDialog.$r8$lambda$zTWALft3TUabC8jelCR2F7daRCg(PlaylistAppendDialog.java:0)
	at org.schabi.newpipe.local.dialog.PlaylistAppendDialog$$ExternalSyntheticLambda4.accept(R8$$SyntheticClass:0)
	at io.reactivex.rxjava3.internal.operators.maybe.MaybeCallbackObserver.onSuccess(MaybeCallbackObserver.java:71)
	at io.reactivex.rxjava3.internal.operators.maybe.MaybeObserveOn$ObserveOnMaybeObserver.run(MaybeObserveOn.java:103)
	at io.reactivex.rxjava3.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:123)
	at android.os.Handler.handleCallback(Handler.java:959)
	at android.os.Handler.dispatchMessage(Handler.java:100)
	at android.os.Looper.loopOnce(Looper.java:232)
	at android.os.Looper.loop(Looper.java:317)
	at android.app.ActivityThread.main(ActivityThread.java:8592)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)


@opusforlife2
Copy link
Collaborator

Does it happen with all playlists or only your Watch Later playlist?

@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 Oct 3, 2024
@u7656655
Copy link
Contributor

I can try fixing this

@opusforlife2
Copy link
Collaborator

@u7656655 Have you figured out what the bug is, here?

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.

@u7656655
Copy link
Contributor

u7656655 commented Oct 19, 2024

@opusforlife2 Based on the error log, I believe it is caused by line 163 in PlaylistAppendDialog.

if (playlist.thumbnailUrl.equals(PlaylistEntity.DEFAULT_THUMBNAIL)) {

playlist.thumbnailUrl is possibly set to null, causing the null pointer exception. It is possible that this is caused by a slow internet connection leading to a failure to retrieve the thumbnail url, though I am not certain. It seems plausible given that @86ul stated that some pages were loading quite slowly for him. And one of the key steps to reproducing the issue was first refreshing the page. However I have not been able to reproduce this myself.

In any case, I believe adding a simple not null check should fix this. At the very least, adding such a check should be harmless. If you think I should make this change, feel free to reopen the issue and I'll make a PR.

@opusforlife2
Copy link
Collaborator

At the very least, adding such a check should be harmless.

If that's the case, then I think a PR would be fine. Are you sure we don't need @86ul to help test?

@u7656655
Copy link
Contributor

At the very least, adding such a check should be harmless.

If that's the case, then I think a PR would be fine. Are you sure we don't need @86ul to help test?

It would certainly be convenient to have him help test, especially if he can still reliably reproduce the bug. In any case, I will get that PR done at some point today.

@86ul
Copy link
Author

86ul commented Oct 22, 2024

Whoops, due to personal issues, I forgot to reply to this thread, sorry.

Somehow, but I do not know why, NewPipe no longer crashes while adding to a playlist on the very same version 0.27.2. Nothing (much?) else is changed on my FP3.

Either way, here are my replies:

@opusforlife2 :

Does it happen with all playlists or only your Watch Later playlist?

It happened with the two playlists that I used for to watch later, but it does no longer crash.

@u7656655 :

It is possible that this is caused by a slow internet connection leading to a failure to retrieve the thumbnail url, though I am not certain. It seems plausible given that @86ul stated that some pages were loading quite slowly for him. And one of the key steps to reproducing the issue was first refreshing the page. However I have not been able to reproduce this myself.

Although I also mentioned the slow loading of a channel, I do not know it that is/was related to NewPipe crashing. I started to use a VPN provider, which slows the connection a bit, but both music, and videos loads normal (enough), that I do not experience a buffer moment. As in, that the music/video player (Spotify, NewPipe, etc) does not pause to load/buffer the next few minutes.

Again, I do not know why, but NewPipe 0.27.2 does not crash anymore. I did not change anything (much?) on my FP3, fingered crossed. What I have 'changed' is updating other apps, and the preferred VPN server; without changing the VPN provider though...

Either way, I am just an user with some experience in wearing a blue hat, but I am not a ITer myself.

@github-actions github-actions bot 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 22, 2024
@github-actions github-actions bot reopened this Oct 22, 2024
@u7656655
Copy link
Contributor

@86ul

Although I also mentioned the slow loading of a channel, I do not know it that is/was related to NewPipe crashing. I started to use a VPN provider, which slows the connection a bit, but both music, and videos loads normal (enough), that I do not experience a buffer moment. As in, that the music/video player (Spotify, NewPipe, etc) does not pause to load/buffer the next few minutes.

Again, I do not know why, but NewPipe 0.27.2 does not crash anymore. I did not change anything (much?) on my FP3, fingered crossed. What I have 'changed' is updating other apps, and the preferred VPN server; without changing the VPN provider though...

Interesting. Perhaps your VPN server was causing some issues. It's difficult to confirm whether it was or wasn't your internet connection, but it seems adding a not null check as I proposed would still prevent similar crashes in the future.

@ShareASmile ShareASmile added playlist Anything to do with playlists in the app and removed needs triage Issue is not yet ready for PR authors to take up labels Oct 25, 2024
@86ul
Copy link
Author

86ul commented Nov 15, 2024

@u7656655
Interesting. Perhaps your VPN server was causing some issues. It's difficult to confirm whether it was or wasn't your internet connection, but it seems adding a not null check as I proposed would still prevent similar crashes in the future.

Hum, I had my notifications set wrongly on my phone and/or github app, thus yet another late reply:

I already saw that this issue is taken up and dealt with in the upcoming version of NewPipe. Thus I merely would like to reply to your (implied?) question about the VPN: I started to use it late August 2024, just before YouTube started to 'misbehave', and NewPipe had to be updated up to 0.27.2. Then this issue itself started to occure, but persisted up into October, and did not came back, so far... Besides updating both LOS21, and other apps (and removing the Signal-fork Molly [related?]), I did nothing else than using this phone as my daily phone.

Thus maybe some (underlying) lib's or something else was causing this issue. 'Even' reorganising my own playlists did not trigger this issue.

Either way, thanks again for this app, and following up support.

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 playlist Anything to do with playlists in the app
Projects
None yet
4 participants