(Yet another) The iTunes Library file cannot be saved
I've seen variations of this for several years, on both Mac & Windows and numerous versions of iTunes, but have something new to ask/add:
I've recently been updating the comments on my m4a/mp3 library using three external apps to add dynamic range, lyrics and key information. Some of this information wasn't immediately displayed in iTunes, so I set to forcing iTunes to read this info with a simple .UpdateInfoFromFile operation for all items in the iTunesApp.BrowserWindow.SelectedTracks collection. Now if I do this on batches that are greater than 1500 tracks, iTunes crashes with a 'The iTunes Library file cannot be saved' error and fails to save the amendments; however, if I keep the batches smaller, then I am successful as long as I close iTunes after each batch - trying to do two batches of 1200 in a row seems to effectively act as if I'm doing 2400 (for example). Generally iTunes is handling my library fairly well, though it does occasionally irretrievably delete the odd track (that cannot be found with the likes of Recuva) when synching to my iPod Classic, so it is backed-up regularly - but that's another issue.
Now, I've been watching what iTunes is doing with Windows Resource Monitor, and I can see that it is successfully reading/writing tmp files in the library's location, my pagefile.sys, the C:\Windows\SysWoW64, the Mft and in my AppData folder, so it appears to have sufficient privileges where required, but I have yet to catch it attempting to do anything specific when it fails, and I rather suspect that it is more related to iTunes inability to cope with the size of the request (or subsequent requests). I may well run ProcMon.exe to see if I can spot anything further.
Some details: Windows 10 Home 64-bit and iTunes 10.7.0.21 (the last decent iTunes before Apple really set about ruining the UI without actually adding any benefits whatsoever IMHO) and I've got 500GB of space on my Music drive and 70GB in my OS drive, and 32GB of RAM.
So, any clues? Am I wasting my time trying to find the root cause, as it's a failing of iTunes itself, and should I just persevere with doing things in smaller chunks?
One other thought: am I programmatically able to force iTunes to save its library, i.e. to emulate the shutdown process, every 1000 amendments?