Activity log for bug #1937941

Date Who What changed Old value New value Message
2021-07-25 13:50:52 Adam Szmigin bug added bug
2021-07-25 13:53:09 Adam Szmigin description Affected version(s): --- Latest source build from main (commit bee21d8912c839d647cebf15a15ab006b2980995) Steps to reproduce: --- I have been unable to reproduce this since the initial occurrence, but these are the steps I took: 1. Ensure that Mixxx is set up with multiple music directories as part of the library. 2. Open Mixxx, navigate to Preferences. 3. Remove one of the music directories 4. Choose option to delete track metadata. Expected behaviour: --- Directory is deleted without fanfare, and without assertions failing. Actual behaviour: --- A critical debug assertion is raised: ``` critical [Main] FwdSqlQuery - Failed to prepare "UPDATE library SET timesplayed=q.timesplayed,last_played_at=q.last_played_at FROM(SELECT PlaylistTracks.track_id as id,COUNT(PlaylistTracks.track_id) as timesplayed,MAX(PlaylistTracks.pl_datetime_added) as last_played_at FROM PlaylistTracks JOIN Playlists ON PlaylistTracks.playlist_id=Playlists.id WHERE Playlists.hidden=2 GROUP BY PlaylistTracks.track_id) q WHERE library.id=q.id AND library.id IN (3391)" : QSqlError("1", "Unable to execute statement", "near \"FROM\": syntax error") critical [Main] DEBUG ASSERT: "!query.hasError()" in function bool TrackDAO::updatePlayCounterFromPlayedHistory(const QSet<TrackId> &) const at /home/smidge/Development/Audio/Mixxx/mixxx-github/src/library/dao/trackdao.cpp:2248 ``` The SQL, when formatted better, looks like this: ```sql UPDATE library SET timesplayed=q.timesplayed, last_played_at=q.last_played_at FROM ( SELECT PlaylistTracks.track_id as id, COUNT(PlaylistTracks.track_id) as timesplayed, MAX(PlaylistTracks.pl_datetime_added) as last_played_at FROM PlaylistTracks JOIN Playlists ON PlaylistTracks.playlist_id=Playlists.id WHERE Playlists.hidden=2 GROUP BY PlaylistTracks.track_id) q WHERE library.id=q.id AND library.id IN (3391) ``` Affected version(s): --- Latest source build from main (commit bee21d8912c839d647cebf15a15ab006b2980995) Steps to reproduce: --- I have been unable to reproduce this since the initial occurrence, but these are the steps I took: 1. Ensure that Mixxx is set up with multiple music directories as part of the library. 2. Open Mixxx, navigate to Preferences. 3. Remove one of the music directories 4. Choose option to delete track metadata. In my case, I had ~15 different music directories that I needed to remove, and removing some of them caused this bug, whereas some did not. My (uneducated) guess would be that perhaps something about the nature of the tracks in each directory may be the trigger for the bug. Expected behaviour: --- Directory is deleted without fanfare, and without assertions failing. Actual behaviour: --- A critical debug assertion is raised: ``` critical [Main] FwdSqlQuery - Failed to prepare "UPDATE library SET timesplayed=q.timesplayed,last_played_at=q.last_played_at FROM(SELECT PlaylistTracks.track_id as id,COUNT(PlaylistTracks.track_id) as timesplayed,MAX(PlaylistTracks.pl_datetime_added) as last_played_at FROM PlaylistTracks JOIN Playlists ON PlaylistTracks.playlist_id=Playlists.id WHERE Playlists.hidden=2 GROUP BY PlaylistTracks.track_id) q WHERE library.id=q.id AND library.id IN (3391)" : QSqlError("1", "Unable to execute statement", "near \"FROM\": syntax error") critical [Main] DEBUG ASSERT: "!query.hasError()" in function bool TrackDAO::updatePlayCounterFromPlayedHistory(const QSet<TrackId> &) const at /home/smidge/Development/Audio/Mixxx/mixxx-github/src/library/dao/trackdao.cpp:2248 ``` The SQL, when formatted better, looks like this: ```sql UPDATE library SET timesplayed=q.timesplayed,     last_played_at=q.last_played_at FROM (     SELECT PlaylistTracks.track_id as id,            COUNT(PlaylistTracks.track_id) as timesplayed,            MAX(PlaylistTracks.pl_datetime_added) as last_played_at     FROM PlaylistTracks     JOIN Playlists ON PlaylistTracks.playlist_id=Playlists.id     WHERE Playlists.hidden=2     GROUP BY PlaylistTracks.track_id) q WHERE library.id=q.id AND library.id IN (3391) ```
2021-07-27 12:48:29 Uwe Klotz mixxx: status New Incomplete
2021-07-27 13:01:24 Uwe Klotz mixxx: status Incomplete Confirmed
2021-07-27 13:01:26 Uwe Klotz mixxx: importance Undecided Critical
2021-07-27 13:01:28 Uwe Klotz mixxx: milestone 2.4.0
2021-07-27 21:58:40 Uwe Klotz mixxx: status Confirmed In Progress
2021-07-27 21:58:43 Uwe Klotz mixxx: assignee Uwe Klotz (uklotzde)
2021-08-06 11:14:38 Uwe Klotz mixxx: status In Progress Fix Committed
2022-10-08 21:39:43 Swiftb0y bug watch added https://github.com/mixxxdj/mixxx/issues/10482
2022-10-08 21:39:44 Swiftb0y lock status Unlocked Comment-only