GNOME Bugzilla – Bug 584860
Songs fail to be added to iPod when album art database grows large.
Last modified: 2020-03-17 08:37:38 UTC
Extracted from bug 555329. After adding music to an iPod, the album art database grows large. Once any file in the album art database exceeds 2GB, a variable (signed 32bit integer) that stores the size of the file will overflow and become negative causing "Failed to save iPod database - Argument is out of range. Parameter name: Length is less than 0 (in `mscorlib')". This prevents both the album art database to be written and the music database to be written. This problem can be solved by chopping the files containing a particular artwork format in to smaller pieces (eg. F1060_1.ithmb F1060_2.ithmb F1060_3.ithmb). Both iTunes and libgpod do this. A quick hack to get support for 4GB files instead of 2GB files is to use a 64bit integer for storing file size like the SetLength asks for instead of a 32bit integer. This gives us a 4GB limit because FAT32 has a 4GB upper limit. However, this does not solve the underlying problem. See comment 13 of bug 555329 for a stack trace of the problem. Compounded with bug 555329, it is basically the case that anyone with an iPod of capacity ~8GB or higher is unable to use any of that extra capacity.
I'd like to confirm this long-waiting-your-attention bug. I got this error when I tried to delete songs from ipod. My info: $ uname -a Linux astar-desktop 2.6.32-15-generic #22-Ubuntu SMP Tue Mar 2 02:23:29 UTC 2010 x86_64 GNU/Linux $ apt-cache policy banshee banshee: Установлен: 1.5.4+git20100222.r1.c519a80-0ubuntu1+lucid iPod Classic 80Gb Black (xB147) I had ~7000 tracks (~59Gb) with covers on iPod, "synced" there by Banshee (unsuccessful, cause it copied all mp3 files, but hadn't create database on it. I'll fill another bug for it) I had 2Gb+ artwork db: $ ls -l /media/IPOD/iPod_Control/Artwork/ | grep ithmb -rwxr-xr-x 1 astar astar 2571244800 2010-03-05 21:19 F1055_1.ithmb In the ipod's "Errors" window it says that there is no free space on device, and ask to free it manually (sorry, I can't write exact message - I use ru_RU locale) Callstack: [Warn 21:19:19.093] Failed to save iPod database - Argument is out of range. Parameter name: value is less than 0 (in `mscorlib') at System.IO.FileStream.SetLength (Int64 value) [0x00000] at IPod.PhotoDatabase.SaveThumbnails (System.Collections.Generic.List`1 existingNames, System.Collections.Generic.List`1 newNames, System.Collections.Generic.List`1 removedNames, IPod.ArtworkFormat format) [0x00000] at IPod.PhotoDatabase.SaveThumbnails () [0x00000] at IPod.PhotoDatabase.Save () [0x00000] Failed to save database (in `ipod-sharp') at IPod.PhotoDatabase.Save () [0x00000] at IPod.TrackDatabase.Save () [0x00000] Failed to save database (in `ipod-sharp') at IPod.TrackDatabase.Save () [0x00000] at IPod.Device.Save () [0x00000] at Banshee.Dap.Ipod.IpodSource.PerformSyncThreadCycle () [0x00000]
One more repro. 1. I turned manual syncing. 2. Started to add tracks in small bunches (500-900 tracks at once), doing sync and eject. 3. Keep watching for artwork folder. 4. When one of .ithmb files became larger than 2.2Gb - I got exactly the same error. $ ls -l /media/IPOD/iPod_Control/Artwork/ | grep ithmb -rwxr-xr-x 1 astar astar 646771584 2010-03-06 08:37 F1055_1.ithmb -rwxr-xr-x 1 astar astar 2227966848 2010-03-06 08:37 F1060_1.ithmb -rwxr-xr-x 1 astar astar 401256704 2010-03-06 08:00 F1061_1.ithmb -rwxr-xr-x 1 astar astar 646804352 2010-03-06 08:37 F1068_1.ithmb It's definitely uint32 overflow problem. Hope, will be fixed for upcoming release.
Created attachment 156537 [details] Full debug output of 1.5.5 with sync
I can confirm this error: [Warn 02:44:45.971] Failed to save iPod database - Argument is out of range. Parameter name: value is less than 0 (in `mscorlib') at System.IO.FileStream.SetLength (Int64 value) [0x00000] at IPod.PhotoDatabase.SaveThumbnails (System.Collections.Generic.List`1 existingNames, System.Collections.Generic.List`1 newNames, System.Collections.Generic.List`1 removedNames, IPod.ArtworkFormat format) [0x00000] at IPod.PhotoDatabase.SaveThumbnails () [0x00000] at IPod.PhotoDatabase.Save () [0x00000] Failed to save database (in `ipod-sharp') at IPod.PhotoDatabase.Save () [0x00000] at IPod.TrackDatabase.Save () [0x00000] Failed to save database (in `ipod-sharp') at IPod.TrackDatabase.Save () [0x00000] at IPod.Device.Save () [0x00000] at Banshee.Dap.Ipod.IpodSource.PerformSyncThreadCycle () [0x00000] I have over 6,000 MP2 files, so I can believe it's some sort of size limit. podsleuth: iPod Found [/org/freedesktop/Hal/devices/volume_uuid_3141_5926] * Generic Device Properties - Block Device: /dev/sdc1 - Mount Point: /media/IPOD - Read Only: False - Volume Size: 120 GiB * General iPod Properties - Serial Number: 8K845WMH2C7 - Firewire ID: 000A27001394597F - Firmware Version: 2.0.1 - iPod_Control: /iPod_Control - Extra Capabilities: podcast - Production Info: 42281 in November, 2008 from factory 8K * iPod Model Properties - Device Class: classic - Generation: 7 * Image Types Supported - Photos: True - Album Art: True - Chapter Images: True Full debug output is attached. NOTE: I was originally having this problem: [Warn 01:38:12.608] Failed to save iPod database - Access to the path "/media/IPOD/iPod_Control/iTunes/iTunesDB" or "/media/IPOD/iPod_Control/iTunes/iTunesDB.bak" is denied. (in `mscorlib') at System.IO.File.Copy (System.String sourceFileName, System.String destFileName, Boolean overwrite) [0x00000] at IPod.TrackDatabase.Save () [0x00000] at IPod.Device.Save () [0x00000] at Banshee.Dap.Ipod.IpodSource.PerformSyncThreadCycle () [0x00000] then I updated from 1.5.4 to 1.5.5, and got the above error, and others (again, see attached log above)
Any chance of somebody fixing this? Or at least looking into it, or marking it confirmed? I am dead in the water until this is fixed. This is a fatal error, since I can't sync with Banshee at all.
David, try my workaround: 1. remove all music/art from ipod (probably with gtkpod) 2. do not forget about lost mp3 on ipod, due banshee sync fail (you can remove them with nautilus) 3. create dynamic playlist with songs limit in banshee (I use 3100 songs) 4. sync ipod with this playlist automatically yes, this it dirty trick. yes you won't have all music you can. But it makes life easier.
I'm not very fond of this option at all, but I tried removing the cover art and couldn't figure out how to do it. When I select multiple MP3s in gtkpod, the remove cover art is greyed out. I also tried EasyTag, which said it was doing it, but the MP3s are the same size as they were before. I may decide to give up cover art, but I'm not going to do a partial sync. I bought a 120GB iPod for a reason! I'm unhappy that this is not going to be fixed in the next release, but I would feel a little better if it were at least be considered "confirmed".
Banshee is not under active development anymore and had its last code changes more than three years ago. Its codebase has been archived. Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect reality. Please feel free to reopen this ticket (or rather transfer the project to GNOME Gitlab, as GNOME Bugzilla is being shut down) if anyone takes the responsibility for active development again. See https://gitlab.gnome.org/Infrastructure/Infrastructure/issues/264 for more info.