toasterofbread / spmp

A YouTube Music client with a focus on customisation of colours and song metadata. Built with Compose Multiplatform for Android and desktop.
GNU General Public License v3.0
1.14k stars 44 forks source link

Error occurs when trying remove songs from playlists #359

Open looowizz opened 2 months ago

looowizz commented 2 months ago

Checklist

Steps to reproduce

  1. Add two of the same song to a playlist
  2. Switch to selection mode
  3. Select one of the song occurrences
  4. Press the 3 vertical dots and select "Remove from playlist"
  5. Error screen is shown

Expected behavior

Actual behavior

Screenshots / recordings

https://github.com/user-attachments/assets/5aa6d0bd-2efa-4e6e-999b-1c6e3797c832

Logs

---STACK TRACE--- java.lang.NullPointerException at com.toasterofbread.spmp.ui.layout.playlistpage.PlaylistAppPage$multiselect_context$1$1$1.invokeSuspend(PlaylistAppPage.kt:137) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:585) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:802) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:706) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:693) Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@58fd67b, Dispatchers.Default]

---LOGCAT (last 109 lines)--- 08-22 20:53:52.139 29487 29487 W SQLiteLog: (28) double-quoted string literal: "image_shadow_radius" 08-22 20:53:52.139 29487 29487 W SQLiteLog: (28) double-quoted string literal: "Song" 08-22 20:53:52.141 29487 29487 W SQLiteLog: (28) double-quoted string literal: "shuffle_playlist_id" 08-22 20:53:52.141 29487 29487 W SQLiteLog: (28) double-quoted string literal: "Artist" 08-22 20:53:52.143 29487 29487 W SQLiteLog: (28) double-quoted string literal: "background_wave_speed" 08-22 20:53:52.143 29487 29487 W SQLiteLog: (28) double-quoted string literal: "Song" 08-22 20:53:52.146 29487 29487 W SQLiteLog: (28) double-quoted string literal: "background_wave_opacity" 08-22 20:53:52.146 29487 29487 W SQLiteLog: (28) double-quoted string literal: "Song" 08-22 20:53:52.147 29487 29487 W SQLiteLog: (28) double-quoted string literal: "owned_by_user" 08-22 20:53:52.147 29487 29487 W SQLiteLog: (28) double-quoted string literal: "Playlist" 08-22 20:53:52.149 29487 29487 W SQLiteLog: (28) double-quoted string literal: "artists" 08-22 20:53:52.149 29487 29487 W SQLiteLog: (28) double-quoted string literal: "Playlist" 08-22 20:53:52.151 29487 29487 W SQLiteLog: (28) double-quoted string literal: "video_position" 08-22 20:53:52.151 29487 29487 W SQLiteLog: (28) double-quoted string literal: "Song" 08-22 20:53:52.152 29487 29487 W SQLiteLog: (28) double-quoted string literal: "landscape_queue_opacity" 08-22 20:53:52.152 29487 29487 W SQLiteLog: (28) double-quoted string literal: "Song" 08-22 20:53:52.154 29487 29487 W SQLiteLog: (28) double-quoted string literal: "artists" 08-22 20:53:52.154 29487 29487 W SQLiteLog: (28) double-quoted string literal: "Song" 08-22 20:53:52.307 29487 29487 I System.out: Loading resource file at values/strings.xml 08-22 20:53:52.518 29487 29487 I System.out: Loading resource file at values-en-GB/strings.xml 08-22 20:53:52.560 29487 29487 D CompatibilityChangeReporter: Compat change id reported: 237531167; UID 10186; state: DISABLED 08-22 20:53:52.571 29487 29581 W Parcel : Expecting binder but got null! 08-22 20:53:52.582 29487 29487 I Choreographer: Skipped 36 frames! The application may be doing too much work on its main thread. 08-22 20:53:52.813 29487 29566 I AdrenoGLES-0: QUALCOMM build : 4783c89, I46ff5fc46f 08-22 20:53:52.813 29487 29566 I AdrenoGLES-0: Build Date : 11/30/20 08-22 20:53:52.813 29487 29566 I AdrenoGLES-0: OpenGL ES Shader Compiler Version: EV031.31.04.01 08-22 20:53:52.813 29487 29566 I AdrenoGLES-0: Local Branch : QPR2 08-22 20:53:52.813 29487 29566 I AdrenoGLES-0: Remote Branch : 08-22 20:53:52.813 29487 29566 I AdrenoGLES-0: Remote Branch : 08-22 20:53:52.813 29487 29566 I AdrenoGLES-0: Reconstruct Branch : 08-22 20:53:52.813 29487 29566 I AdrenoGLES-0: Build Config : S P 10.0.4 AArch64 08-22 20:53:52.813 29487 29566 I AdrenoGLES-0: Driver Path : /vendor/lib64/egl/libGLESv2_adreno.so 08-22 20:53:52.835 29487 29566 I AdrenoGLES-0: PFP: 0x016dd093, ME: 0x00000000 08-22 20:53:52.846 29487 29566 W AdrenoUtils: : Failed to open /sys/class/kgsl/kgsl-3d0/gpu_model 08-22 20:53:52.846 29487 29566 W AdrenoUtils: : Failed to read chip ID from gpu_model. Fallback to use the GSL path 08-22 20:53:52.897 29487 29507 I HWUI : Davey! duration=915ms; Flags=1, FrameTimelineVsyncId=8724683, IntendedVsync=30576702504026, Vsync=30577304576918, InputEventId=0, HandleInputStart=30577315440254, AnimationStart=30577315446191, PerformTraversalsStart=30577315594785, DrawStart=30577599278355, FrameDeadline=30576723004026, FrameInterval=30577315087702, FrameStartTime=16724247, SyncQueued=30577599945438, SyncStart=30577600016793, IssueDrawCommandsStart=30577600071480, SwapBuffers=30577615982627, FrameCompleted=30577618082524, DequeueBufferDuration=14176043, QueueBufferDuration=402240, GpuCompleted=30577618082524, SwapBuffersCompleted=30577617118617, DisplayPresentTime=0, CommandSubmissionCompleted=30577615982627, 08-22 20:53:53.001 29487 29487 W System.err: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". 08-22 20:53:53.001 29487 29487 W System.err: SLF4J: Defaulting to no-operation (NOP) logger implementation 08-22 20:53:53.001 29487 29487 W System.err: SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. 08-22 20:53:53.059 29487 29487 W read.spmp.debug: Method java.lang.Object androidx.compose.runtime.snapshots.SnapshotStateMap.mutate(kotlin.jvm.functions.Function1) failed lock verification and will run slower. 08-22 20:53:53.059 29487 29487 W read.spmp.debug: Method void androidx.compose.runtime.snapshots.SnapshotStateMap.update(kotlin.jvm.functions.Function1) failed lock verification and will run slower. 08-22 20:53:53.059 29487 29487 W read.spmp.debug: Method boolean androidx.compose.runtime.snapshots.SnapshotStateMap.removeIf$runtime_release(kotlin.jvm.functions.Function1) failed lock verification and will run slower. 08-22 20:53:53.363 29487 29487 D CompatibilityChangeReporter: Compat change id reported: 171228096; UID 10186; state: ENABLED 08-22 20:53:53.808 29487 29602 D TrafficStats: tagSocket(107) with statsTag=0xffffffff, statsUid=-1 08-22 20:53:53.850 29487 29507 I HWUI : Davey! duration=1192ms; Flags=0, FrameTimelineVsyncId=8724725, IntendedVsync=30577370750998, Vsync=30577804084314, InputEventId=0, HandleInputStart=30577807573376, AnimationStart=30577807578897, PerformTraversalsStart=30578059512776, DrawStart=30578318564625, FrameDeadline=30577642837611, FrameInterval=30577807300251, FrameStartTime=16666666, SyncQueued=30578344684575, SyncStart=30578344719835, IssueDrawCommandsStart=30578344792023, SwapBuffers=30578559279492, FrameCompleted=30578563071420, DequeueBufferDuration=13906, QueueBufferDuration=216354, GpuCompleted=30578563071420, SwapBuffersCompleted=30578559870378, DisplayPresentTime=0, CommandSubmissionCompleted=30578559279492, 08-22 20:53:56.296 29487 29602 D TrafficStats: tagSocket(95) with statsTag=0xffffffff, statsUid=-1 08-22 20:53:56.916 29487 29487 D CompatibilityChangeReporter: Compat change id reported: 289878283; UID 10186; state: ENABLED 08-22 20:53:58.298 29487 29506 I HWUI : Davey! duration=919ms; Flags=0, FrameTimelineVsyncId=8726577, IntendedVsync=30582102579775, Vsync=30582102579775, InputEventId=0, HandleInputStart=30582103772606, AnimationStart=30582103775731, PerformTraversalsStart=30582127336723, DrawStart=30582127497764, FrameDeadline=30582156775726, FrameInterval=30582103741460, FrameStartTime=16715850, SyncQueued=30583005293841, SyncStart=30583005773685, IssueDrawCommandsStart=30583006299831, SwapBuffers=30583012667280, FrameCompleted=30583022626708, DequeueBufferDuration=24636, QueueBufferDuration=330364, GpuCompleted=30583022626708, SwapBuffersCompleted=30583013646967, DisplayPresentTime=30579642225486, CommandSubmissionCompleted=30583012667280, 08-22 20:53:58.359 29487 29487 I Choreographer: Skipped 58 frames! The application may be doing too much work on its main thread. 08-22 20:53:58.379 29487 29653 D TrafficStats: tagSocket(107) with statsTag=0xffffffff, statsUid=-1 08-22 20:53:58.396 29487 29659 D TrafficStats: tagSocket(136) with statsTag=0xffffffff, statsUid=-1 08-22 20:53:58.398 29487 29644 D TrafficStats: tagSocket(139) with statsTag=0xffffffff, statsUid=-1 08-22 20:53:58.410 29487 29655 D TrafficStats: tagSocket(149) with statsTag=0xffffffff, statsUid=-1 08-22 20:53:58.453 29487 29694 D ProfileInstaller: Installing profile for com.toasterofbread.spmp.debug 08-22 20:53:58.496 29487 29506 I HWUI : Davey! duration=1090ms; Flags=0, FrameTimelineVsyncId=8726585, IntendedVsync=30582119284429, Vsync=30583088789055, InputEventId=0, HandleInputStart=30583092495048, AnimationStart=30583092499788, PerformTraversalsStart=30583172040368, DrawStart=30583172190316, FrameDeadline=30583059167375, FrameInterval=30583091993850, FrameStartTime=16715597, SyncQueued=30583179976932, SyncStart=30583180404536, IssueDrawCommandsStart=30583180599744, SwapBuffers=30583201301934, FrameCompleted=30583210189331, DequeueBufferDuration=14687, QueueBufferDuration=213958, GpuCompleted=30583210189331, SwapBuffersCompleted=30583201768132, DisplayPresentTime=30579659050591, CommandSubmissionCompleted=30583201301934, 08-22 20:53:58.533 29487 29650 D TrafficStats: tagSocket(106) with statsTag=0xffffffff, statsUid=-1 08-22 20:53:58.534 29487 29656 D TrafficStats: tagSocket(143) with statsTag=0xffffffff, statsUid=-1 08-22 20:53:58.534 29487 29651 D TrafficStats: tagSocket(151) with statsTag=0xffffffff, statsUid=-1 08-22 20:53:58.535 29487 29645 D TrafficStats: tagSocket(109) with statsTag=0xffffffff, statsUid=-1 08-22 20:53:58.535 29487 29637 D TrafficStats: tagSocket(155) with statsTag=0xffffffff, statsUid=-1 08-22 20:53:58.535 29487 29652 D TrafficStats: tagSocket(148) with statsTag=0xffffffff, statsUid=-1 08-22 20:53:58.539 29487 29654 D TrafficStats: tagSocket(122) with statsTag=0xffffffff, statsUid=-1 08-22 20:53:58.559 29487 29643 D TrafficStats: tagSocket(134) with statsTag=0xffffffff, statsUid=-1 08-22 20:53:58.631 29487 29646 D TrafficStats: tagSocket(95) with statsTag=0xffffffff, statsUid=-1 08-22 20:53:58.634 29487 29601 D TrafficStats: tagSocket(135) with statsTag=0xffffffff, statsUid=-1 08-22 20:53:58.640 29487 29600 D TrafficStats: tagSocket(147) with statsTag=0xffffffff, statsUid=-1 08-22 20:53:58.645 29487 29638 D TrafficStats: tagSocket(142) with statsTag=0xffffffff, statsUid=-1 08-22 20:53:58.646 29487 29642 D TrafficStats: tagSocket(138) with statsTag=0xffffffff, statsUid=-1 08-22 20:53:58.648 29487 29636 D TrafficStats: tagSocket(140) with statsTag=0xffffffff, statsUid=-1 08-22 20:53:58.653 29487 29634 D TrafficStats: tagSocket(137) with statsTag=0xffffffff, statsUid=-1 08-22 20:53:58.665 29487 29647 D TrafficStats: tagSocket(141) with statsTag=0xffffffff, statsUid=-1 08-22 20:54:00.606 29487 29654 D TrafficStats: tagSocket(109) with statsTag=0xffffffff, statsUid=-1 08-22 20:54:00.638 29487 29651 D TrafficStats: tagSocket(95) with statsTag=0xffffffff, statsUid=-1 08-22 20:54:01.259 29487 29501 I read.spmp.debug: Background concurrent copying GC freed 34MB AllocSpace bytes, 283(10MB) LOS objects, 75% free, 15MB/63MB, paused 779us,203us total 451.789ms 08-22 20:54:03.552 29487 29635 D TrafficStats: tagSocket(119) with statsTag=0xffffffff, statsUid=-1 08-22 20:54:04.062 29487 29651 D TrafficStats: tagSocket(128) with statsTag=0xffffffff, statsUid=-1 08-22 20:54:04.070 29487 29653 D TrafficStats: tagSocket(141) with statsTag=0xffffffff, statsUid=-1 08-22 20:54:06.135 29487 29697 D TrafficStats: tagSocket(115) with statsTag=0xffffffff, statsUid=-1 08-22 20:54:06.427 29487 29487 D CompatibilityChangeReporter: Compat change id reported: 147798919; UID 10186; state: ENABLED 08-22 20:54:10.172 29487 29487 W WindowOnBackDispatcher: sendCancelIfRunning: isInProgress=falsecallback=androidx.activity.OnBackPressedDispatcher$Api34Impl$createOnBackAnimationCallback$1@c07eb00 08-22 20:54:12.094 29487 29646 D TrafficStats: tagSocket(106) with statsTag=0xffffffff, statsUid=-1 08-22 20:54:13.387 29487 29699 D TrafficStats: tagSocket(106) with statsTag=0xffffffff, statsUid=-1 08-22 20:54:15.225 29487 29487 W WindowOnBackDispatcher: sendCancelIfRunning: isInProgress=falsecallback=androidx.activity.OnBackPressedDispatcher$Api34Impl$createOnBackAnimationCallback$1@c07eb00 08-22 20:54:18.283 29487 29712 I HWUI : Davey! duration=735ms; Flags=0, FrameTimelineVsyncId=8736932, IntendedVsync=30602270571607, Vsync=30602270571607, InputEventId=402741118, HandleInputStart=30602276557949, AnimationStart=30602276595397, PerformTraversalsStart=30602525056619, DrawStart=30602525190578, FrameDeadline=30602307877841, FrameInterval=30602276532532, FrameStartTime=16724544, SyncQueued=30602936698327, SyncStart=30602936883900, IssueDrawCommandsStart=30602937666608, SwapBuffers=30603001342656, FrameCompleted=30603006620469, DequeueBufferDuration=23698, QueueBufferDuration=260313, GpuCompleted=30603006620469, SwapBuffersCompleted=30603001962865, DisplayPresentTime=30600293975772, CommandSubmissionCompleted=30603001342656, 08-22 20:54:18.439 29487 29501 I read.spmp.debug: Background young concurrent copying GC freed 28MB AllocSpace bytes, 229(12MB) LOS objects, 65% free, 22MB/63MB, paused 527us,608us total 103.839ms 08-22 20:54:18.905 29487 29487 I Choreographer: Skipped 36 frames! The application may be doing too much work on its main thread. 08-22 20:54:23.740 29487 29487 W SQLiteLog: (28) double-quoted string literal: "version" 08-22 20:54:23.740 29487 29487 W SQLiteLog: (28) double-quoted string literal: "Version" 08-22 20:54:23.742 29487 29487 I System.out: Database is already up to date (version 6) 08-22 20:54:23.856 29487 29487 W read.spmp.debug: Accessing hidden method Landroid/media/AudioTrack;->getLatency()I (unsupported, reflection, allowed) 08-22 20:54:23.892 29487 29487 I ExoPlayerImpl: Init f5fd79c [AndroidXMedia3/1.2.0] [bramble, Pixel 4a (5G), Google, 34] 08-22 20:54:24.028 29487 29487 D CompatibilityChangeReporter: Compat change id reported: 160794467; UID 10186; state: ENABLED 08-22 20:54:24.155 29487 29654 I SpMp : loadPersistentQueue: No file found 08-22 20:54:29.538 29487 29581 W Parcel : Expecting binder but got null! 08-22 20:54:30.388 29487 29706 W System.err: java.lang.NullPointerException 08-22 20:54:30.389 29487 29706 W System.err: at com.toasterofbread.spmp.ui.layout.playlistpage.PlaylistAppPage$multiselect_context$1$1$1.invokeSuspend(PlaylistAppPage.kt:137) 08-22 20:54:30.389 29487 29706 W System.err: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) 08-22 20:54:30.389 29487 29706 W System.err: at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104) 08-22 20:54:30.389 29487 29706 W System.err: at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:585) 08-22 20:54:30.389 29487 29706 W System.err: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:802) 08-22 20:54:30.389 29487 29706 W System.err: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:706) 08-22 20:54:30.389 29487 29706 W System.err: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:693) 08-22 20:54:30.389 29487 29706 W System.err: Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@58fd67b, Dispatchers.Default] 08-22 20:54:30.457 29487 29487 W SQLiteLog: (28) double-quoted string literal: "version" 08-22 20:54:30.457 29487 29487 W SQLiteLog: (28) double-quoted string literal: "Version" 08-22 20:54:30.458 29487 29487 I System.out: Database is already up to date (version 6) 08-22 20:54:30.459 29487 29706 I System.out: Retrieving logcat output... 08-22 20:54:30.474 29487 29580 W Parcel : Expecting binder but got null! 08-22 20:54:30.499 29743 29743 W libc : Access denied finding property "ro.debuggable"

SpMp version

0.4.0

SpMp platform

Android

OS version

Android 14, GrapheneOS

Additional information

No response

looowizz commented 2 months ago

Oh this error seems to be for removing any songs from the playlist, somehow didnt realise lol. This is the log for removing a single song :) https://paste.ee/p/nPSJ6 Thanks!