This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#6761 - Database progress reads above 100%
Attached to Project:
Rockbox
Opened by Steve Bavin (pondlife) - Thursday, 08 March 2007, 17:10 GMT+2
Last edited by amaury pouly (pamaury) - Tuesday, 02 February 2010, 22:10 GMT+2
Opened by Steve Bavin (pondlife) - Thursday, 08 March 2007, 17:10 GMT+2
Last edited by amaury pouly (pamaury) - Tuesday, 02 February 2010, 22:10 GMT+2
|
Details1) Start with the following settings:
System > Disk > Directory Cache : No Database > Load to RAM : No > Auto Update : Yes > Gather Runtime Data : Yes > Initialise Now 2) Go into Debug > View database info and wait for updating to complete. Mine displays -1% while counting and ends on Progress: -1% (12477 entries), then commits before resetting to 0% and counting up to 100% (12486 entries). I assume this is an update pass. 3) Now change the setting Database > Load to RAM : Yes 4) Shut down and restart 5) Go into Debug > View database info. Progress counts up from 0% to 120% (12486 entries)! |
This task depends upon
Closed by amaury pouly (pamaury)
Tuesday, 02 February 2010, 22:10 GMT+2
Reason for closing: Not a Bug
Tuesday, 02 February 2010, 22:10 GMT+2
Reason for closing: Not a Bug
Version: r12579-070304
I have similar results. In step 2, the count is 4106 entries but 4115 on commit. In step 5 Progress counts to 144% with 4115 entries.
The total is dependent of pre=processors (apologies if this is wrong, I haven't done C in years). If HAVE_DIRCACHE is defined the total is got from the entry count returned by dircache_get_entry_count() in dircache.c. If HAVE_TC_RAMCACHE is defined, things start to get a bit complicated. The total is set by the following if statement:
if (hdr && tc_stat.ramcache)
total_count = hdr->h.tch.entry_count;
My knowledge of C as mentioned is basic and of rockbox absolutely nill but hopefully this will give a start to somebody with more knowledge than myself to identify problem.
I then did test with Load to Ram no & directory cache set to yes before initalising database and at end the progress was 97%.
The processed_dir_count variable is a count of all folders and file in the DAP hard drive (as obtained from the opendir_cached function in dirchache.c). This is done in the check_dir function (in tagcache.c).
For this to be an accurate percentage the process_dir_count will need to be a count of music files only?
FS#8982(Database update progress stuck to -1%) : http://www.rockbox.org/tracker/task/8982