fast4x / RiMusic

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

Crash while playing offline #1937

Open cMattw opened 4 months ago

cMattw commented 4 months ago

Steps to reproduce the bug

  1. Turn off wifi or mobile data
  2. Play a downloaded song

Expected behavior

It should be able to play downloaded songs even if there is no internet connection

Actual behavior

The app crashes when playing downloaded songs while offline

Screenshots/Screen recordings

https://github.com/fast4x/RiMusic/assets/160244930/ca26a585-31b9-44cd-b6d3-e1af5c34b592

Logs

Process: it.fast4x.rimusic PID: 15632 UID: 10282 Frozen: false Flags: 0x30c8be44 Package: it.fast4x.rimusic v33 (0.6.35) Foreground: Yes Process-Runtime: 3941 Build: Nothing/Pacman/Pacman:14/UP1A.231005.007/2404192235:user/release-keys Crash-Handler: com.android.internal.os.RuntimeInit$KillApplicationHandler Loading-Progress: 1.0 Dropped-Count: 0

java.lang.ClassCastException: b3.d cannot be cast to b3.p at C0.l.n1(SourceFile:95) at H5.h.v(SourceFile:11) at O5.a.l(SourceFile:9) at k6.w.v(SourceFile:7) at f6.a.l(SourceFile:23) at O5.a.l(SourceFile:32) at f6.I.run(SourceFile:95) at androidx.compose.ui.platform.d0.t0(SourceFile:7) at androidx.compose.ui.platform.c0.doFrame(SourceFile:10) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1521) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1532) at android.view.Choreographer.doCallbacks(Choreographer.java:1095) at android.view.Choreographer.doFrame(Choreographer.java:985) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1499) at android.os.Handler.handleCallback(Handler.java:958) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:232) at android.os.Looper.loop(Looper.java:334) at android.app.ActivityThread.main(ActivityThread.java:8293) 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:1053) Suppressed: k6.h: [androidx.compose.ui.platform.D0@8a31af0, J.g@547c869, u0{Cancelling}@8d682ee, d0@14e738f]

RiMusic version

0.6.35

Android version

Android 14

Additional information

No response

kris20030705 commented 4 months ago

Same🥲

fast4x commented 4 months ago

Maybe is relate to background in player, not use background from cover options without connection, actually is a bug.

cMattw commented 4 months ago

Maybe is relate to background in player, not use background from cover options without connection, actually is a bug.

I just checked, it's actually because of that. When I use the background from theme, it works fine. But not in the background from cover

aneesh1122 commented 4 months ago

Maybe is relate to background in player, not use background from cover options without connection, actually is a bug.

I just checked, it's actually because of that. When I use the background from theme, it works fine. But not in the background from cover

use blur cover background. It's the best right now imo and won't crash when you're offline

fast4x commented 4 months ago

I'll fix it later when new player improvements will be do.

fast4x commented 4 months ago

Improved image caching, available from version 0.6.37

fast4x commented 3 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

cMattw commented 3 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 get the crash log, it doesn't crash anymore. So I guess it's fixed?

fast4x commented 3 months ago

Download custom version and try again please.

cMattw commented 3 months ago

Download custom version and try again please.

I cannot replicate the bug anymore, even in the custom version. And I noticed that it just shows the RiMusic logo in offline mode even if the cover image is cached, but the fluid background still uses the colors from the cover. Screenshot_2024-06-08-21-41-28-433_it.fast4x.rimusic.jpg

Maybe someone else could try replicating.

fast4x commented 3 months ago

Interesting, I'll check better for cache.

kris20030705 commented 3 months ago

Download custom version and try again please.

I cannot replicate the bug anymore, even in the custom version. And I noticed that it just shows the RiMusic logo in offline mode even if the cover image is cached, but the fluid background still uses the colors from the cover. Screenshot_2024-06-08-21-41-28-433_it.fast4x.rimusic.jpg

Maybe someone else could try replicating.

Image caches erasing was always the problem. I played all music one by one just to download their album art but after sometimes or rebooting phone..i faced album art missing..!

And one this if your one song doesn't have ablum art downloaded it will affect others music album art too.. To fix, Just Minimize and open like this..

https://github.com/fast4x/RiMusic/assets/107674915/bb4b4c7b-e890-4955-b5f7-00a9c8da03c9