GNOME Bugzilla – Bug 578701
Banshee fails to synchronise with an iPod Classic with high cpu usage
Last modified: 2009-07-08 18:26:27 UTC
Please describe the problem: Trying to sync with an iPod Classic (80GB) and banshee fails to sync the audio files and ends up filling the iPod with "other" files. All music is in .mp3 format with 6675 tracks totalling 39.1GB. Also when syncing banshee uses up all cpu with top reporting 140%+ cpu usage. Steps to reproduce: 1. Connect iPod Classic 2. From banshee menu select sync ipod 3. Watch progress bar fill up till failure Actual results: As explained Expected results: I would expect all media to be synced - all music with correct metadata as displayed in banshee with all album art. Does this happen every time? Yes Other information: Output from running banshee from the command line: [Info 10:44:47.210] Sync calculated for Music Library: to add: 6675 items, remove 0 items; sync_src.cacheid = 629, to_add.cacheid = 661, to_remove.cacheid = 669 Sync calculated for Video Library: to add: 0 items, remove 0 items; sync_src.cacheid = 671, to_add.cacheid = 673, to_remove.cacheid = 681 Sync calculated for Podcasts: to add: 0 items, remove 0 items; sync_src.cacheid = 685, to_add.cacheid = 689, to_remove.cacheid = 697 [Info 10:45:37.365] Syncing Music Library, in main thread? False [Info 11:45:43.603] Syncing Video Library, in main thread? False [Info 11:45:44.163] Syncing Podcasts, in main thread? False [Warn 12:50:17.312] 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] [Warn 12:50:46.634] 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] [Info 14:23:43.668] Syncing Music Library, in main thread? False [Info 14:23:47.188] Syncing Video Library, in main thread? False [Info 14:23:47.905] Syncing Podcasts, in main thread? False [Warn 14:23:59.008] 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) [0x00000] at IPod.ImageNameRecord.SetData (System.IO.Stream stream, System.Byte[] data) [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]
It seems the bug is in ipod-sharp, not Banshee. Could you try to test with Banshee 1.4.3 (which is the latest version and I think it uses a newer ipod-sharp version)? BTW, it would help also to try to determine if the sync also fails for a smaller amount of songs, could you try to test that as well and report the minimum number of them for it to fail? Also please provide your Mono version (pursue 'mono --version' in a console). Thanks.
I tried to sync the music manually by batch jobbing the music and transferring ~2GB at a time - long and painful :) Out of the 39GB only 14GB was transferred successfully. Currently my Mono is: andrew@fveult02:~> mono --version Mono JIT compiler version 2.0.1 (tarball) Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com TLS: __thread GC: Included Boehm (with typed GC) SIGSEGV: altstack Notifications: epoll Architecture: x86 Disabled: none I will upgrade mono and banshee and try again.
using Banshee 1.4.3 and Mono 2.4 i still get the issue: andrew@fveult02:~> mono --version Mono JIT compiler version 2.4 (tarball Fri Mar 27 22:00:37 UTC 2009) Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com TLS: __thread GC: Included Boehm (with typed GC) SIGSEGV: altstack Notifications: epoll Architecture: x86 Disabled: none andrew@fveult02:~> banshee-1 [Info 20:24:20.484] Running Banshee 1.4.3: [Mono:Community / openSUSE_11.1 (linux-gnu, i686) @ 2009-03-27 23:10:09 UTC] [Info 20:24:22.190] All services are started 1.510799s [Warn 20:24:22.965] Forcefully breaking out of RCS loop b/c change in total_width less than 1.0 [Info 20:24:23.301] nereid Client Started [Info 20:24:38.633] Sync calculated for Music Library: to add: 6675 items, remove 0 items; sync_src.cacheid = 585, to_add.cacheid = 593, to_remove.cacheid = 601 Sync calculated for Video Library: to add: 43 items, remove 0 items; sync_src.cacheid = 603, to_add.cacheid = 605, to_remove.cacheid = 613 Sync calculated for Podcasts: to add: 0 items, remove 0 items; sync_src.cacheid = 617, to_add.cacheid = 621, to_remove.cacheid = 629 [Info 20:27:11.343] Syncing Music Library, in main thread? False [Info 20:59:24.993] Syncing Video Library, in main thread? False [Info 20:59:45.881] Syncing Podcasts, in main thread? False [Warn 22:18:52.538] 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] The CPU gets spanked quite badly when adding tracks to the device: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 5690 andrew 20 0 162m 64m 23m S 176 3.3 4:01.03 banshee-1 I am trying to transfer the library in ~10GB chunks. I'll advise on how I get on.
I am only able to transfer a total of 20.1GB in 10GB batches. I was selecting 10GB, transferring it, ejecting the iPod, closing Banshee and then restarting the process.
By transferring 5GB chunks I'm able to get just over 25GB onto the iPod. It falls over when I try to go over 25GB :( I transferred the tracks in batches: Tracks - GB 847 - 5.2 918 - 5.0 764 - 5.0 854 - 5.0 869 - 5.0 833 - 5.0 This is very painful, slow and long; but worst is when it fails after spending ages doing it. Here are the outputs from trying to do the transfers: The first 5 batches- andrew@fveult02:~> banshee-1 [Info 12:22:20.247] Running Banshee 1.4.3: [Mono:Community / openSUSE_11.1 (linux-gnu, i686) @ 2009-03-27 23:10:09 UTC] [Info 12:22:21.821] All services are started 1.376992s [Warn 12:22:22.508] Forcefully breaking out of RCS loop b/c change in total_width less than 1.0 [Info 12:22:22.808] nereid Client Started [Info 12:22:25.530] Sync calculated for Music Library: to add: 6759 items, remove 0 items; sync_src.cacheid = 585, to_add.cacheid = 593, to_remove.cacheid = 601 Sync calculated for Video Library: to add: 43 items, remove 0 items; sync_src.cacheid = 603, to_add.cacheid = 605, to_remove.cacheid = 613 Sync calculated for Podcasts: to add: 0 items, remove 0 items; sync_src.cacheid = 617, to_add.cacheid = 621, to_remove.cacheid = 629 [Warn 12:22:43.806] Forcefully breaking out of RCS loop b/c change in total_width less than 1.0 [Info 12:52:58.932] Sync calculated for Music Library: to add: 5912 items, remove 0 items; sync_src.cacheid = 629, to_add.cacheid = 661, to_remove.cacheid = 669 Sync calculated for Video Library: to add: 43 items, remove 0 items; sync_src.cacheid = 671, to_add.cacheid = 673, to_remove.cacheid = 681 Sync calculated for Podcasts: to add: 0 items, remove 0 items; sync_src.cacheid = 685, to_add.cacheid = 689, to_remove.cacheid = 697 [Warn 12:59:04.659] Forcefully breaking out of RCS loop b/c change in total_width less than 1.0 [Info 13:38:52.611] Sync calculated for Music Library: to add: 4994 items, remove 0 items; sync_src.cacheid = 697, to_add.cacheid = 729, to_remove.cacheid = 737 Sync calculated for Video Library: to add: 43 items, remove 0 items; sync_src.cacheid = 739, to_add.cacheid = 741, to_remove.cacheid = 749 Sync calculated for Podcasts: to add: 0 items, remove 0 items; sync_src.cacheid = 753, to_add.cacheid = 757, to_remove.cacheid = 765 [Warn 13:41:17.890] Forcefully breaking out of RCS loop b/c change in total_width less than 1.0 [Warn 14:23:42.689] Forcefully breaking out of RCS loop b/c change in total_width less than 1.0 [Warn 14:24:23.526] Forcefully breaking out of RCS loop b/c change in total_width less than 1.0 [Warn 14:24:46.361] Forcefully breaking out of RCS loop b/c change in total_width less than 1.0 [Warn 14:25:27.860] Caught an exception - org.freedesktop.Hal.NoSuchDevice: No device with id /org/freedesktop/Hal/devices/temp/191 (in `NDesk.DBus.Proxies') at IDeviceProxy.PropertyExists (System.String ) [0x00000] at Hal.Device.PropertyExists (System.String key) [0x00000] at Hal.Device.get_IsVolume () [0x00000] at Banshee.HalBackend.Volume.Resolve (Banshee.HalBackend.BlockDevice parent, Hal.Manager manager, Hal.Device device) [0x00000] at Banshee.HalBackend.BlockDevice+<GetEnumerator>c__Iterator0.MoveNext () [0x00000] at Banshee.Dap.Ipod.PodSleuthDeviceProvider.GetCustomDevice[IDevice] (IDevice device) [0x00000] at Banshee.Hardware.HardwareManager.CastToCustomDevice[IDevice] (IDevice device) [0x00000] at Banshee.Hardware.HardwareManager.OnDeviceAdded (System.Object o, Banshee.Hardware.DeviceAddedArgs args) [0x00000] at Banshee.HalBackend.HardwareManager.OnDeviceAdded (IDevice device) [0x00000] at Banshee.HalBackend.HardwareManager.OnHalDeviceAdded (IDevice device) [0x00000] at Banshee.HalBackend.HardwareManager.OnHalDeviceAdded (System.Object o, Hal.DeviceAddedArgs args) [0x00000] [Info 14:26:25.326] Sync calculated for Music Library: to add: 4230 items, remove 0 items; sync_src.cacheid = 765, to_add.cacheid = 845, to_remove.cacheid = 853 Sync calculated for Video Library: to add: 43 items, remove 0 items; sync_src.cacheid = 855, to_add.cacheid = 857, to_remove.cacheid = 865 Sync calculated for Podcasts: to add: 0 items, remove 0 items; sync_src.cacheid = 869, to_add.cacheid = 873, to_remove.cacheid = 881 [Warn 14:41:49.884] Forcefully breaking out of RCS loop b/c change in total_width less than 1.0 [Info 15:42:36.184] Sync calculated for Music Library: to add: 3376 items, remove 0 items; sync_src.cacheid = 881, to_add.cacheid = 913, to_remove.cacheid = 921 Sync calculated for Video Library: to add: 43 items, remove 0 items; sync_src.cacheid = 923, to_add.cacheid = 925, to_remove.cacheid = 933 Sync calculated for Podcasts: to add: 0 items, remove 0 items; sync_src.cacheid = 937, to_add.cacheid = 941, to_remove.cacheid = 949 [Warn 16:46:24.910] 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] [Warn 16:54:16.691] Forcefully breaking out of RCS loop b/c change in total_width less than 1.0 [Warn 16:54:52.562] Caught an exception - org.freedesktop.Hal.NoSuchDevice: No device with id /org/freedesktop/Hal/devices/temp/207 (in `NDesk.DBus.Proxies') at IDeviceProxy.PropertyExists (System.String ) [0x00000] at Hal.Device.PropertyExists (System.String key) [0x00000] at Hal.Device.get_IsVolume () [0x00000] at Banshee.HalBackend.Volume.Resolve (Banshee.HalBackend.BlockDevice parent, Hal.Manager manager, Hal.Device device) [0x00000] at Banshee.HalBackend.BlockDevice+<GetEnumerator>c__Iterator0.MoveNext () [0x00000] at Banshee.Dap.Ipod.PodSleuthDeviceProvider.GetCustomDevice[IDevice] (IDevice device) [0x00000] at Banshee.Hardware.HardwareManager.CastToCustomDevice[IDevice] (IDevice device) [0x00000] at Banshee.Hardware.HardwareManager.OnDeviceAdded (System.Object o, Banshee.Hardware.DeviceAddedArgs args) [0x00000] at Banshee.HalBackend.HardwareManager.OnDeviceAdded (IDevice device) [0x00000] at Banshee.HalBackend.HardwareManager.OnHalDeviceAdded (IDevice device) [0x00000] at Banshee.HalBackend.HardwareManager.OnHalDeviceAdded (System.Object o, Hal.DeviceAddedArgs args) [0x00000] [Warn 16:55:07.882] Forcefully breaking out of RCS loop b/c change in total_width less than 1.0 [Warn 16:55:12.018] Forcefully breaking out of RCS loop b/c change in total_width less than 1.0 This is the last batch that failed - andrew@fveult02:~> banshee-1 [Info 17:05:58.830] Running Banshee 1.4.3: [Mono:Community / openSUSE_11.1 (linux-gnu, i686) @ 2009-03-27 23:10:09 UTC] [Info 17:06:22.369] All services are started 21.627259s [Warn 17:06:26.136] Forcefully breaking out of RCS loop b/c change in total_width less than 1.0 [Info 17:06:27.432] nereid Client Started [Warn 17:12:40.553] Caught an exception - org.freedesktop.Hal.NoSuchDevice: No device with id /org/freedesktop/Hal/devices/temp/223 (in `NDesk.DBus.Proxies') at IDeviceProxy.PropertyExists (System.String ) [0x00000] at Hal.Device.PropertyExists (System.String key) [0x00000] at Hal.Device.get_IsVolume () [0x00000] at Banshee.HalBackend.Volume.Resolve (Banshee.HalBackend.BlockDevice parent, Hal.Manager manager, Hal.Device device) [0x00000] at Banshee.HalBackend.BlockDevice+<GetEnumerator>c__Iterator0.MoveNext () [0x00000] at Banshee.Dap.Ipod.PodSleuthDeviceProvider.GetCustomDevice[IDevice] (IDevice device) [0x00000] at Banshee.Hardware.HardwareManager.CastToCustomDevice[IDevice] (IDevice device) [0x00000] at Banshee.Hardware.HardwareManager.OnDeviceAdded (System.Object o, Banshee.Hardware.DeviceAddedArgs args) [0x00000] at Banshee.HalBackend.HardwareManager.OnDeviceAdded (IDevice device) [0x00000] at Banshee.HalBackend.HardwareManager.OnHalDeviceAdded (IDevice device) [0x00000] at Banshee.HalBackend.HardwareManager.OnHalDeviceAdded (System.Object o, Hal.DeviceAddedArgs args) [0x00000] [Info 17:13:25.929] Sync calculated for Music Library: to add: 2469 items, remove 0 items; sync_src.cacheid = 585, to_add.cacheid = 593, to_remove.cacheid = 601 Sync calculated for Video Library: to add: 43 items, remove 0 items; sync_src.cacheid = 603, to_add.cacheid = 605, to_remove.cacheid = 613 Sync calculated for Podcasts: to add: 0 items, remove 0 items; sync_src.cacheid = 617, to_add.cacheid = 621, to_remove.cacheid = 629 [Warn 17:48:47.809] 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] [Warn 19:22:06.370] 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) [0x00000] at IPod.ImageNameRecord.SetData (System.IO.Stream stream, System.Byte[] data) [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] [Warn 19:22:52.160] Forcefully breaking out of RCS loop b/c change in total_width less than 1.0
Ok, that's really useful, looks like the problem is here: [Warn 16:46:24.910] 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]
Yeah, Andrew, it would be useful that you check-out ipod-sharp sources, and put some debug info in the SaveThumbnails method that is calling SetLength, to see which negative value is transmitting and when it's happening (maybe this is only happening in the transfer of one offending file, but we need to find which one), using Console.WriteLine() for example. Then you would need to compile and install that version over the "official" one, and test again.
Ok I know this isnt quite what was asked of me (I haven't got round to rebuilding ipod-sharp yet) but I thought this may shed more clues. What I did this time was: 1.Transfer some tracks manually (about 721 of them), then ejected the ipod and reconnected it. 2. On reconnect I chose to sync the device and as previously failed the sync when trying to do the art work although it seems all files are transferred. 3. I ejected it from banshee and hooked it up to iTunes on a windows box and tried to view the files (which I failed). 4. I then ejected from iTunes and reconnected to banshee. 5. I then asked banshee to rebuild the database which it seems to have done but looking at the output it failed. The annoying part here is that banshee displays everything as I would expect - correct number of video files and music tracks with album art etc on the ipod. The output to step 5 is: [Warn 08:38:57.242] Could not read iPod database - Detected unsupported database version 37 (in `ipod-sharp') at IPod.DatabaseRecord.Read (IPod.DatabaseRecord db, System.IO.BinaryReader reader) [0x00148] in /usr/src/packages/BUILD/ipod-sharp-0.8.2/src/TrackDatabase.cs:1846 at IPod.TrackDatabase.Reload (Boolean createFresh) [0x0006d] in /usr/src/packages/BUILD/ipod-sharp-0.8.2/src/TrackDatabase.cs:2314 at IPod.TrackDatabase..ctor (IPod.Device device, Boolean createFresh) [0x00087] in /usr/src/packages/BUILD/ipod-sharp-0.8.2/src/TrackDatabase.cs:2169 at IPod.Device.LoadTrackDatabase (Boolean createFresh) [0x0000b] in /usr/src/packages/BUILD/ipod-sharp-0.8.2/src/Device.cs:250 at Banshee.Dap.Ipod.IpodSource.LoadIpod () [0x0001c] in /usr/src/packages/BUILD/banshee-1-1.4.3/src/Dap/Banshee.Dap.Ipod/Banshee.Dap.Ipod/IpodSource.cs:168 Creating fresh track db: /media/FVEUIP01/iPod_Control/iTunes/iTunesDB [Info 08:39:00.941] Sync calculated for Music Library: to add: 7146 items, remove 0 items; sync_src.cacheid = 765, to_add.cacheid = 845, to_remove.cacheid = 853 Sync calculated for Video Library: to add: 58 items, remove 0 items; sync_src.cacheid = 855, to_add.cacheid = 857, to_remove.cacheid = 865 Sync calculated for Podcasts: to add: 0 items, remove 0 items; sync_src.cacheid = 869, to_add.cacheid = 873, to_remove.cacheid = 881 [Debug 08:45:32.078] Refreshing any podcasts that haven't been updated in over an hour [Debug 08:55:32.083] Refreshing any podcasts that haven't been updated in over an hour [Debug 09:05:32.896] Refreshing any podcasts that haven't been updated in over an hour ** Message: Unknown errno: File too large [Warn 09:08:21.650] Caught an exception - Win32 IO returned ERROR_GEN_FAILURE. Path: /media/FVEUIP01/iPod_Control/Artwork/F1060_1.ithmb (in `mscorlib') at System.IO.FileStream.WriteInternal (System.Byte[] src, Int32 offset, Int32 count) [0x0004b] in /usr/src/packages/BUILD/mono-2.4/mcs/class/corlib/System.IO/FileStream.cs:650 at System.IO.FileStream.Write (System.Byte[] array, Int32 offset, Int32 count) [0x000aa] in /usr/src/packages/BUILD/mono-2.4/mcs/class/corlib/System.IO/FileStream.cs:635 at IPod.ImageNameRecord.SetData (System.IO.Stream stream, System.Byte[] data, Int32 offset) [0x00020] in /usr/src/packages/BUILD/ipod-sharp-0.8.2/src/PhotoDatabase.cs:748 at IPod.ImageNameRecord.SetData (System.IO.Stream stream, System.Byte[] data) [0x00000] in /usr/src/packages/BUILD/ipod-sharp-0.8.2/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 /usr/src/packages/BUILD/ipod-sharp-0.8.2/src/PhotoDatabase.cs:1387 at IPod.PhotoDatabase.SaveThumbnails () [0x0009d] in /usr/src/packages/BUILD/ipod-sharp-0.8.2/src/PhotoDatabase.cs:1308 at IPod.PhotoDatabase.Save () [0x0003a] in /usr/src/packages/BUILD/ipod-sharp-0.8.2/src/PhotoDatabase.cs:1101 Failed to save database (in `ipod-sharp') at IPod.PhotoDatabase.Save () [0x001aa] in /usr/src/packages/BUILD/ipod-sharp-0.8.2/src/PhotoDatabase.cs:1137 at IPod.TrackDatabase.Save () [0x0026b] in /usr/src/packages/BUILD/ipod-sharp-0.8.2/src/TrackDatabase.cs:2566 Failed to save database (in `ipod-sharp') at IPod.TrackDatabase.Save () [0x00390] in /usr/src/packages/BUILD/ipod-sharp-0.8.2/src/TrackDatabase.cs:2629 at Banshee.Dap.Ipod.DatabaseRebuilder.SaveDatabase () [0x00050] in /usr/src/packages/BUILD/banshee-1-1.4.3/src/Dap/Banshee.Dap.Ipod/Banshee.Dap.Ipod/DatabaseRebuilder.cs:220 [Error 09:08:21.650] Error rebuilding iPod database - Failed to save database [Info 09:10:58.831] Sync calculated for Music Library: to add: 325 items, remove 323 items; sync_src.cacheid = 765, to_add.cacheid = 845, to_remove.cacheid = 853 Sync calculated for Video Library: to add: 58 items, remove 58 items; sync_src.cacheid = 855, to_add.cacheid = 857, to_remove.cacheid = 865 Sync calculated for Podcasts: to add: 0 items, remove 0 items; sync_src.cacheid = 869, to_add.cacheid = 873, to_remove.cacheid = 881 Ooi could I get the correct steps to build ipod-sharp with the necessary flags etc please?
(In reply to comment #8) > > [Warn 08:38:57.242] Could not read iPod database - Detected unsupported > database version 37 (in `ipod-sharp') > at IPod.DatabaseRecord.Read (IPod.DatabaseRecord db, System.IO.BinaryReader That happened when rebuilding the DB or after rebuilding and trying to read it? Anyway, that's clearly a separate bug, so you should open a new one for that problem. And I guess if we solve it, we can come to this one again and give you more instructions.
(In reply to comment #9) > (In reply to comment #8) > > > > [Warn 08:38:57.242] Could not read iPod database - Detected unsupported > > database version 37 (in `ipod-sharp') > > at IPod.DatabaseRecord.Read (IPod.DatabaseRecord db, System.IO.BinaryReader > > That happened when rebuilding the DB or after rebuilding and trying to read it? > Anyway, that's clearly a separate bug, so you should open a new one for that > problem. And I guess if we solve it, we can come to this one again and give you > more instructions. > That happened at the start when i plugged the ipod in. The rebuild failed with: [Warn 09:08:21.650] Caught an exception - Win32 IO returned ERROR_GEN_FAILURE. Path: /media/FVEUIP01/iPod_Control/Artwork/F1060_1.ithmb (in `mscorlib') I've filed Bug 580888, linking it to this bug.
(In reply to comment #7) > Yeah, Andrew, it would be useful that you check-out ipod-sharp sources, and put > some debug info in the SaveThumbnails method that is calling SetLength, to see > which negative value is transmitting and when it's happening (maybe this is > only happening in the transfer of one offending file, but we need to find which > one), using Console.WriteLine() for example. Then you would need to compile and > install that version over the "official" one, and test again. > Andres, Have you got any instructions to do this? I've checked out the latest SVN of ipod-sharp, I just need to rbuild it with the debug flags etc (I'd most likely use the spec file from the Mono:Community to build an rpm). Thanks,
(In reply to comment #11) > Have you got any instructions to do this? I've checked out the latest SVN of > ipod-sharp, I just need to rbuild it with the debug flags etc (I'd most likely > use the spec file from the Mono:Community to build an rpm). Hey, It's pretty straightforward, just open the MonoDevelop solution file (with MonoDevelop), and build with it. After that, you would get a new .dll file on your bin/Debug subdirectory. So you put that dll on your system dir, overwriting the old one, and that's it. Where's the system's default ipod-sharp? It may vary depending on your distro. In my case (openSUSE 11.0) it's in /usr/lib/ipod-sharp/ipod-sharp.dll
OK so I finally managed to get round to building from svn (you're right it is straight forward :) ). I'm still getting a failure with an album cover, although I can't see which one. In an ideal world, if there is an issue with an image it would be nice if instead of killing the whole transfer it just didn't transfer the image. I'll attach the full log in a second, and as you'll see it took almost three hours before it decided to bomb out on me and now I have 0 out of 7215 tracks and 61 vids transferred - a bit frustrating.
Created attachment 134971 [details] Full log of transfer attempt Sync started at 0530 and failed at 0812
Andrew, we have to track this down a little better before mangling with debugging ipod-sharp. Could you do a binary search to try to find the file(s) that are causing this? By binary search I mean: 1) Divide your library collection in two groups: A, B. 2) Try to import A, if it succeeds, try to import B. 3) Divide the one that first fails into another 2 subgroups: C, D. 4) Repeat (1) with C, D. This way you will find the minimum set of files that make the bug happen, and it will be easier to determine why. Thanks.
> 1) Divide your library collection in two groups: A, B. OK I've split my library into two: Group A = 0-L 3700 tracks Runtime 10:11:33:54 Size 22.3GB Group B = M-Z 3515 tracks Runtime 9:21:20:28 Size 20.8GB > 2) Try to import A, if it succeeds, try to import B. Now this got a bit weird, I synced Group A and got some errors but the sync went fine See attachment bansheelog1-AL.txt. I then synced Group B and it managed to completely bork the iPod see attachment bansheelog2-MZ.txt. After restoring my ipod i tried to do the sync in reverse. I synced Group B without any issue see bansheelog3-MZ.txt. I then synced Group A and all seemed to go fine until banshee flushed to disk then I got the errors, and the tracks were not synced - data transferred but unreadable by the device see attachment bansheelog4-AL.txt Do I still need to breakdown Group A and see from there?
Created attachment 135316 [details] Log of syncing the first half of library
Created attachment 135317 [details] Log of syncing the second half of library
Created attachment 135318 [details] Log of syncing the second half of library take two
Created attachment 135319 [details] Log of syncing the first half of library take two
Hey Andrew, thanks for being insistent on this :) (In reply to comment #16) > > 1) Divide your library collection in two groups: A, B. > OK I've split my library into two: > Group A = 0-L > 3700 tracks > Runtime 10:11:33:54 > Size 22.3GB > > Group B = M-Z > 3515 tracks > Runtime 9:21:20:28 > Size 20.8GB > > > 2) Try to import A, if it succeeds, try to import B. What I meant with this is "try to import A, if it succeeds, forget completely about group A of music, the culprit is not there; so restore the ipod to the empty state and try to import B". > Now this got a bit weird, I synced Group A and got some errors but the sync > went fine See attachment bansheelog1-AL.txt. I then synced Group B and it > managed to completely bork the iPod see attachment bansheelog2-MZ.txt. After > restoring my ipod i tried to do the sync in reverse. I synced Group B without > any issue see bansheelog3-MZ.txt. At this point, I would forget about group B, and restore the iPod, and keep spliting Group A in more subgroups. Let's see where do we reach from here... > I then synced Group A and all seemed to go > fine until banshee flushed to disk then I got the errors, and the tracks were > not synced - data transferred but unreadable by the device see attachment > bansheelog4-AL.txt > > Do I still need to breakdown Group A and see from there? >
OK I officially hate ipod-sharp!! :D I broke Group A into two and it has synced all 3700 tracks without issue, I am now breaking Group B into two and trying to sync them as well. I wonder if there is a size limit for syncing?
OK ip[od-sharp really doesn't like me. Group A was originally the one that failed but after splitting it up it worked, and now I split Group B which had worked fine and it fails see attachment bansheelog5-MS.txt iom at a loss as the fault does not seem to be in a consistent place.
Created attachment 135358 [details] Failure but in a different place
Is there a size limitation on syncing with ipod-sharp? I can recreate the error but not in the same place :(
Created attachment 135472 [details] [review] Proposed patch Good news guys, today playing with iPodSharp again I found a very similar problem to this. Something may be broken in the way ipod-sharp manages photos for iPods, however, it shouldn't affect tracks manipulation at all if the photos have not been touched, so I started wondering why this was happening at all, and found out that there was a null check to the PhotoDatabase variable which was useless (because it could never happen that it's null, as it's accessing the property and not the field). Fixing this has fixed my problem. The exception I was having is: [Warn 20:24:19.164] Failed to save iPod database - Expected record name of 'mhfd', got 'mhdp' (in `ipod-sharp') at IPod.Record.ReadHeader (System.IO.BinaryReader reader) [0x000ac] in /home/knocte/Documents/iDocs/Proyectos/Banshee/arbolSVN/ipod-sharp/src/TrackDatabase.cs:111 at IPod.PhotoDbRecord.Read (System.IO.BinaryReader reader) [0x00000] in /home/knocte/Documents/iDocs/Proyectos/Banshee/arbolSVN/ipod-sharp/src/PhotoDatabase.cs:19 at IPod.DataFileRecord.Read (System.IO.BinaryReader reader) [0x00000] in /home/knocte/Documents/iDocs/Proyectos/Banshee/arbolSVN/ipod-sharp/src/Album.cs:1 at IPod.PhotoDatabase.Reload (Boolean createFresh) [0x00092] in /home/knocte/Documents/iDocs/Proyectos/Banshee/arbolSVN/ipod-sharp/src/PhotoDatabase.cs:1066 at IPod.PhotoDatabase..ctor (IPod.Device device, Boolean isPhoto, Boolean createFresh) [0x00073] in /home/knocte/Documents/iDocs/Proyectos/Banshee/arbolSVN/ipod-sharp/src/PhotoDatabase.cs:1044 at IPod.Device.LoadPhotoDatabase (Boolean createFresh) [0x0001b] in /home/knocte/Documents/iDocs/Proyectos/Banshee/arbolSVN/ipod-sharp/src/Device.cs:261 at IPod.Device.LoadPhotoDatabase () [0x00000] in /home/knocte/Documents/iDocs/Proyectos/Banshee/arbolSVN/ipod-sharp/src/Device.cs:255 at IPod.Device.get_PhotoDatabase () [0x0000b] in /home/knocte/Documents/iDocs/Proyectos/Banshee/arbolSVN/ipod-sharp/src/Device.cs:63 at IPod.Device.Save () [0x00016] in /home/knocte/Documents/iDocs/Proyectos/Banshee/arbolSVN/ipod-sharp/src/Device.cs:285 at Banshee.Dap.Ipod.IpodSource.PerformSyncThreadCycle () [0x00324] in /home/knocte/Documents/iDocs/Proyectos/Banshee/arbolGIT/banshee/src/Dap/Banshee.Dap.Ipod/Banshee.Dap.Ipod/IpodSource.cs:655
FYI, looking for bugs with the word PhotoDatabase I found the following, which are also likely to be fixed thanks to this patch: bug 564503, bug 555329.
Regarding the proposed patch, the OP's problem of: [Warn 12:50:17.312] Failed to save iPod database - Argument is out of range. Parameter name: value is less than 0 (in `mscorlib') is separate from: [Warn 20:24:19.164] Failed to save iPod database - Expected record name of 'mhfd', got 'mhdp' (in `ipod-sharp') The proposed patch might fix something that needs fixing but I am convinced it does not fix the problem experienced in the original post. I am not fluent in C# but what I would say is happening is that, due to album art duplication (album art is included in the database separately for /every track/), the artwork database size is getting very large. The problem is specifically when the database becomes greater than 2GB. 2GB is significant because that is the biggest number that a signed 32bit integer can be before rolling over into the negatives, thus making the parameter 'less than 0'. The problem in the original post, I believe, is a dup of bug 555329.
OK I applied the patch and on syncing my library I got the following error: [Warn 02:31:23.574] 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 /usr/src/packages/BUILD/mono-2.4/mcs/class/corlib/System.IO/FileStream.cs:824 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 /home/andrew/tmp/Source/ipod-sharp+svn135121/src/PhotoDatabase.cs:1401 at IPod.PhotoDatabase.SaveThumbnails () [0x0009d] in /home/andrew/tmp/Source/ipod-sharp+svn135121/src/PhotoDatabase.cs:1308 at IPod.PhotoDatabase.Save () [0x0003a] in /home/andrew/tmp/Source/ipod-sharp+svn135121/src/PhotoDatabase.cs:1101 Failed to save database (in `ipod-sharp') at IPod.PhotoDatabase.Save () [0x001aa] in /home/andrew/tmp/Source/ipod-sharp+svn135121/src/PhotoDatabase.cs:1137 at IPod.TrackDatabase.Save () [0x002a0] in /home/andrew/tmp/Source/ipod-sharp+svn135121/src/TrackDatabase.cs:2569 Failed to save database (in `ipod-sharp') at IPod.TrackDatabase.Save () [0x003c1] in /home/andrew/tmp/Source/ipod-sharp+svn135121/src/TrackDatabase.cs:2632 at IPod.Device.Save () [0x0000b] in /home/andrew/tmp/Source/ipod-sharp+svn135121/src/Device.cs:282 When I then hit eject I then get the following error: [Warn 06:26:56.081] 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 /home/andrew/tmp/Source/ipod-sharp+svn135121/src/PhotoDatabase.cs:748 at IPod.ImageNameRecord.SetData (System.IO.Stream stream, System.Byte[] data) [0x00000] in /home/andrew/tmp/Source/ipod-sharp+svn135121/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 /home/andrew/tmp/Source/ipod-sharp+svn135121/src/PhotoDatabase.cs:1387 at IPod.PhotoDatabase.SaveThumbnails () [0x0009d] in /home/andrew/tmp/Source/ipod-sharp+svn135121/src/PhotoDatabase.cs:1308 at IPod.PhotoDatabase.Save () [0x0003a] in /home/andrew/tmp/Source/ipod-sharp+svn135121/src/PhotoDatabase.cs:1101 Failed to save database (in `ipod-sharp') at IPod.PhotoDatabase.Save () [0x001aa] in /home/andrew/tmp/Source/ipod-sharp+svn135121/src/PhotoDatabase.cs:1137 at IPod.TrackDatabase.Save () [0x002a0] in /home/andrew/tmp/Source/ipod-sharp+svn135121/src/TrackDatabase.cs:2569 Failed to save database (in `ipod-sharp') at IPod.TrackDatabase.Save () [0x003c1] in /home/andrew/tmp/Source/ipod-sharp+svn135121/src/TrackDatabase.cs:2632 at IPod.Device.Save () [0x0000b] in /home/andrew/tmp/Source/ipod-sharp+svn135121/src/Device.cs:282 I do have some albums that have the same cover art - effectively duplicate albums but with minor differences due to regional releases (e.g. Australian vs UK release and US vs UK release). I will try and remove these duplicates and see if that makes any difference.
These types of duplicate aren't what I'm talking about. What I am talking about is that if you have one album with ten tracks, the identical album art is included in the database ten times instead of just once.
(In reply to comment #28) > Regarding the proposed patch, the OP's problem of: > > [Warn 12:50:17.312] Failed to save iPod database - Argument is out of range. > Parameter name: value is less than 0 (in `mscorlib') > > is separate from: > > [Warn 20:24:19.164] Failed to save iPod database - Expected record name of > 'mhfd', got 'mhdp' (in `ipod-sharp') > > > The proposed patch might fix something that needs fixing but I am convinced it > does not fix the problem experienced in the original post. Mmmm, you're right, and comment#29 seems to confirm it. What I guess I was missing is that when there is Cover Art to be transferred in the iPod, it's likely to be using the Photo sync capabilities of ipod-sharp, which makes my fix useless for this case. However, I think my fix is good for other cases (indeed, it fixed my problem), but I'm not sure if I should open another bug report for my exception, or that it can be reviewed now and committed. Maintainers? (In reply to comment #29) > OK I applied the patch and on syncing my library I got the following error: > > ... > > I do have some albums that have the same cover art - effectively duplicate > albums but with minor differences due to regional releases (e.g. Australian vs > UK release and US vs UK release). I will try and remove these duplicates and > see if that makes any difference. Refer to Nicholas previous comment about this. Anyway, Andrew, it would be good to do this test now, if you can: just remove all cover art from your collection, and then try to sync it (with my patch applied). If it works, then we can definitely blame cover art, and maybe dupe this to other bug (or the other way around).
OK I kept the regional albums in the collection and removed .cache/album-art. I then synced all 7545 tracks and 61 videos without issue. Safe to say this is indeed purely related to album art issues.
(In reply to comment #32) > OK I kept the regional albums in the collection and removed .cache/album-art. > I then synced all 7545 tracks and 61 videos without issue. > > Safe to say this is indeed purely related to album art issues. > Ok, marking this as a dupe of bug 555329 then. Marking the patch I proposed as obsolete too, as in the end is not related to this bug (but I attached to the new bug 588101). *** This bug has been marked as a duplicate of 555329 ***