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

Library went missing and cannot be re-initialized #8595

Open
mixxxbot opened this issue Aug 22, 2022 · 4 comments
Open

Library went missing and cannot be re-initialized #8595

mixxxbot opened this issue Aug 22, 2022 · 4 comments

Comments

@mixxxbot
Copy link
Collaborator

Reported by: igor47
Date: 2016-07-15T08:37:47Z
Status: Confirmed
Importance: High
Launchpad Issue: lp1603348
Tags: library
Attachments: [messed-up sqlite file](https://bugs.launchpad.net/bugs/1603348/+attachment/4701335/+files/messed-up sqlite file)


So, the problem as it stands today:
1. I remove my library (including track metadata) and reboot Mixxx
2. Mixxx asks me to add a library on startup
3. Mixxx finishes booting, and displays 4 of >10k tracks; even those 4 cannot be played

I can continue reproducing this indefinitely. This is what I see in the logs:

Debug [LibraryScanner 1]: upgrade filename is  "/home/igor47/.mixxx/DBUPGRADED" 
Debug [LibraryScanner 1]: Committing transaction on "LIBRARY_SCANNER" result: true 
Debug [LibraryScanner 1]: Legacy importer took 0 ms
Debug [LibraryScanner 1]: Recursively scanning library. 
Debug [LibraryScanner 1]: LibraryScanner::slotFinishHashedScan 
Debug [LibraryScanner 1]: src/library/dao/libraryhashdao.cpp 76 FAILED QUERY [ "INSERT INTO LibraryHashes (directory_path, hash, directory_deleted) VALUES (?, ?, ?)" ] QSqlError(19, "Unable to fetch row", "UNIQUE constraint failed: LibraryHashes.directory_path") Creating new dirhash failed. 
Debug [LibraryScanner 1]: LibraryScanner::slotFinishUnhashedScan 
Debug [LibraryScanner 1]: Recursive scanning finished cleanly. 
Debug [LibraryScanner 1]: Committing transaction on "LIBRARY_SCANNER" result: true 
Debug [LibraryScanner 1]: Marking tracks in changed directories as verified 
Debug [LibraryScanner 1]: Marking unchanged directories and tracks as verified 
Debug [LibraryScanner 1]: Checking remaining unverified tracks. 
Debug [LibraryScanner 1]: Marking unverified tracks as deleted. 
Debug [LibraryScanner 1]: Marking unverified directories as deleted. 
Debug [LibraryScanner 1]: Detecting moved files. 
Debug [LibraryScanner 1]: Committing transaction on "LIBRARY_SCANNER" result: true 
Debug [LibraryScanner 1]: Detecting cover art for unscanned files. 
Debug [LibraryScanner 1]: Scan finished cleanly 
Debug [LibraryScanner 1]: Scan took: 362886128 ns. 1939 unchanged directories. 1 changed/added directories. 0 tracks verified from changed/added directories. 3 new tracks.

I'm not exactly sure how I got into this state. I re-linked my library (from an SD card to my laptop's internal drive) but it seemed to work fine after that. There was a crash on exit (mixxx went defunct) and I force-killed it, and when it came back up all of my tracks were in the 'missing tracks' list and i couldn't get them back. I figured I would just nuke it and start over, and now I'm in this odd state.

This is on Fedora 23, using Mixxx 2.0.0.

@mixxxbot
Copy link
Collaborator Author

Commented by: igor47
Date: 2016-07-15T08:39:45Z


i renamed mixxxdb.sqlite to mixxxdb.sqlite.bak and now it's re-scanning my library properly. I'll attach the backed up, messed-up SQLite db to the ticket in case anyone is curious about exactly how it got messed up.

@mixxxbot
Copy link
Collaborator Author

Commented by: igor47
Date: 2016-07-15T08:41:48Z
Attachments: [messed-up sqlite file](https://bugs.launchpad.net/mixxx/+bug/1603348/+attachment/4701335/+files/messed-up sqlite file)

@mixxxbot
Copy link
Collaborator Author

Commented by: uklotzde
Date: 2019-10-19T16:24:27Z


This issue is caused by database inconsistencies that will hopefully be fixed soon:

https://bugs.launchpad.net/mixxx/+bug/1846945

@mixxxbot
Copy link
Collaborator Author

Commented by: uklotzde
Date: 2019-10-20T21:28:45Z


Not fixed, only a workaround:
#2321

@mixxxbot mixxxbot transferred this issue from another repository Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant