-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Auto DJ skip fix lp1941989 #4319
Conversation
In rare conditions, we receive a stray position update which leads to a repeated loadNextTrackFromQueue() call, discarding the track currently loading. This effectively skips a track. Fixing lp:941989
TrackPointer pLoadTrack; | ||
{ // locking scope | ||
QMutexLocker locker(&m_newTrackMutex); | ||
pLoadTrack = m_pNewTrack; | ||
m_pNewTrack.reset(); | ||
m_newTrackAvailable = false; | ||
m_newTrackAvailable = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
m_newTrackAvailable.storeRelease(0)
Probably related? https://bugs.launchpad.net/mixxx/+bug/1859374 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for stepping in! Let's see if the AutoDJ bug is fixed.
The interaction between CachingReader and the Engine is still complicated and hard to reason about. I expect that the code contains more race conditions and multi-threading bugs. Hopefully we don't wake some one of those hidden dragons by applying these changes ;) Eventually the code has to be rewritten. In Rust.
LGTM
I will merge to main. |
Seems like this or #4267 also fixed the Repeat Playlist issue |
This should fix https://bugs.launchpad.net/mixxx/+bug/1941989 where tracks are skipped in AutoDJ.
This is hard to test, because skipping happens only under rare conditions. I was able to reproduce it unreliable with the "Full Track Mode" and a slow spinning USB HDD. With this PR I cannot reproduce it anymore.
The fix is implemented in two places: