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

Back button in playlist while playing in foreground (maybe also background) kills app, reopening results in crash #10339

Closed
6 tasks done
janicez opened this issue Aug 14, 2023 · 2 comments · Fixed by #10577
Closed
6 tasks done

Comments

@janicez
Copy link

janicez commented Aug 14, 2023

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.25.2, from https://archive.newpipe.net/fdroid/repo?fingerprint=e2402c78f9b97c6c89e97db914a2751fda1d02fe2039cc0897a462bdb57e7501

Steps to reproduce the bug

Here's what I did. It may not reproduce.

  1. Queue up a big playlist in the background. I don't know if you also need to swipe the app off the switcher while it is playing.
  2. Bring a video foreground.
  3. Swipe it down to a small player, then open the playlist using the playlist icon there.
  4. Rearrange the playlist a bit. (Probably not essential)
  5. Press the back button. Pathologically, the app should close, ending playback and rubbishing your playlist, without a Guru Meditation. (Expected/Actual point 1)
  6. Reopen the app from the app switcher.
  7. This action should obtain a Guru Meditation (Expected/Actual point 2), which is probably a red herring.

Expected behavior

  1. I expected the back button to go back to the player without incident, or when backgrounded and swiped off, to go to desktop while continuing to play.
  2. A Guru Meditation would not be produced if so.

Actual behavior

  1. The app closed, ending playback and rubbishing my playlist, without a guru meditation.
  2. On reopening NewPipe, I got the attached red-herring Guru Meditation.

Screenshots/Screen recordings

No response

Logs

I hit the back button in the playlist display, and it killed my viewing session. I then opened Newpipe back up in the app switcher and got this crash.

Exception

  • User Action: ui error
  • Request: ACRA report
  • Content Country: FR
  • Content Language: fr-FR
  • App Language: fr_FR
  • Service: none
  • Version: 0.25.2
  • OS: Linux Android 11 - 30
Crash log

java.lang.NullPointerException: Attempt to invoke virtual method 'org.schabi.newpipe.player.mediaitem.MediaItemTag org.schabi.newpipe.player.Player.getCurrentMetadata()' on a null object reference
	at org.schabi.newpipe.player.PlayQueueActivity.buildAudioTrackMenu(PlayQueueActivity.java:622)
	at org.schabi.newpipe.player.PlayQueueActivity.onCreateOptionsMenu(PlayQueueActivity.java:108)
	at android.app.Activity.onCreatePanelMenu(Activity.java:4206)
	at androidx.activity.ComponentActivity.onCreatePanelMenu(ComponentActivity.java:506)
	at androidx.fragment.app.FragmentActivity.onCreatePanelMenu(FragmentActivity.java:263)
	at androidx.appcompat.view.WindowCallbackWrapper.onCreatePanelMenu(WindowCallbackWrapper.java:95)
	at androidx.appcompat.app.AppCompatDelegateImpl$AppCompatWindowCallback.onCreatePanelMenu(AppCompatDelegateImpl.java:3122)
	at androidx.appcompat.app.ToolbarActionBar.populateOptionsMenu(ToolbarActionBar.java:458)
	at androidx.appcompat.app.ToolbarActionBar$1.run(ToolbarActionBar.java:58)
	at android.os.Handler.handleCallback(Handler.java:938)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:223)
	at android.app.ActivityThread.main(ActivityThread.java:7660)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)


Affected Android/Custom ROM version

Android 11, LineageOS (unknown but I think 17)

Affected device model

OnePlus 7 Pro (GM1915)

Additional information

As a workaround, it could be interesting to add a function that autosaves the playing playlist, and restores it on start if it isn't empty or played-through. Somehow I suspect that'd be non-trivial however.

@janicez janicez added bug Issue is related to a bug needs triage Issue is not yet ready for PR authors to take up labels Aug 14, 2023
@opusforlife2
Copy link
Collaborator

What you're referring to is the queue, not a playlist.

It may not reproduce.

It didn't. And even from just reading your steps, I could tell that everything should work.

There is no option but to try to reproduce this. Let's see if you get lucky there.

@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 Aug 15, 2023
@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.

@opusforlife2 opusforlife2 removed bug Issue is related to a bug waiting for author If the author doesn't respond, the issue will be auto-closed. Otherwise the label will be removed. needs triage Issue is not yet ready for PR authors to take up labels Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants