Rolled back to 1.61 - Now random tracks cause corrupt DB errors in Prime software

Really don’t know what to say. I backed up Engine library folder on my SSD prior to 2.0 upgrade and copied it back over the corrupted 2.0 upgrade EL folder after rollback. Now in Engine Prime software random tracks cause corrupt database errors on some tracks when loading into software for playback. The tracks that cause corruption errors will actually play and have ques, waveform etc. but my library disappears. I can reload Prime without errors and my library is intact unless I interact with those that cause the error. With this I have absolutely no faith whatsoever to be able to play live. Not very happy at the prospect of starting from scratch. Other than plucking though my tracks 1-by-1 and reimporting affected files does anyone have recommendations to fix? I would not be hesitant to attempt SQL edits but also concerned that I am not working with a stable data set.

Thanks and I’d appreciate any thoughts or advice! -OD

This makes no sense, but not in the way you describe it.

The 1.x database is migrated to 2.x into a completely different folder and files. That migration is non-destructive to the 1.x database.

If you install the old Engine all should be the way it was.

1 Like

I don’t disagree. It’s entirely possible that the drive or file got corrupted and I did not catch it until now. Odd timing, but to be fair I have been scrutinizing since I upgraded/rolled back yesterday. A pattern emerging is that the errors don’t start until further down into my collection. I have 618 tracks in this collection and the first track to pop up this error is almost halfway down the collection (I sort by date added) and condense as I go further down the list. Thus far, loading 1-by-1 I am ~95% of the way through the collection and 45 tracks cause this error and the frequency increases the further I go. So it’s not too bad. It is possible the DB was messed up for a while but I just didn’t select the “bad” tracks. I will look through my history but some of these are favorites that likely would have been loaded into a player. Perhaps someone can answer this. If I care to analyze the DB where should I look, local disk (C:\Users…) or the external SSD? If so, which file?

Thanks! OD

Could be several places, but look for the Engine folder were the music resides.

Below is a snip from the last log file. Not sure if it will display correctly. I am not sure how to interpret it but this only occurs with specific tracks.

[C] [ 0x22adeaf63a8 ] Job failed ( Status: 5 ) Job DisplayName: “Upgrading database of D:” [2021-10-17T21:17:30.361Z] [air.planck.jobcontroller] [:0] [W] Error in StatementSqlite::executeForNextResult StatementSqlite (0,000,022,AE8,37B,510), Status: Error

  • Main db [2021-10-17T21:17:30.367Z] [air.planck.librarian ] [:0] [W] filename: stm.db
  • Query string: UPDATE Track SET path = “”
  • Error: SQLITE_CONSTRAINT ( UNIQUE constraint failed: [2021-10-17T21:17:30.367Z] [air.planck.librarian ] [:0] [W] Track.path) [2021-10-17T21:17:30.367Z] [air.planck.librarian ] [:0] [C] [ 0x22adeaf6d28 ] Job failed ( Status: 5 ) Job DisplayName: “Resetting Streaming database” [2021-10-17T21:17:30.410Z] [air.planck.jobcontroller] [:0] [W] Corresponding airQuickTreeViewItem was not found for parent QModelIndex(0,0,0x22ad2aaef30,ListsModel(0x22ad1e6fa20)) [2021-10-17T21:17:30.581Z] [ ] [:0] [ ] -->Changed device property {9855c4cd-df8c-449c-a181-8191b68bd06c}#0 [2021-10-17T21:17:52.474Z] [ ] [:0] [W] Error in StatementSqlite::executeForNextResult StatementSqlite (0,000,022,AF1,060,4D0), Status: Error
  • Main db [2021-10-17T21:18:23.041Z] [air.planck.librarian ] [:0] [W] filename: m.db
  • Query string: UPDATE Track SET id = ? , playOrder = ? , length = ? , lengthCalculated = ? , bpm = [2021-10-17T21:18:23.041Z] [air.planck.librarian ] [:0] [W] ? , year = ? …
  • Error: SQLITE_CORRUPT ( database disk image is malformed) [2021-10-17T21:18:23.041Z] [air.planck.librarian ] [:0] [C] Found corrupted database: H:/Engine Library [2021-10-17T21:18:23.070Z] [air.planck.librarian ] [:0] [C] Device’s database is corrupted H: [2021-10-17T21:18:23.071Z] [air.planck.database ] [:0] [W] Failed to save meta data for file: “I Will Never - Aday Hernandez Remix.flac” , error code: 4 [2021-10-17T21:18:23.071Z] [air.planck.database ] [:0] [W] Failed to set jounal mode of database: m.db (Error code: 100) [2021-10-17T21:18:23.084Z] [air.planck.librarian ] [:0] [ ] WASAPICombinedDevice::stopAudioThread : Stopping: 0x22ad614fba0 [2021-10-17T21:18:29.028Z] [ ] [:0] [ ] WASAPICombinedDevice::audioThread : Stopped : 0x22ad614fba0 [2021-10-17T21:18:29.036Z] [ ] [:0] [ ] WASAPICombinedDevice::stopAudioThread : Stopped : 0x22ad614fba0 [2021-10-17T21:18:29.037Z] [ ] [:0] [W] LibrarianTrackData deleted from non-main thread! [2021-10-17T21:18:29.052Z] [ ] [:0] [I] ============================================================================ [2021-10-17T21:18:29.650Z] [ ] [:0] [I] Clean Exit [2021-10-17T21:18:29.651Z] [ ] [:0] [I] ============================================================================ [2021-10-17T21:18:29.653Z] [ ] [:0]

Looks like your H-drive.

An option would be to zip the Engine folder without the music files. Maybe @KDonaldson has the time to check the problem.

I know they’re very busy, so no guarantees.

Good deal, thanks for your time Reese.

@Oni_Disco Just spitballing here based on the log snippet, but the “Error: SQLITE_CONSTRAINT (UNIQUE contraint failed)” bit means that the there’s a couple (or more) entries in a particular database table that are violating the rules that the database has established for that table. These are usually to prevent things like duplicates or whatever. I don’t know if I can help, but it looks like your issue is in your “stm.db” database, one of the tables that relates to crate or playlist hierarchy/organization. There’s another error too, SQLITE_CORRUPT that looks like it’s specifically in regards to your “I Will Never - Aday Hernandez Remix.flac” track. Not sure what the deal is with that, but you could try temporarily removing that song and see if you at least resolve one error.

Edit: it also looks like your second error is in your “m.db” file, so do the instructions below on both “stm.db” and “m.db”:

I don’t know how comfortable you are with database junk, but if you’re feeling adventurous you could download a free db viewing tool called “DB Browser for SQLite” and go to File->Open and open your “stm.db” file (should be in your Engine Prime folder where all the databases are stored). Then go to Tools->Integrity Check: it’ll pop up a dialog asking if you want to run said check (with some boring SQL command displayed for you that you can disregard). Say yes. Look at the very bottom left of the window: It’ll say this if it doesn’t find any issues:

Execution finished without errors. Result: 1 rows returned in 1ms At line 1: PRAGMA integrity_check;

The number of rows in my example is irrelevant (it’s just an example, yours might say whatever your number of tracks is). If we’re lucky, it’ll provide some more details on what’s the error, or, my hope, at least which table in the database is having the constraints violated. When we know that, it may be possible and even easy to fix, depending on how many and what types are causing the issue.

When you close the app it may ask to save changes: say no. We’re just diagnosing here at this stage.

1 Like

Thank you architekt. I really appreciate your assist on this. I will set to this in a couple of days when I have some time to work on it. Interested to see which constraint was violated and possibly how. I have ID’d the tracks that cause the corrupt error, the log I posted was when that particular track caused it. Fortunately a small % of tracks cause this and I haven’t recognized a pattern. I may load some backup libraries just to see what’s up. I’ll get back and let you all know how it went. Thanks!

So long story short, I ultimately rebuilt my library from scratch. I attempted to use dbeaver to edit/remove offending lines in the database but came to the conclusion that I didn’t trust the files. Even my backups had the same error so there is no telling how long it was corrupted–At least back to 2020. I exported all my data into an Excel friendly format and used that to sort which tracks I would keep and update tags in the flac files and started anew.

hello.I also have the problem that by rolling out to 1.6.1 it no longer finds my database so it no longer finds all the playlists I had a year ago.except one … so I kindly ask you, if you can easily explain to me what do to rebuild the database … which files to find in the old engine library folder that I see exist in my pc that I use with the P4 … thank you immediately for your help, otherwise I cannot play in the club, , I’m stuck urgently

PS: if I reinstall the latest versions I find my music again, but then I have problems and bugs, which many here in the forum also have, so I want to go back to the old versions that did not give me problems