Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Occasional skipped song when clicking next track #1139

Open
dessalines opened this issue Jan 5, 2023 · 3 comments
Open

Occasional skipped song when clicking next track #1139

dessalines opened this issue Jan 5, 2023 · 3 comments

Comments

@dessalines
Copy link

dessalines commented Jan 5, 2023

Clicking the next track button will occasionally skip the next song. I then go back a track, and sometimes have to click the track before the one I want to play.

I'm not sure what causes this.

navidrome server, must recent deployed dsub.

@eddik1970
Copy link

This happens to me too. I use Subsonic-server.

@gravelld
Copy link

gravelld commented Aug 6, 2024

I've had reports of this happening very often for some of my users; it occurs both when clicking the next track but also when clicking on a track - sometimes this plays the following track (which sounds a bit like the rectification mentioned in the original post). That was on Android 14. I don't experience this myself; I'm on 13.

The server in this case is Astiga.

@gravelld
Copy link

gravelld commented Aug 16, 2024

I have managed to replicate this today, basically by clicking next very quickly. I see error messages like this (the E/ lines, note I also added some extra logs for the next button and DownloadService):

D/NowPlayingFragment: nextButton::onClick
D/DownloadService: next
D/AutoRepeatButton: nextButton::MotionEvent.ACTION_DOWN
V/MediaPlayer: resetDrmState:  mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false
V/MediaPlayer: cleanDrmObj: mDrmObj=null mDrmSessionId=null
I/DownloadService: STARTED -> IDLE (DownloadFile (Market de solday))
E/MediaPlayerNative: error (-38, 0)
E/MediaPlayerNative: setAudioSessionId called in state 0
I/DownloadFile: Downloaded 52.80 MB of Renard
I/DownloadService: IDLE -> PREPARING (DownloadFile (Market de solday))
I/DownloadService: Next: IDLE -> IDLE (DownloadFile (Market de solday))
W/ga.asti.android: Long monitor contention with owner BackgroundTask_7 (12722) at void github.daneren2005.dsub.service.DownloadService.setPlayerState(github.daneren2005.dsub.domain.PlayerState)(DownloadService.java:1612) waiters=0 in void github.daneren2005.dsub.service.DownloadService.onSongProgress(boolean) for 321ms
W/ga.asti.android: Long monitor contention with owner BackgroundTask_7 (12722) at void github.daneren2005.dsub.service.DownloadService.setPlayerState(github.daneren2005.dsub.domain.PlayerState)(DownloadService.java:1612) waiters=2 in void github.daneren2005.dsub.service.DownloadService.onSongProgress(boolean) for 264ms
E/MediaPlayer: Error (-38,0)
W/DownloadService: Error on playing file (-38, 0): DownloadFile (Market de solday)
I/DownloadService: PREPARING -> IDLE (DownloadFile (Market de solday))
D/AutoRepeatButton: nextButton::MotionEvent.ACTION_UP
D/NowPlayingFragment: nextButton::onClick
V/MediaPlayer: resetDrmState:  mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false
V/MediaPlayer: cleanDrmObj: mDrmObj=null mDrmSessionId=null
I/DownloadService: IDLE -> COMPLETED (DownloadFile (Market de solday))
E/MediaPlayerNative: Attempt to call getDuration in wrong state: mPlayer=0x0, mCurrentState=1
E/MediaPlayerNative: error (-38, 0)
V/MediaPlayer: resetDrmState:  mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false

I think this relates to the MediaPlayer's state model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants