Rockbox Technical Forums

Rockbox General => Rockbox General Discussion => Topic started by: wonderfibre on November 02, 2006, 11:27:23 AM

Title: x5 tag cache nightmare
Post by: wonderfibre on November 02, 2006, 11:27:23 AM
The tag cache isn't working anymore on my X5L 30 :(

It constantly states 'tag cache not ready'

the debug page says:

=
initialized: Yes
DB Ready: No
RAM Cache: No
RAM: 0/0 B
Progress: -1% (0 entries)
Commit step: 0
Commit delayed: No
=

directory caching and load to RAM are switched on. nothing happens when i select 'update now'.

i've tried deleted the rockbox.iaudio file & the .rockbox folder and reinstalling it all but to no avail :(
i'm dualbooting using the power button short=rockbox & long=cowon - would this affect it?

is there a setting file which i'm missing? when i deleted rockbox and reinstalled it, my settings seemed to carry over!

edit: also - is it possible to do a 'factory settings' reset of the X5?
Title: Re: x5 tag cache nightmare
Post by: xlarge on November 02, 2006, 01:08:33 PM
No problem,
reset settings under the menu - system settings - reset settings
delete all tagcache files under .rockbox folder.
Upgrade to the latest build (it works on mine, no worries).

boot rockbox, turn tagcache on and then let it finish it's scan through your files, reboot the x5 again let it lay for a couple of minutes comitting stuff...

That's my recipie every time tagcache gives me a headache (haven't had any problems for a while now though).

(the dualboot does not affect tagcache)

Factory settings? if you are talking about rockbox all you have to do is "reset settings", if you are talking about cowon original firmware you just have to flash the player with a cowon firmware and it's back to ... yeah what ever we should call the original firmware...
Title: Re: x5 tag cache nightmare
Post by: AlexP on November 02, 2006, 01:11:18 PM
is there a setting file which i'm missing? when i deleted rockbox and reinstalled it, my settings seemed to carry over!

Settings are stored on a disk sector, not in a file, so deleting/formating won't reset settings.  Do it either through the menu or with whatever the startup button is for X5 (It's rec for H1x0).
Title: Re: x5 tag cache nightmare
Post by: wonderfibre on November 02, 2006, 03:14:11 PM
hoo-effing-ray!

thanks guys! all seems to be functional again :D
Title: Re: x5 tag cache nightmare
Post by: wonderfibre on November 02, 2006, 04:50:58 PM
scratch that. things have gone again!
all i (think i) did was move an album! i'll keep playing around with it

edit:
i follow this routine and it still doesn't work!

1) reset settings in system settings
2) delete rockbox.iaudio & the .rockbox folder
3) copy over latest build
4) boot up, initialize tagcache
5) turn on auto update and load to RAM
6) turn on directory cache
7) reboot
8) tag cache not ready

:(
Title: Re: x5 tag cache nightmare
Post by: wonderfibre on November 03, 2006, 03:40:05 PM
Do it ... with whatever the startup button is for X5 (It's rec for H1x0).

i'm not sure what you mean? is the power button the 'startup button'?
Title: Re: x5 tag cache nightmare
Post by: AlexP on November 03, 2006, 04:00:40 PM
i'm not sure what you mean? is the power button the 'startup button'?

Sorry, I wasn't very clear at all!  Once you have pressed play (to turn the unit on), you hold record to reset settings on startup with the H1x0. I think there is a similar button combination for X5, but I don't know what it is.  It is probably in the manual.
Title: Re: x5 tag cache nightmare
Post by: xlarge on November 03, 2006, 04:08:09 PM
Yep, once you've pressed power press and hold rec-button to reset settings.
Title: Re: x5 tag cache nightmare
Post by: wonderfibre on November 03, 2006, 05:35:22 PM
right. i'm now back up and running! albeit with only 2 albums on my player!
I *think* i've nailed the problem down to a problematic file in my music collection but i've no idea which one!!

are there any particular file extensions (not just music files) which would cause a problem? would a badly encoded file cause Rockbox to fall over?
Title: Re: x5 tag cache nightmare
Post by: nls on November 03, 2006, 11:31:33 PM
There have been reports of tagcache failing initialization due to files with corrupt meta data. And it is quite possible that there are still problems. To narrow it down add a little piece of your collection at a time and try again until you have found the offending file and then post a bug report in the tracker and keep the file if devs would like to see it.
One problem that I think is known is that init might fail on files with a patch longer than 256 cahrs so check path and file names for any overly long names.
Title: Re: x5 tag cache nightmare
Post by: Llorean on November 03, 2006, 03:08:00 PM
A suggestiong could be a rought binary search. Add half your collection, if that half works, add half of the remaining half. If it doesn't, remove half (or remove it all and then re-add half of the first half.) Keep splitting until "Half" means just one song.
Title: Re: x5 tag cache nightmare
Post by: Yotto on November 03, 2006, 05:55:07 PM
I'm having Tagcache problems, and I'm preparing this exact thing, hopefully for this weekend, but at least for this week.

Would someone want the offending mp3 to look at when I find it?
Title: Re: x5 tag cache nightmare
Post by: golemB on November 06, 2006, 01:11:21 AM
Yes, is there any way to make tagcache more robust?  

At minimum, I'd love to see binaries that one can run on a PC (Win32, Mac, Linux, etc.) where it would be much easier to debug.  Also, it should log some kind of error when it isn't happy.  Finally, it should really be able to ignore problematic tag entries and just move on to other files.

The "incremental loading" method isn't feasible for me; I have a 60GB x5 and not enough free disk space on my PC to experiment (not to mention time).   :-\

As an aside, when I try to view my files by tags, it has two overlapping error messages, and only the one about Tagcache not being ready is readable.  What is the lower error message?

(BTW, I'd be happy to try and debug the tag cache code if someone can point me to it.)
Title: Re: x5 tag cache nightmare
Post by: the_house on November 06, 2006, 02:48:50 AM
I just spent a fair amount of time trying to track down an offending file, that consistently causes problems with tag cache.   Such a file does not seem to exist in my collection.  It doesn't seem to matter much which files are on the player.  With a small to moderate number of mp3's it seems almost random whether there's going to be a problem or not.  With increasing number the chances of  tag cache successfully committing approaches zero--I have yet to have success with caching more than ~4700 mp3s.  There do seem to be files that have a higher probability of failure than others, but it's hard to tell if it's just a coincidence, and there's definitely not a file that I've found that tag cache consistently gets hung up on.

I should note that this is on a recently purchased 60GB X5.  Also, I had no trouble using tag cache on an almost identical collection a while ago (6 months to a year?) on my old archos jukebox recorder.  That collection was actually bigger than anything I've tried on the iAudio yet (I had an 80GB hard drive in it), and all the files that are new since then have been successfully cached on the X5 at one point.    So it seems that either there are new problems/bugs in rockbox, or there's something particular with the X5 that causes problems.  I haven't done enough research on who else is having these problems to know if it's the latter.

I probably have the old rockbox version that was on my Archos around here somewhere, so I can see if that works better, but I've already spent way to much time on this, so it will have to be later if at all.

I hope this was somewhat helpful.
Title: Re: x5 tag cache nightmare
Post by: wonderfibre on November 06, 2006, 04:59:35 AM
One problem that I think is known is that init might fail on files with a patch longer than 256 cahrs so check path and file names for any overly long names.

that could explain my problem! i've successfully copied over tracks bit by bit over the weekend (very frustrating having to copy them over, disconnect, boot up, update cache etc etc) but there's one artist who has very long song names which I haven't copied over yet (but i know I had before when it didn't work).

I'll copy them over tonight and see what happens.
Title: Re: x5 tag cache nightmare
Post by: Yotto on November 06, 2006, 07:45:26 AM
I wiped my drive completely, reinstalled the latest build of Rockbox (It would be Friday night's build) and copied the the music back several letters at a time (I have my artists within folders of the letter their name starts with, lest I have too many directories to display in my root music folder).

0 problems.  I now have a working tagcache installation.
Title: Re: x5 tag cache nightmare
Post by: the_house on November 06, 2006, 06:50:37 PM
Update:  mp3's with long filenames do seem to be the culprits.  It's still true that the offending files do not cause a failure 100% of the time, but shortening the filenames seems to make the problem go away (so far.  I still haven't found all the offending files in my entire collection).  Also, it's still true that I successfully cached all of these mp3s at some time in the past on my Archos, so rockbox does seem to be a bit more temperamental either now compared to then, or on the X5 compared to the jukebox recorder.
Title: Re: x5 tag cache nightmare
Post by: wonderfibre on November 07, 2006, 11:57:47 AM
what's the easiest way then to find files on my computer which are longer than 256 (or whatever) characters?
Title: Re: x5 tag cache nightmare
Post by: Sherv on November 07, 2006, 03:30:51 PM
Hmm, I'm still having issues with Tagcache crapping out on my AJBR V2 and I have files with ultra long names (gotta love the Red Sparowes for that). What's the limit for tagcache, I'd love to mess around and see if that fixes it...
Title: Re: x5 tag cache nightmare
Post by: Yotto on November 07, 2006, 04:32:06 PM
Is it 256 with full path, or 256 just for the filename?

If filename, in dos:

dir /s | sort /+275
or
dir /s | sort /+275|more

will show you the files.  They'll be at the very top (hence the |more to stop it at the beginning) or very bottom (so you want to see the end, no |more).  It won't give the path, but you can then search out the specific files with another dir /s for their exact names.

(I'm guessing on the number, it's 256 plus the offset, which IIRC is 20, so I subtracted one to be on the safe side)

If it's full path,

attrib /s |sort /+256
or
attrib /s |sort /+256|more

(same as above, only this time no offset and you'll know the full path)
Title: Re: x5 tag cache nightmare
Post by: wonderfibre on November 08, 2006, 08:15:56 AM
Hmm, I'm still having issues with Tagcache crapping out on my AJBR V2 and I have files with ultra long names (gotta love the Red Sparowes for that).

damned Red Sparowes were the ones screwing up my tagcache too! everything seems to be working ok now.......