fast4x / RiMusic

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

Application crashes on database restore #143

Closed ikanakova closed 11 months ago

ikanakova commented 12 months ago

Steps to reproduce the bug

  1. Open RiMusic.
  2. Settings - Database - Restore
  3. App crashes.

Expected behavior

Import database from external file.

Actual behavior

App crashes.

Screenshots/Screen recordings

No response

Logs

crash.log:

FATAL EXCEPTION: main
Process: it.fast4x.rimusic, PID: 608
java.lang.RuntimeException: Unable to create service it.vfsfitvnm.vimusic.service.PlayerService: java.lang.IllegalStateException: Another SimpleCache instance uses the folder: /storage/emulated/0/Android/data/it.fast4x.rimusic/files
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:3966)
    at android.app.ActivityThread.access$1500(ActivityThread.java:220)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1876)
    at android.os.Handler.dispatchMessage(Handler.java:107)
    at android.os.Looper.loop(Looper.java:214)
    at android.app.ActivityThread.main(ActivityThread.java:7397)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)
Caused by: java.lang.IllegalStateException: Another SimpleCache instance uses the folder: /storage/emulated/0/Android/data/it.fast4x.rimusic/files
    at k3.y.<init>(SourceFile:95)
    at it.vfsfitvnm.vimusic.service.PlayerService.onCreate(SourceFile:483)
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:3954)
    ... 8 more

dump.log:

1700856623.624  1002  2152  2874 V Avrcp_ext: Media update: id -1➡-1? [MediaAttributes: none] : [MediaAttributes: none]
1700856623.624  1002  2152  2874 V Avrcp_ext: newPlayStatus:2mReportedPlayStatus:-1
1700856623.624  1002  2152  2874 V Avrcp_ext: updatePlaybackState, state: PlaybackState {state=2, position=-1, buffered position=0, speed=0.0, updated=5445417, actions=0, custom actions=[], active item id=-1, error=null} device: null
1700856623.624  1002  2152  2874 V Avrcp_ext: Device: no name:
1700856623.624  1002  2152  2874 I chatty  : uid=1002(bluetooth) BluetoothAvrcpH identical 3 lines
1700856623.624  1002  2152  2874 V Avrcp_ext: Device: no name:
1700856623.624  1002  2152  2874 V Avrcp_ext: updatePlayerStateAndPosition, old=PlaybackState {state=0, position=0, buffered position=0, speed=0.0, updated=0, actions=4927, custom actions=[], active item id=-1, error=null}, state=PlaybackState {state=2, position=-1, buffered position=0, speed=0.0, updated=5445417, actions=0, custom actions=[], active item id=-1, error=null}
1700856623.624  1002  2152  2874 V Avrcp_ext: old state = PlaybackState {state=0, position=0, buffered position=0, speed=0.0, updated=0, actions=4927, custom actions=[], active item id=-1, error=null}, new state= PlaybackState {state=2, position=-1, buffered position=0, speed=0.0, updated=5445417, actions=0, custom actions=[], active item id=-1, error=null}
1700856623.624  1002  2152  2874 D HeadsetService: getHeadsetService(): returning com.android.bluetooth.hfp.HeadsetService@580aed9
1700856623.624  1002  2152  2874 D HeadsetService:  isAudioOn: The number of audio connected devices 0
1700856623.624  1002  2152  2874 D HeadsetService: isScoOrCallActive(): Call Active:falseCall is Ringing:falseSCO is Active:false
1700856623.624  1002  2152  2874 D HeadsetService:  isAudioOn: The number of audio connected devices 0
1700856623.624  1002  2152  2874 I Avrcp_ext: updatePlayStatusForDevice: device: null
1700856623.625  1002  2152  2874 V Avrcp_ext: updatePlaybackState (1): old=PlaybackState {state=0, position=0, buffered position=0, speed=0.0, updated=0, actions=4927, custom actions=[], active item id=-1, error=null}(0), new=PlaybackState {state=2, position=-1, buffered position=0, speed=0.0, updated=5445417, actions=0, custom actions=[], active item id=-1, error=null}(2)
1700856623.625  1002  2152  2874 I Avrcp_ext: Exit updatePlayStatusForDevice
1700856623.625  1002  2152  2874 D HeadsetService:  isAudioOn: The number of audio connected devices 0
1700856623.625  1002  2152  2874 D HeadsetService: isScoOrCallActive(): Call Active:falseCall is Ringing:falseSCO is Active:false
1700856623.625  1002  2152  2874 D HeadsetService:  isAudioOn: The number of audio connected devices 0
1700856623.625  1002  2152  2874 I Avrcp_ext: updatePlayStatusForDevice: device: null
1700856623.625  1002  2152  2874 V Avrcp_ext: updatePlaybackState (1): old=PlaybackState {state=0, position=0, buffered position=0, speed=0.0, updated=0, actions=4927, custom actions=[], active item id=-1, error=null}(0), new=PlaybackState {state=2, position=-1, buffered position=0, speed=0.0, updated=5445417, actions=0, custom actions=[], active item id=-1, error=null}(2)
1700856623.625  1002  2152  2874 I Avrcp_ext: Exit updatePlayStatusForDevice
1700856623.625  1002  2152  2874 D HeadsetService:  isAudioOn: The number of audio connected devices 0
1700856623.625  1002  2152  2874 D HeadsetService: isScoOrCallActive(): Call Active:falseCall is Ringing:falseSCO is Active:false
1700856623.625  1002  2152  2874 D HeadsetService:  isAudioOn: The number of audio connected devices 0
1700856623.625  1002  2152  2874 I Avrcp_ext: updatePlayStatusForDevice: device: null
1700856623.625  1002  2152  2874 V Avrcp_ext: updatePlaybackState (1): old=PlaybackState {state=0, position=0, buffered position=0, speed=0.0, updated=0, actions=4927, custom actions=[], active item id=-1, error=null}(0), new=PlaybackState {state=2, position=-1, buffered position=0, speed=0.0, updated=5445417, actions=0, custom actions=[], active item id=-1, error=null}(2)
1700856623.625  1002  2152  2874 I Avrcp_ext: Exit updatePlayStatusForDevice
1700856623.626  1002  2152  2874 D HeadsetService:  isAudioOn: The number of audio connected devices 0
1700856623.626  1002  2152  2874 D HeadsetService: isScoOrCallActive(): Call Active:falseCall is Ringing:falseSCO is Active:false
1700856623.626  1002  2152  2874 D HeadsetService:  isAudioOn: The number of audio connected devices 0
1700856623.626  1002  2152  2874 I Avrcp_ext: updatePlayStatusForDevice: device: null
1700856623.626  1002  2152  2874 V Avrcp_ext: updatePlaybackState (1): old=PlaybackState {state=0, position=0, buffered position=0, speed=0.0, updated=0, actions=4927, custom actions=[], active item id=-1, error=null}(0), new=PlaybackState {state=2, position=-1, buffered position=0, speed=0.0, updated=5445417, actions=0, custom actions=[], active item id=-1, error=null}(2)
1700856623.626  1002  2152  2874 I Avrcp_ext: Exit updatePlayStatusForDevice
1700856623.626  1002  2152  2874 D HeadsetService:  isAudioOn: The number of audio connected devices 0
1700856623.626  1002  2152  2874 D HeadsetService: isScoOrCallActive(): Call Active:falseCall is Ringing:falseSCO is Active:false
1700856623.626  1002  2152  2874 D HeadsetService:  isAudioOn: The number of audio connected devices 0
1700856623.626  1002  2152  2874 I Avrcp_ext: updatePlayStatusForDevice: device: null
1700856623.626  1002  2152  2874 V Avrcp_ext: updatePlaybackState (1): old=PlaybackState {state=0, position=0, buffered position=0, speed=0.0, updated=0, actions=4927, custom actions=[], active item id=-1, error=null}(0), new=PlaybackState {state=2, position=-1, buffered position=0, speed=0.0, updated=5445417, actions=0, custom actions=[], active item id=-1, error=null}(2)
1700856623.626  1002  2152  2874 I Avrcp_ext: Exit updatePlayStatusForDevice
1700856623.626  1002  2152  2874 D Avrcp_ext: Enter sendPlayPosNotificationRsp
1700856623.626  1002  2152  2874 D Avrcp_ext: sendPlayPosNotificationRsp: Not registered or requesting.
1700856623.626  1002  2152  2874 D Avrcp_ext: Enter sendPlayPosNotificationRsp
1700856623.626  1002  2152  2874 D Avrcp_ext: sendPlayPosNotificationRsp: Not registered or requesting.
1700856623.626  1002  2152  2874 D Avrcp_ext: Enter sendPlayPosNotificationRsp
1700856623.626  1002  2152  2874 D Avrcp_ext: sendPlayPosNotificationRsp: Not registered or requesting.
1700856623.626  1002  2152  2874 D Avrcp_ext: Enter sendPlayPosNotificationRsp
1700856623.626  1002  2152  2874 D Avrcp_ext: sendPlayPosNotificationRsp: Not registered or requesting.
1700856623.626  1002  2152  2874 D Avrcp_ext: Enter sendPlayPosNotificationRsp
1700856623.626  1002  2152  2874 D Avrcp_ext: sendPlayPosNotificationRsp: Not registered or requesting.
1700856623.626  1002  2152  2874 V Avrcp_ext: Exit updatePlayerStateAndPosition
1700856623.626  1002  2152  2874 D Avrcp_ext: Exit onSessionDestroyed
1700856623.904  1000   563   563 E SELinux : avc:  denied  { find } for interface=vendor.qti.hardware.servicetracker::IServicetracker sid=u:r:system_server:s0 pid=1771 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
1700856623.907  1000   563   563 E SELinux : avc:  denied  { find } for interface=vendor.qti.hardware.servicetracker::IServicetracker sid=u:r:system_server:s0 pid=1771 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
1700856624.088  1000  1771  2829 D ActivityTrigger: ActivityTrigger activityPauseTrigger
1700856624.104  1000  1771   850 W IrisConfig: ColorManagerService is not Existed
1700856624.118  1000  1771  7289 E InputDispatcher: Window handle drag has no registered input channel
1700856624.119  1000  1771  7289 E InputDispatcher: Window handle drag has no registered input channel
1700856624.129  1000   563   563 E SELinux : avc:  denied  { find } for interface=vendor.qti.hardware.servicetracker::IServicetracker sid=u:r:system_server:s0 pid=1771 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
1700856624.130  1000  1771  7289 D CompatibilityInfo: mCompatibilityFlags - 0
1700856624.131  1000  1771  7289 D CompatibilityInfo: applicationDensity - 420
1700856624.131  1000  1771  7289 D CompatibilityInfo: applicationScale - 1.0
1700856624.131  1000   563   563 E SELinux : avc:  denied  { find } for interface=vendor.qti.hardware.servicetracker::IServicetracker sid=u:r:system_server:s0 pid=1771 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
1700856624.136  1000  1771  7289 E InputDispatcher: Window handle drag has no registered input channel
1700856624.136  1000  1771  7289 E InputDispatcher: Window handle drag has no registered input channel
1700856624.150 10198   608   639 I AdrenoGLES: QUALCOMM build                   : f2ab992, I401605978b
1700856624.150 10198   608   639 I AdrenoGLES: Build Date                       : 09/28/19
1700856624.150 10198   608   639 I AdrenoGLES: OpenGL ES Shader Compiler Version: EV031.27.05.01
1700856624.150 10198   608   639 I AdrenoGLES: Local Branch                     :
1700856624.150 10198   608   639 I AdrenoGLES: Remote Branch                    :
1700856624.150 10198   608   639 I AdrenoGLES: Remote Branch                    :
1700856624.150 10198   608   639 I AdrenoGLES: Reconstruct Branch               :
1700856624.150 10198   608   639 I AdrenoGLES: Build Config                     : S L 8.0.11 AArch64
1700856624.152  1000  1771  7289 E InputDispatcher: Window handle drag has no registered input channel
1700856624.152  1000  1771  7289 E InputDispatcher: Window handle drag has no registered input channel
1700856624.160 10198   608   639 I AdrenoGLES: PFP: 0x005ff112, ME: 0x005ff066
1700856624.169  1000  1771  7289 E InputDispatcher: Window handle drag has no registered input channel
1700856624.169  1000  1771  7289 E InputDispatcher: Window handle drag has no registered input channel
1700856624.174 10198   608   656 E ROOM    : Invalidation tracker is initialized twice :/.
1700856624.202  1000  1771  6163 E InputDispatcher: Window handle drag has no registered input channel
1700856624.202  1000  1771  6163 E InputDispatcher: Window handle drag has no registered input channel
1700856624.208 10198   608   608 D AndroidRuntime: Shutting down VM
1700856624.208 10198   608   608 E AndroidRuntime: FATAL EXCEPTION: main
1700856624.208 10198   608   608 E AndroidRuntime: Process: it.fast4x.rimusic, PID: 608
1700856624.208 10198   608   608 E AndroidRuntime: java.lang.RuntimeException: Unable to create service it.vfsfitvnm.vimusic.service.PlayerService: java.lang.IllegalStateException: Another SimpleCache instance uses the folder: /storage/emulated/0/Android/data/it.fast4x.rimusic/files
1700856624.208 10198   608   608 E AndroidRuntime:  at android.app.ActivityThread.handleCreateService(ActivityThread.java:3966)
1700856624.208 10198   608   608 E AndroidRuntime:  at android.app.ActivityThread.access$1500(ActivityThread.java:220)
1700856624.208 10198   608   608 E AndroidRuntime:  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1876)
1700856624.208 10198   608   608 E AndroidRuntime:  at android.os.Handler.dispatchMessage(Handler.java:107)
1700856624.208 10198   608   608 E AndroidRuntime:  at android.os.Looper.loop(Looper.java:214)
1700856624.208 10198   608   608 E AndroidRuntime:  at android.app.ActivityThread.main(ActivityThread.java:7397)
1700856624.208 10198   608   608 E AndroidRuntime:  at java.lang.reflect.Method.invoke(Native Method)
1700856624.208 10198   608   608 E AndroidRuntime:  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
1700856624.208 10198   608   608 E AndroidRuntime:  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)
1700856624.208 10198   608   608 E AndroidRuntime: Caused by: java.lang.IllegalStateException: Another SimpleCache instance uses the folder: /storage/emulated/0/Android/data/it.fast4x.rimusic/files
1700856624.208 10198   608   608 E AndroidRuntime:  at k3.y.<init>(SourceFile:95)
1700856624.208 10198   608   608 E AndroidRuntime:  at it.vfsfitvnm.vimusic.service.PlayerService.onCreate(SourceFile:483)
1700856624.208 10198   608   608 E AndroidRuntime:  at android.app.ActivityThread.handleCreateService(ActivityThread.java:3954)
1700856624.208 10198   608   608 E AndroidRuntime:  ... 8 more
1700856624.219  1000  1771  2829 E InputDispatcher: Window handle drag has no registered input channel
1700856624.220  1000  1771   852 I DropBoxManagerService: add tag=data_app_crash isTagEnabled=true flags=0x2

RiMusic version

0.6.10

Android version

Android 10

Additional information

No response

fast4x commented 12 months ago

Ok

ikanakova commented 11 months ago

In v0.6.10.1 there is still this issue.

fast4x commented 11 months ago

Fixed, available from version 0.6.11