• Status Closed
  • Percent Complete
  • Task Type Bugs
  • Category ID3 / meta data
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by pondlife - 2007-03-08
Last edited by pamaury - 2010-02-02

FS#6761 - Database progress reads above 100%

1) 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)!

Closed by  pamaury
2010-02-02 21:10
Reason for closing:  Not a Bug
alsaf commented on 2007-03-10 15:10

DAP: H120
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.

alsaf commented on 2007-03-11 11:13

I think the numbers are coming from get_progress() function in line 3864 of tagcache.c

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.

alsaf commented on 2007-03-11 11:56

I repeated tests again with Load to Ram yes & directory cache set to no before intitalising database and at end the progress was 144%.

I then did test with Load to Ram no & directory cache set to yes before initalising database and at end the progress was 97%.

alsaf commented on 2007-03-12 17:59

I may be picking this up wrong but the progress is a percentage of database entries over number of directory entries (files plus folders) This is from the line 3895 in tagcache.c

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?

Just ran through the recipe on the e200 w/ r16929 and got “2197% (2417 entries)”.

CFP commented on 2008-10-03 20:30

I think this task is related to  FS#8982  (Database update progress stuck to -1%) :

The debug menu is for developers and is not supposed to provide helpful informations for normal users ;)


Available keyboard shortcuts


Task Details

Task Editing