Open SoMir0 opened 1 year ago
Could you paste the logcat here?
Tutorial: https://riptutorial.com/adb/example/14878/displaying-and-filtering-with-logcat
Command: adb logcat it.vfsfitvnm.vimusic:*
I don't think this is right - it keeps printing stuff, I can't even scroll all the way up
Would you try this one instead?
adb shell "logcat | grep it.vfsfitvnm.vimusic"
Now it doesn't show anything. Just to be clear, the app doesn't crash anymore, it crashed once and now all the music is gone, but it says the cache is still there.
I had the same issue as @SoMir0. Here's the crash report from logcat, you can use Logcat Reader (https://play.google.com/store/apps/details?id=com.dp.logcatapp&hl=en_US&gl=US) to read it.
ViMusic v0.5.4 Device: Xiaomi M2006C3LG, Brand:Redmi Android Target: 10.0 (SDK 29 Q) Display: 720x1448 - xhdpi CPU ABI: armeabi-v7a, armeabi
@8itlew7r Thanks, that's helpful. There are three crashes, actually. I think the one which caused the database to be erased is the following:
java.lang.IllegalStateException: Cannot perform this operation because there is no current transaction.
at android.database.sqlite.SQLiteSession.throwIfNoTransaction(SQLiteSession.java:917)
at android.database.sqlite.SQLiteSession.endTransaction(SQLiteSession.java:400)
at android.database.sqlite.SQLiteDatabase.endTransaction(SQLiteDatabase.java:585)
at androidx.sqlite.db.framework.FrameworkSQLiteDatabase.endTransaction(FrameworkSQLiteDatabase.java:2)
at androidx.room.RoomDatabase.j(RoomDatabase.java:9)
at androidx.room.RoomDatabase.endTransaction(RoomDatabase.java:0)
at it.vfsfitvnm.vimusic.Database_Impl.insert(Database_Impl.java:0)
at it.vfsfitvnm.vimusic.Database$Companion.insert(Database.java:12)
at it.vfsfitvnm.vimusic.Database$DefaultImpls.insert$default(Database.java:0)
at it.vfsfitvnm.vimusic.service.PlayerService$createDataSourceFactory$1$urlResult$2$1$3.invoke(PlayerService.java:0)
at it.vfsfitvnm.vimusic.service.PlayerService$createDataSourceFactory$1$urlResult$2$1$3.invoke(PlayerService.java:0)
at it.vfsfitvnm.vimusic.DatabaseKt.query$lambda$0(Database.kt:0)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)
The others are:
java.lang.SecurityException: Caller it.vfsfitvnm.vimusic:1411374 cannot post for pkg it.vfsfitvnm.vimusic in user 14
at android.os.Parcel.createException(Parcel.java:2074) at android.os.Parcel.readException(Parcel.java:2042)
at android.os.Parcel.readException(Parcel.java:1990)
at android.app.INotificationManager$Stub$Proxy.enqueueNotificationWithTag(INotificationManager.java:2776)
at android.app.NotificationManager.notifyAsUser(NotificationManager.java:497)
at android.app.NotificationManager.notify(NotificationManager.java:447)
at android.app.NotificationManager.notify(NotificationManager.java:423)
at it.vfsfitvnm.vimusic.service.PlayerService.onEvents(PlayerService.java:0)
at androidx.media3.exoplayer.ExoPlayerImpl.lambda$new$0(ExoPlayerImpl.java:0)
at androidx.media3.common.util.ListenerSet$ListenerHolder.iterationFinished(ListenerSet.java:0)
at androidx.media3.common.util.ListenerSet.handleMessage(ListenerSet.java:0)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:225)
at android.app.ActivityThread.main(ActivityThread.java:7563)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:994)
Caused by: android.os.RemoteException: Remote stack trace:
at com.android.server.notification.NotificationManagerService.resolveNotificationUid(NotificationManagerService.java:5088)
at com.android.server.notification.NotificationManagerService.enqueueNotificationInternal(NotificationManagerService.java:4778)
at com.android.server.notification.NotificationManagerService$10.enqueueNotificationWithTag(NotificationManagerService.java:2410)
at android.app.INotificationManager$Stub.onTransact(INotificationManager.java:1064)
at android.os.Binder.execTransactInternal(Binder.java:1021)
and
java.lang.IndexOutOfBoundsException: Index -1, size 1
at androidx.compose.foundation.lazy.layout.MutableIntervalList.checkIndexBounds(MutableIntervalList.java:0)
at androidx.compose.foundation.lazy.layout.MutableIntervalList.c(MutableIntervalList.java:1)
at androidx.compose.foundation.lazy.layout.DefaultLazyLayoutItemsProvider.c(DefaultLazyLayoutItemsProvider.java:5)
at androidx.compose.foundation.lazy.LazyListItemProviderImpl.getKey(LazyListItemProviderImpl.java:2)
at androidx.compose.foundation.lazy.layout.DefaultDelegatingLazyLayoutItemProvider.getKey(DefaultDelegatingLazyLayoutItemProvider.java:8)
at androidx.compose.foundation.lazy.LazyListItemProviderKt$rememberLazyListItemProvider$1$1.getKey(LazyListItemProvider.kt:2)
at androidx.compose.foundation.lazy.LazyMeasuredItemProvider.a(LazyMeasuredItemProvider.java:7)
at androidx.compose.foundation.lazy.LazyListMeasureKt.measureLazyList-nXYdgZc(LazyListMeasure.kt:0)
at it.vfsfitvnm.compose.reordering.ReorderingLazyListKt$rememberLazyListMeasurePolicy$1$1.invoke-0kLqBqw(ReorderingLazyList.kt:0)
at it.vfsfitvnm.compose.reordering.ReorderingLazyListKt$rememberLazyListMeasurePolicy$1$1.invoke(ReorderingLazyList.kt:0)
at androidx.compose.foundation.lazy.layout.LazyLayoutKt$LazyLayout$1$2$1.invoke-0kLqBqw(LazyLayout.kt:0)
at androidx.compose.foundation.lazy.layout.LazyLayoutKt$LazyLayout$1$2$1.invoke(LazyLayout.kt:0)
at androidx.compose.ui.layout.LayoutNodeSubcompositionsState$createMeasurePolicy$1.measure-3p2s80s(LayoutNodeSubcompositionsState.java:0)
at androidx.compose.ui.node.InnerNodeCoordinator.measure-BRTryo0(InnerNodeCoordinator.java:0)
[continues]
Not sure how I could reproduce them, to be honest :/
Thanks, that's helpful.
I don't know how to like or thumbs up your comment, but I'm glad I could help, and I hope it helps solve this problem because it just removes my old songs, which is not that big a deal.
it just removes my old songs, which is not that big a deal.
@8itlew7r oh, maybe your problem is different (the stack trace is still helpful btw) - OP said the application crashed and - when it was reopened - the data got completely erased.
@8itlew7r oh, maybe your problem is different
I'm sorry, the words I used are confusing.
OP said the application crashed and - when it was reopened - the data got completely erased.
But no, I think we have the same issue and the data isn't completely erased because cache is still there, but like the OP said, nothing shows up.
Anyway, I won't waste any more of your time; I know you've got this!
The same thing happened to me today! A 1200 song playlist + offline songs disappeared when the app crashed today, i hope theres a fix soon cause im going on a long trip in a few days and music is my everything on long rides Ill remake my playlists again, just sad that ill have to do it over again
I think it could be solved if the application created, for example, a daily automatic backup. We would then lose a few songs at most, but not everything.
So I just noticed that after listening to songs in the default offline playlist because I don't have Wi-Fi, the database gets corrupted again, so maybe there is a pattern going on? I've been using your app for a few months now, but this only happened after listening offline for a long time.
If you have a backup hanging around (and, most importantly, you are still using this app after this embarrassing problem), you can recover it via:
sqlite3 corrupted.db ".recover" | sqlite3 recovered.db
It crashes again but I had the logcat of the pid, I'm hoping it might help.
Log file: https://tny.lv/logfile Password: https://tny.lv/logpass
I've noticed that everytime my phone is low on storage the offline songs disappear, maybe that's when corruption is triggered?
Steps to reproduce the bug
Open app Look up a song App crashed Songs are gone
Expected behavior
My songs should show up
Actual behavior
I had 2 playlists, many offline songs, favorites, and they're all gone
Screenshots/Screen recordings
Logs
No response
ViMusic version
0.5.4
Android version
Android 10
Additional information
It says the cache is still there, but nothing shows up.