Rockbox

Tasklist

FS#6758 - Database update issue

Attached to Project: Rockbox
Opened by Alan F (alsaf) - Thursday, 08 March 2007, 00:02 GMT
Task Type Bugs
Category ID3 / meta data
Status Closed
Assigned To No-one
Operating System Another
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Target environment: UISimulator - H120 simulator
Build: r12679 - 070307

I noticed a bug on the database update when I was using the UI simulator when investigating another bug.

The bug is when you delete music files and update the database. After closing simulator and restarting, sometimes when you go back into database there is more than one id3 track entry in database.

I managed to replicate this bug by doing the following steps:

1) On copying two albums into archos folder, I ran the simulator, initialised database. When viewing database, the 2 albums are displayed with the correct number of tracks.
2) I exit simulator. I delete one of the album folders. I ran the simulator then updated the database. When viewing the database, 1 album is displayed but there is duplicate entries for all tracks except track 1.
3) I exit simulator, restart simulator, update the database again. When viewing the database, the same results are displayed.
4) I exit simulator, delete album folder then copy over two completely different albums. I ran simulator then updated the database. 2 albums are displayed but now there are duplicate track entries displayed in both albums.
5) I exit simulator. I delete one of the album folders. I ran the simulator then updated the database. When viewing the database, 1 album is displayed but there is now triplicate entries being displayed.

When running step five again, there is now quadruplicate tracks displayed.

I have noticed there is differing amount of extra tracks, usually every track after track 8.

I also did a test on two albums 'Angel of Retribution' and 'British Steel'. When British Steel is deleted and database is updated, the database displays the Angel of Retribution tracks normally. When I repeat again but this time deleting the Angel of Retribution album, the database displays duplicate tracks in the British steel albums.

I also noticed differing extra entries when albums have differing number of tracks.
This task depends upon

Closed by  Miika Pekkarinen (miipekk)
Sunday, 11 March 2007, 08:53 GMT
Reason for closing:  Fixed
Comment by Alan F (alsaf) - Thursday, 08 March 2007, 00:32 GMT
I thought issue might be to do with using small amounts of data ie 2 albums with 10 tracks each but I have used larger amounts 12 albums with varying amount of number of tracks and same behaviour happens.

I also tried a real life scenario. I have has 12 albums where datbase was initialised and database is displaying correctly. I deleted one album folder than added a completely new one. I updated the database. The existing albums displayed correct amount of track entries but new album displays duplicate entries as per screenshot.
Comment by Steve Bavin (pondlife) - Thursday, 08 March 2007, 07:45 GMT
I might be misunderstanding, but AFAIK you should check that you have Directory Cache enabled, and have your Database loaded in RAM. If one of these options is not selected, update database will not delete entries; you need to initialise database instead.
Comment by Alan F (alsaf) - Saturday, 10 March 2007, 11:08 GMT
Apologies for delay in getting back on this.

I changed the settings to Database load to RAM - yes and dircache enabled. I did tests. The database behaved normally with no duplicates.

I changed settings to Database load to Ram - yes and dircache disabled. I did tests. The database behaved normally with no duplicates.

I then changed setting Database load to Ram - no and dircache enabled. I did tests. The errors I experienced in original test was seen again with database showing duplicate entries.

I've checked the rockbox manual and it confirms that update can be used without dircache enabled. I've checked the most current manual and it makes not mention of having Load to Ram enabled for update to work properly.

Will the manual need to be updated to take account of this?
Comment by Miika Pekkarinen (miipekk) - Sunday, 11 March 2007, 08:53 GMT
Should be fixed now, thanks for the report.

Loading...