Rockbox

Tasklist

FS#10037 - database_changelog corrupted/wrecked

Attached to Project: Rockbox
Opened by Giles (gilesn) - Friday, 20 March 2009, 13:47 GMT
Task Type Bugs
Category Database
Status Unconfirmed
Assigned To No-one
Operating System iPod 5G
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

Build 20399

The database_changelog.txt is corrupted in that the wrong filename is associated with a track, this has happened before (pre v3.0), I had to write ascript to correct it.

Exampe row from log:

artist="Teach Yourself" album="Polish Conversation (Disc 3)" genre="Books & Spoken" title="Conversation 1: Booking A Hotel In Krakow" filename="/iPod_Control/Music/Blur/Blur - Blur/14 Essex Dogs.mp3" composer="<Untagged>" comment="<Untagged>" albumartist="Teach Yourself" grouping="Conversation 1: Booking A Hotel In Krakow" year="2006" discnumber="3" tracknumber="2" bitrate="71" length="640824" playcount="0" rating="0" playtime="0" lastplayed="0" commitid="12" mtime="955689818"
This task depends upon

Comment by Robert Kukla (roolku) - Friday, 20 March 2009, 15:54 GMT
Could you please add some information that would help us to try and replicate the error? What are your database settings? Did you export after having added/deleting new audio files? Maybe while it was still auto updating? Did you notice a constant offset or did it only concern a few files? Anything to track down what combination of factors leads to corruption. Cheers
Comment by Giles (gilesn) - Friday, 20 March 2009, 16:05 GMT
The database settings are:
loadtoram=yes
autoupdate=yes

It happened after upgrading to a new build, this prompted the request to initialize the DB, I think I then exported the log first to back it up.

I did a quick scan of the log file and the corruption occurred on all log entries I noticed but I didn't check every row.

Hope this helps!
Comment by Robert Kukla (roolku) - Friday, 20 March 2009, 16:27 GMT
I assume you had an old database_changelog.txt when you initialised the db? Do you remember if you added or deleted audio files since your last export? Did you do a shutdown and restart between initialisation and export?
Comment by PaulJam (PaulJam) - Friday, 20 March 2009, 19:34 GMT
>It happened after upgrading to a new build, this prompted the request to initialize the DB, I think I then exported the log first to back it up.

The prompt to initialize the DB appears when the database files are incompatible with the installed build (because of code changes). If you then export the changelog, wouldn't the log get created from those incompatible files? Maybe this would explain the errors in the changelog.
Comment by Giles (gilesn) - Saturday, 21 March 2009, 13:38 GMT
Yes had an old database_changelog.txt.

I probably did add audio files since the last export (podcasts added daily), not sure whether autoupdating occurred at the same time though.

Yes, I always do a shutdown after initialize but I exported /before/ doing the initialize.

Maybe it's good practice to export the log before upgrading and back up that file.
Comment by Robert Kukla (roolku) - Sunday, 22 March 2009, 19:55 GMT
PaulJam (PaulJam) wrote:

The prompt to initialize the DB appears when the database files are incompatible with the installed build (because of code changes). If you then export the changelog

Giles (gilesn) wrote:

It happened after upgrading to a new build, this prompted the request to initialize the DB, I think I then exported the log first to back it up.
I exported /before/ doing the initialize.
----------

I am a little confused here. If the datebase is incompatible (version number difference) the export will fail. The code checks the exact same condition as for the "Initialise Database" prompt (tc_stat.ready) and I just did an experiment where I incremented the version in the code and tried to export an old database and it failed as expected.

Did you restore an old version of rockbox to do the export?

Comment by sideral (sideral) - Thursday, 19 May 2011, 15:18 GMT
Does this problem still exists with the latest release (3.8.1)?
Comment by Giles (gilesn) - Wednesday, 29 August 2012, 12:11 GMT
This problem doesn't exist, now on version16335da-120826

Loading...