Auto-DJ does not work for winx86 on first start

Bug #1047435 reported by Max Linke
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Medium
Max Linke

Bug Description

This is a bug with the database-code.
On the first run mixxx seems to think that the playlist ID for Auto-DJ is -1. So the tracks get added and saved correctly in the database they just refer to a invalid playlist_id(-1). When mixxx is started for the second time all works well and songs added to auto-dj are all shown. I will also test if this problems occurs under linux as well

I used prebuild r3369-x86 for this.

Tags: autodj

Related branches

Revision history for this message
Max Linke (max-linke) wrote :

The problem also occurs on linux with the latest revision

tags: added: autodj
Changed in mixxx:
milestone: none → 1.11.0
Max Linke (max-linke)
Changed in mixxx:
assignee: nobody → Max Linke (max-linke)
status: New → Incomplete
status: Incomplete → In Progress
Revision history for this message
Max Linke (max-linke) wrote :

Oh this turned out the be a suprise developing a solution.

As it turns out the bug only occurs if the libraryScanner runs longer then 2 sec.(noticable because the UI element to cancel the scan shows up) on the initial run. If just a small number of songs is imported the entry for a Auto-DJ playlist is generated. I guess this is because the libraryscanner blocks the db and so no other part of mixxx can make a transaction.

The patch attached contains a brute force method to fix this and adds the Auto-DJ entry in the db if it not exists. I will try to find a more elegant solution for this problem

jus (jus)
Changed in mixxx:
importance: Undecided → Medium
Revision history for this message
Max Linke (max-linke) wrote :

I found a better solution for this problem.

The problem was that dlgAutodj took care of creating the autoDJ-playlist but this was created when the skin is loaded. Which is after the libraryscanner is created. This means mixxx tried to add the playlist while we had a open transaction running.
I solved the problem by initializing the libraryscanner after the skin is loaded.

This solution should be ok for 1.11. I know that Scott worked on Auto-DJ for GSOC did he write a AutoDJ class that takes care of the logic and isn't tied to the GUI like the system we have now?

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Thanks Max -- I committed the patch with some tweaks :).

Changed in mixxx:
status: In Progress → Fix Committed
RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: Fix Committed → Fix Released
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/6625

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.