TeamNewPipe / NewPipe

A libre lightweight streaming front-end for Android.
https://newpipe.net
GNU General Public License v3.0
31.35k stars 3.05k forks source link

App crashes when scrolling playlist screen after watching video in fullscreen #9107

Closed Outlet2048 closed 2 years ago

Outlet2048 commented 2 years ago

Checklist

Affected version

0.24.0

Steps to reproduce the bug

  1. Open a playlist (I added a tab for all my playlist in the main page)
  2. scroll down until the title bar of playlist is no longer visible
  3. Watch video in landscape mode
  4. exit landscape mode watching
  5. minimize player
  6. There will now be a slightly transparent banner in the top of the playlist screen. (See Screenshot)
  7. Scroll up the playlist
  8. newpipe crashes

Note that this only seems to happen when the video was played in full screen landscape mode The issue does not occur when the playlists name + the play all buttons etc are still visible The crash can be prevented by exiting the playlist instead of scrolling (Transparent title bar no longer present upon entering playlist again) Same applies for entering the channel details page and then backing out into the playlist again (Seems like every change in what screen is displayed removes the transparent banner)

Expected behavior

The playlist view should scroll up

Actual behavior

app crashes

Screenshots/Screen recordings

IMG_20221011_133243

Logs

Exception

java.lang.IllegalStateException: ViewHolder views must not be attached when created. Ensure that you are not passing 'true' to the attachToRoot parameter of LayoutInflater.inflate(..., boolean attachToRoot)
    at androidx.recyclerview.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:7297)
    at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6416)
    at androidx.recyclerview.widget.GapWorker.prefetchPositionWithDeadline(GapWorker.java:288)
    at androidx.recyclerview.widget.GapWorker.flushTaskWithDeadline(GapWorker.java:345)
    at androidx.recyclerview.widget.GapWorker.flushTasksWithDeadline(GapWorker.java:361)
    at androidx.recyclerview.widget.GapWorker.prefetch(GapWorker.java:368)
    at androidx.recyclerview.widget.GapWorker.run(GapWorker.java:399)
    at android.os.Handler.handleCallback(Handler.java:938)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loopOnce(Looper.java:233)
    at android.os.Looper.loop(Looper.java:344)
    at android.app.ActivityThread.main(ActivityThread.java:8212)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1034)


Affected Android/Custom ROM version

Android 12 + OxygenOS12

Affected device model

OnePlus 9 Pro

Additional information

Animation speed is set to .5

Outlet2048 commented 2 years ago

Hi, could you please link the original issue as I wasn't able to find it when searching for "crash + Playlist"? Thanks

tsiflimagas commented 2 years ago

4475