Rockbox Technical Forums

Support and General Use => Audio Playback, Database and Playlists => Topic started by: Pommes on January 18, 2022, 04:14:00 AM

Title: Ipod Classic Iflash Database
Post by: Pommes on January 18, 2022, 04:14:00 AM
Dear Forum,
as many of you, i often have troubles building the database on Ipod classic with Iflash adapter.
I just built an 2tb Ipod classic with Iflash quad and Rockbox.
I did many attempts to build the database on the ipod, they all failed.
I tried Rockbox stable 3.15, i tried some daily biulds based on c62c323ebc and it always failed at some point.
Then i copied an older Installation from another ipod based on 88a50ab104 and with that the building of the database worked flawlessly.
Can anyone please confirm, that the release 88a50ab104 has some kind of code which works better than the other releases?
Maybe this could be hint for the developers here to finally get Rockbox working with Iflash adapters.

And i found out about some differences in the Database between stable 3.15 and newer dev builds.
The database files, which i used to copy between my Ipods are not compatible between 3.15 and newer builds.

Thank you
Title: Re: Ipod Classic Iflash Database
Post by: Frankenpod on January 18, 2022, 05:21:43 AM
I dunno, I've lost track of the changes in the database structure.  I used to build it with the simulator, and that worked fine (except for when Daylight Saving Time started or ended, when it would decide everything had changed and insist on rebuilding the entire thing).  But recently there were some changes to developoment versions of rockbox involving removing "Album Artist" category and then putting it back again, and that seems to have caused some problems (I guess because it meant the simulator version of rockbox had a different database structure to the version on the ipod), so I haven't bothered building the database recently.
Title: Re: Ipod Classic Iflash Database
Post by: amachronic on January 18, 2022, 08:39:37 AM
There weren't any changes between those two versions which should've affected the database. Is there any kind of error message when it fails?
Title: Re: Ipod Classic Iflash Database
Post by: Pommes on January 18, 2022, 09:04:06 AM
No error message at all, it just stucks at committing Database 1/10.
When i access the database files, there is a large database temp file.
Maybe it was just random luck, that it was able to finish the database with 88a50ab104
Title: Re: Ipod Classic Iflash Database
Post by: saratoga on January 18, 2022, 10:21:02 AM
Corruption with the older stable builds is due to the disk not accurately reporting when it has finished writing and so being powered down too early. If you're continually hammering the disk you might get lucky and finish the database build before it powers down and corrupts something. From the 100000 reports of people trying this, you'll probably find that if you use the player for a while that the files on it are gradually corrupted by day to day use.

I'm surprised that you couldn't build the database with the current build. Lots of people have reported that the iflash adapters now work pretty reliably. Still I think it's probably a lot safer to run the newer builds.
Title: Re: Ipod Classic Iflash Database
Post by: Pommes on January 18, 2022, 11:22:53 AM
Actually yes, i think i was playing music when i build the database, so it didnt turn off, maybe.
I have been using Rockbox for some years now, and i didnt have a single music file corrupted, only database issues so far.
i reorganized all my files by genre and albumartist, so i can browse my library very well with the fileexplorer, i only use the database for searching.
I think i will stick with 88a50ab104 for now, it is from december 2021, so pretty new.
Title: Re: Ipod Classic Iflash Database
Post by: amachronic on January 18, 2022, 02:55:48 PM
This may not be related to the iflash adapter after all. I took a look at the database code and found a pretty major bug: playing music, or doing anything that triggers memory allocation like looking at a playlist, could corrupt the database commit. I just pushed a fix so you can try the latest build here once its built - https://build.rockbox.org/
Title: Re: Ipod Classic Iflash Database
Post by: Pommes on January 20, 2022, 03:29:20 AM
I just tried the latest daily  release, now it is working flawlessly to build the database. Thank you very much
Title: Re: Ipod Classic Iflash Database
Post by: Frankenpod on January 22, 2022, 06:46:03 AM
Same here - latest release seems to allow successful build of database on all my iflash ipods.
(No longer need to use the simulator to do it - another long-standing issue resolved, hurrah!)

(Now I just need to make a build with increased plug-in memory buffer for ipod classic targets, in the hope of being finally able to get coverflow database to build.)
Title: Re: Ipod Classic Iflash Database
Post by: Pommes on January 22, 2022, 07:58:49 AM
Yes, indeed very nice. But I was not able to update the database after adding new files. Did you ever successfully update the database on iPod? Or do you think it is better just to rebuild from scratch, once you have added more files?
Title: Re: Ipod Classic Iflash Database
Post by: Frankenpod on January 22, 2022, 09:25:37 AM
Well I just updated the database on several flash-modded ipods (after installing the lastest dev release on them).  Not entirely sure how much I've changed on them since the database was list built, or even if they all had a database built before at all - if there's no database then I think 'update' just initializes.  Seemed to work on all of them.
It might depend on how 'broken' the previous build of the database was - if it was seriously non-functional before, updating it might not work, might have to manually delete the old broken files first.
Title: Re: Ipod Classic Iflash Database
Post by: doctorjuggles on February 27, 2022, 05:05:41 PM
I just tried the latest daily  release, now it is working flawlessly to build the database. Thank you very much

Would you mind if I asked which release?
I'm asking because I've had the same issue (first time I'm ever messing with Rockbox so it's entirely likely I've done something silly).
Anyway, I didn't switch anything off - once I had the tracks all loaded, I clicked "Yes" on the database build and left it
Came back and it was stuck on the same "Committing Database 1/9" screen. Wouldn't move on from there no matter what (I left it overnight).

Also - if I update my release - will it overwrite all of my music files? (Takes days to load 'em all on through that old USB connection!)

Thanks
Title: Re: Ipod Classic Iflash Database
Post by: Pommes on February 27, 2022, 05:50:17 PM
I just built a new iPod with the daily release of 24 February, so just take the latest daily release. You can just over install it on your existing rockbox. Your media files will not be deleted. You should delete all existing database files in your hidden rock box folder, there will be probably  database.tmp  files from your last try, so delete these. and then you can try it again to build the database.
In the past I had problems with the database when loaded to ram, so you should disable the data base to ram feature.
I also had problems when using directory cache, so probably you should disable this one too.
And maybe you should check your installation for corruption issues before starting, on windows it is CHKDSK /F , on Mac you can just click repair disk. You can Google those if you are not familiar.
Title: Re: Ipod Classic Iflash Database
Post by: doctorjuggles on February 27, 2022, 05:53:57 PM
Thanks Pommes - I'm loading the files onto the iPod again (gonna take another 16 hours) but once that's done I'll give it a try before I build the database. :)
Title: Re: Ipod Classic Iflash Database
Post by: Pommes on February 27, 2022, 05:57:52 PM
As I said, usually you do not have to re-copy your music, your music is not touched when you reinstall rock box.
Title: Re: Ipod Classic Iflash Database
Post by: doctorjuggles on February 27, 2022, 06:09:54 PM
As I said, usually you do not have to re-copy your music, your music is not touched when you reinstall rock box.

Yeah, understood. Unfortunately I was unable to recover the previous build - once it was stuck in the "1/9 Committed" loop nothing would bring it out. Once I was able to find a way to force my PC to see it again, I'd done something to reset it to only show 128gb so I think I forced it into an apple recovery point. Meaning I had to start all over again. So I'm half way through the process of loading everything up and then I'll use the utility tool to load the latest release.
Following that, I'll follow all your helpful points on settings too - thank you for those  :D
Title: Re: Ipod Classic Iflash Database
Post by: Frankenpod on February 28, 2022, 07:21:39 AM
Yeah, understood. Unfortunately I was unable to recover the previous build - once it was stuck in the "1/9 Committed" loop nothing would bring it out. Once I was able to find a way to force my PC to see it again, I'd done something to reset it to only show 128gb so I think I forced it into an apple recovery point. Meaning I had to start all over again. So I'm half way through the process of loading everything up and then I'll use the utility tool to load the latest release.
Following that, I'll follow all your helpful points on settings too - thank you for those  :D

That mention of "only showing 128gb" makes me wonder if you are using a 6th gen classic and a flash mod?
Title: Re: Ipod Classic Iflash Database
Post by: doctorjuggles on February 28, 2022, 07:31:35 AM
Yeah, understood. Unfortunately I was unable to recover the previous build - once it was stuck in the "1/9 Committed" loop nothing would bring it out. Once I was able to find a way to force my PC to see it again, I'd done something to reset it to only show 128gb so I think I forced it into an apple recovery point. Meaning I had to start all over again. So I'm half way through the process of loading everything up and then I'll use the utility tool to load the latest release.
Following that, I'll follow all your helpful points on settings too - thank you for those  :D

That mention of "only showing 128gb" makes me wonder if you are using a 6th gen classic and a flash mod?

Yes - it's a 6th gen 160gb and I have an iFlash Quad