GNOME Bugzilla – Bug 564503
Banshee/iPod-Sharp fails to save iPod database
Last modified: 2009-06-04 06:31:37 UTC
Please describe the problem: I am synchronizing my Banshee library (mostly FLAC files) to my clean iPod Classic 120GB (Black). Every time Banshee tries to do a sync job, I'm told via debug output that the database was not saved: [Warn 13:00:43.937] Failed to save iPod database - Object reference not set to an instance of an object (in `ipod-sharp') at IPod.ImageNameRecord.SetData (System.IO.Stream stream, System.Byte[] data, Int32 offset) [0x00020] in /var/tmp/portage/dev-dotnet/ipod-sharp-0.8.1/work/ipod-sharp-0.8.1/src/PhotoDatabase.cs:748 at IPod.ImageNameRecord.SetData (System.IO.Stream stream, System.Byte[] data) [0x00000] in /var/tmp/portage/dev-dotnet/ipod-sharp-0.8.1/work/ipod-sharp-0.8.1/src/PhotoDatabase.cs:738 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) [0x00142] in /var/tmp/portage/dev-dotnet/ipod-sharp-0.8.1/work/ipod-sharp-0.8.1/src/PhotoDatabase.cs:1387 at IPod.PhotoDatabase.SaveThumbnails () [0x0009d] in /var/tmp/portage/dev-dotnet/ipod-sharp-0.8.1/work/ipod-sharp-0.8.1/src/PhotoDatabase.cs:1308 at IPod.PhotoDatabase.Save () [0x0003a] in /var/tmp/portage/dev-dotnet/ipod-sharp-0.8.1/work/ipod-sharp-0.8.1/src/PhotoDatabase.cs:1101 Failed to save database (in `ipod-sharp') at IPod.PhotoDatabase.Save () [0x001aa] in /var/tmp/portage/dev-dotnet/ipod-sharp-0.8.1/work/ipod-sharp-0.8.1/src/PhotoDatabase.cs:1137 at IPod.TrackDatabase.Save () [0x0026b] in /var/tmp/portage/dev-dotnet/ipod-sharp-0.8.1/work/ipod-sharp-0.8.1/src/TrackDatabase.cs:2566 Failed to save database (in `ipod-sharp') at IPod.TrackDatabase.Save () [0x00390] in /var/tmp/portage/dev-dotnet/ipod-sharp-0.8.1/work/ipod-sharp-0.8.1/src/TrackDatabase.cs:2629 at IPod.Device.Save () [0x0000b] in /var/tmp/portage/dev-dotnet/ipod-sharp-0.8.1/work/ipod-sharp-0.8.1/src/Device.cs:282 at Banshee.Dap.Ipod.IpodSource.PerformSyncThreadCycle () [0x002d2] in /var/tmp/portage/media-sound/banshee-1.4.1-r3/work/banshee-1-1.4.1/src/Dap/Banshee.Dap.Ipod/Banshee.Dap.Ipod/IpodSource.cs:619 Steps to reproduce: Actual results: Expected results: Does this happen every time? Yes Other information:
Also got this output sometimes: [Warn 15:08:16.067] 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) [0x000b7] in /var/tmp/portage/dev-lang/mono-2.0.1/work/mono-2.0.1/mcs/class/corlib/System.IO/FileStream.cs:803 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) [0x001ca] in /var/tmp/portage/dev-dotnet/ipod-sharp-0.8.1/work/ipod-sharp-0.8.1/src/PhotoDatabase.cs:1401 at IPod.PhotoDatabase.SaveThumbnails () [0x0009d] in /var/tmp/portage/dev-dotnet/ipod-sharp-0.8.1/work/ipod-sharp-0.8.1/src/PhotoDatabase.cs:1308 at IPod.PhotoDatabase.Save () [0x0003a] in /var/tmp/portage/dev-dotnet/ipod-sharp-0.8.1/work/ipod-sharp-0.8.1/src/PhotoDatabase.cs:1101 Failed to save database (in `ipod-sharp') at IPod.PhotoDatabase.Save () [0x001aa] in /var/tmp/portage/dev-dotnet/ipod-sharp-0.8.1/work/ipod-sharp-0.8.1/src/PhotoDatabase.cs:1137 at IPod.TrackDatabase.Save () [0x0026b] in /var/tmp/portage/dev-dotnet/ipod-sharp-0.8.1/work/ipod-sharp-0.8.1/src/TrackDatabase.cs:2566 Failed to save database (in `ipod-sharp') at IPod.TrackDatabase.Save () [0x00390] in /var/tmp/portage/dev-dotnet/ipod-sharp-0.8.1/work/ipod-sharp-0.8.1/src/TrackDatabase.cs:2629 at IPod.Device.Save () [0x0000b] in /var/tmp/portage/dev-dotnet/ipod-sharp-0.8.1/work/ipod-sharp-0.8.1/src/Device.cs:282 at Banshee.Dap.Ipod.IpodSource.PerformSyncThreadCycle () [0x002d2] in /var/tmp/portage/media-sound/banshee-1.4.1-r3/work/banshee-1-1.4.1/src/Dap/Banshee.Dap.Ipod/Banshee.Dap.Ipod/IpodSource.cs:619
If I were to guess. I bet the PhotoDatabase can't be written because it is too big. Does iPod-Sharp split the database files if they get too big? If a part of the PhotoDatabase is getting larger than 4GB and is being written to a FAT32 iPod, it will fail. Bug 555329 could help play a part in this but the best solution would be to split the database files if they get too big (if this doesn't happen already). I believe libgpod splits at 256MB if I'm not mistaken.
Nicholas, could you apply the patch in bug 578701 to ipod-sharp and check if that fixes the issue for you? Thanks.
This problem was inconsistent and I don't know if I can reproduce it again. It might be bug 578701 but I can't say for sure, it has a different error. I'll close this bug and reopen it if I experience this again. Most of my iPod problems are bug 555329.