fast4x / RiMusic

A multilingual Android application for streaming music from YouTube Music.
https://rimusic.xyz
GNU General Public License v3.0
2.26k stars 115 forks source link

App crashes a few seconds in to playing downloaded songs #2124

Closed trixter13 closed 2 months ago

trixter13 commented 4 months ago

Steps to reproduce the bug

  1. Have some downloaded songs
  2. Be offline and go to the downloaded songs list
  3. Play a song and at some point within 30 seconds, the app crashes for me

Expected behavior

App should not crash

Actual behavior

App crashes

Screenshots/Screen recordings

No response

Logs

Error log: type: crash osVersion: google/husky/husky:14/AP1A.240505.005/2024052100:user/release-keys package: it.fast4x.rimusic:36 process: it.fast4x.rimusic processUptime: 68439 + 356 ms installer: com.looker.droidify

java.lang.ClassCastException: z3.e cannot be cast to z3.r at g6.s.u2(SourceFile:95) at l6.d.s(SourceFile:11) at s6.a.m(SourceFile:9) at P6.w.v(SourceFile:7) at K6.a.m(SourceFile:23) at s6.a.m(SourceFile:32) at K6.I.run(SourceFile:95) at C0.j0.t0(SourceFile:7) at C0.i0.run(SourceFile:3) 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:8532) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552) at com.android.internal.os.ExecInit.main(ExecInit.java:50) at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method) at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:359) Suppressed: P6.h: [C0.P0@187ca6d, R.j@3cc96a2, u0{Cancelling}@74daf33, jj0@be752f0]

Full log file: RiMusic log ecf6e5d0cdf1.txt

RiMusic version

0.6.37

Android version

Android 14

Additional information

No crashing when using the app to stream music online, it only happens offline which is the only way I listen to music on my phone.

fast4x commented 4 months ago

Thanks for log i'll check it

fast4x commented 4 months ago

Try to set a background for player without cover...

trixter13 commented 4 months ago

Try to set a background for player without cover...

This has stopped the crashes! That makes sense, the cover photo will be just black whenever the crash is about to happen. It's odd though because the mini player will have the correct cover photo for the thumbnail so the cover is downloaded somewhere offline it seems. Maybe a bug because otherwise I'd say it'd be nice to have an option to download the cover for offline use as well but it seems that is already happening.

fast4x commented 4 months ago

Good, I'll check bug for cover in offline mode.

fast4x commented 4 months ago

Please in version 0.6.38, go to miscellaneous settings, enable debug, restart app, repeat crash action, after go again to settings, click on copy crash log and paste here

trixter13 commented 4 months ago

Please in version 0.6.38, go to miscellaneous settings, enable debug, restart app, repeat crash action, after go again to settings, click on copy crash log and paste here

I can't actually reproduce the issue in 0.6.38 - no more black song covers or crashing!

Only issue is that for some reason, now the theming of the music player doesn't work correctly when offline. I have my overall app theme set to Material You and player background set to "Fluid gradient background from cover" but the player just takes the same color from the Material You theme for every song when offline. I believe this worked on the last build, on the few songs that had a cover offline and didn't crash. Is there a technical limitation to this or would it be possible to have it added back? I love the gradient background matching the cover art and like I said, I mainly use the app while offline.

Thank you for the fix, amazing work! 💙

fast4x commented 4 months ago

Yes i can fix offline cover, i'm finding the problem.

Thanks for appreciation

fast4x commented 2 months ago

It seems to be fixed