maxrave-dev / SimpMusic

A simple music app using YouTube Music for backend
https://simpmusic.tech/
GNU General Public License v3.0
1.9k stars 114 forks source link

App crash when remove music in a playlist #542

Open gordaoescolas opened 1 week ago

gordaoescolas commented 1 week ago

Describe the bug The app unexpectedly closes when trying to remove any song from a local playlist.

To Reproduce Steps to reproduce the behavior:

  1. Go to any local playlist (imported from YouTube or not);
  2. Select any song;
  3. Select the option "Delete song from this playlist";
  4. See error

Log (Error Details)

Build version: 0.2.3-hotfix Current date: 2024-10-25 07:50:03 Device: Samsung SM-A245M OS version: Android 14 (SDK 34)

Stack trace:
java.lang.IndexOutOfBoundsException: Index 321 out of bounds for length 50 at jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64) at jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70) at jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266) at java.util.Objects.checkIndex(Objects.java:359) at java.util.ArrayList.remove(ArrayList.java:558) at u7.Z2.invokeSuspend(Unknown Source:173) at j9.a.resumeWith(Unknown Source:11) at Ta.l.resumeCancellableWith(Unknown Source:128) at Ua.a.startCoroutineCancellable(SourceFile:1) at Ua.a.startCoroutineCancellable$default(Unknown Source:5) at Na.U.invoke(Unknown Source:35) at Na.a.start(Unknown Source:0) at Na.i.launch(Unknown Source:22) at Na.g.launch(Unknown Source:0) at Na.i.launch$default(Unknown Source:12) at Na.g.launch$default(Unknown Source:0) at com.maxrave.simpmusic.viewModel.LocalPlaylistViewModel.deleteItem(Unknown Source:19) at T7.h.invoke(Unknown Source:67) at g7.n2.invoke(Unknown Source:16) at g7.S1.invoke(Unknown Source:11) at B.U.invoke-k-4lQ0M(Unknown Source:12) at B.U.invoke(Unknown Source:6) at C.H1.invokeSuspend(Unknown Source:159) at j9.a.resumeWith(Unknown Source:11) at Na.g0.resume(Unknown Source:89) at Na.g0.dispatch(Unknown Source:95) at Na.o.b(Unknown Source:13) at Na.o.g(Unknown Source:33) at Na.o.resumeWith(Unknown Source:7) at A0.k0.offerPointerEvent(Unknown Source:15) at A0.n0.b(Unknown Source:45) at A0.n0.onPointerEvent-H0pRuoY(Unknown Source:33) at B.g.onPointerEvent-H0pRuoY(Unknown Source:4) at B.d.onPointerEvent-H0pRuoY(Unknown Source:4) at A0.k.dispatchMainEventPass(Unknown Source:186) at A0.k.dispatchMainEventPass(Unknown Source:159) at A0.k.dispatchMainEventPass(Unknown Source:159) at A0.k.dispatchMainEventPass(Unknown Source:159) at A0.k.dispatchMainEventPass(Unknown Source:159) at A0.l.dispatchMainEventPass(Unknown Source:19) at A0.f.dispatchChanges(Unknown Source:20) at A0.K.process-BIzXfog(Unknown Source:157) at G0.S.m(Unknown Source:78) at G0.S.d(Unknown Source:219) at G0.S.dispatchTouchEvent(Unknown Source:75) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3328) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2998) at android.view.View.dispatchPointerEvent(View.java:16489) at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:8602) at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:8353) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7682) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:7739) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:7705) at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:7908) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:7713) at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:7965) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7686) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:7739) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:7705) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:7713) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7686) at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:11250) at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:11119) at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:11075) at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:11384) at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:337) at android.os.MessageQueue.nativePollOnce(Native Method) at android.os.MessageQueue.next(MessageQueue.java:335) at android.os.Looper.loopOnce(Looper.java:187) at android.os.Looper.loop(Looper.java:319) at android.app.ActivityThread.main(ActivityThread.java:8919) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:578) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103) Suppressed: Ta.j: [o1{Cancelling}@509efd5, Dispatchers.Main.immediate]

User actions: 2024-10-25 07:42:30: MainActivity created 2024-10-25 07:42:30: MainActivity resumed 2024-10-25 07:42:44: MainActivity paused 2024-10-25 07:43:00: MainActivity resumed 2024-10-25 07:43:06: MainActivity paused 2024-10-25 07:46:42: MainActivity resumed 2024-10-25 07:46:45: MainActivity paused 2024-10-25 07:48:29: MainActivity resumed 2024-10-25 07:48:36: MainActivity paused 2024-10-25 07:49:48: MainActivity resumed

gordaoescolas commented 1 week ago

Update: The bug was fixed by installing the Debug version.