GNOME Bugzilla – Bug 590342
can't eject media player
Last modified: 2009-10-05 19:01:28 UTC
Please describe the problem: When I create new playlist on my Samsung YP-U3 MTP player, I can't eject it from Banshee. This bug exist on version 1.4.3 and 1.5.0 too. Steps to reproduce: 1. create new playlist on MTP device 2. add some files to playlist 3. eject device (eject menu in banshee) Actual results: banshee display thist text: Could not eject Media Player: Value is greater than Int32.MaxValue or less than Int32.MinValue Expected results: Does this happen every time? yes Other information: PTP: Opening session [Debug 09:02:45.067] Found DAP support (Banshee.Dap.Mtp.MtpSource) for device ????? [Info 09:02:47.409] Sync calculated for Music Library: to add: 2066 items, remove 35 items; sync_src.cacheid = 131, to_add.cacheid = 190, to_remove.cacheid = 198 Sync calculated for Video Library: to add: 2 items, remove 0 items; sync_src.cacheid = 200, to_add.cacheid = 202, to_remove.cacheid = 210 Sync calculated for Podcasts: to add: 0 items, remove 0 items; sync_src.cacheid = 214, to_add.cacheid = 218, to_remove.cacheid = 226 [Warn 09:03:13.349] Caught an exception - Value is greater than Int32.MaxValue or less than Int32.MinValue (in `mscorlib') at System.Convert.ToInt32 (Int64 value) [0x00000] at System.Int64.System.IConvertible.ToInt32 (IFormatProvider provider) [0x00000] at System.Convert.ToType (System.Object value, System.Type conversionType, IFormatProvider provider) [0x00000] at System.Convert.ChangeType (System.Object value, System.Type conversionType) [0x00000] at Hyena.Data.Sqlite.SqliteUtils.FromDbFormat (System.Type type, System.Object value) [0x000b0] in /build/buildd/banshee-1.4.3/src/Libraries/Hyena/Hyena.Data.Sqlite/SqliteUtils.cs:95 at Hyena.Data.Sqlite.HyenaSqliteConnection+<QueryEnumerable>c__Iterator4`1[System.Int32].MoveNext () [0x0005e] in /build/buildd/banshee-1.4.3/src/Libraries/Hyena/Hyena.Data.Sqlite/HyenaSqliteConnection.cs:154 at Banshee.Dap.Mtp.MtpSource.SyncPlaylists () [0x000f3] in /build/buildd/banshee-1.4.3/src/Dap/Banshee.Dap.Mtp/Banshee.Dap.Mtp/MtpSource.cs:240 at Banshee.Dap.DapSource.Eject () [0x00010] in /build/buildd/banshee-1.4.3/src/Dap/Banshee.Dap/Banshee.Dap/DapSource.cs:311 at Banshee.Dap.Mtp.MtpSource.Eject () [0x00000] in /build/buildd/banshee-1.4.3/src/Dap/Banshee.Dap.Mtp/Banshee.Dap.Mtp/MtpSource.cs:431 at Banshee.Dap.RemovableSource+<Unmap>c__AnonStorey6.<>m__6 (System.Object ) [0x00000] in /build/buildd/banshee-1.4.3/src/Dap/Banshee.Dap/Banshee.Dap/RemovableSource.cs:108
I've forgotten to write, that banshee don't save this playlist on device.
Created attachment 141912 [details] [review] When libmtp doesn't return a valid playlist folder, use music folder to prevent crash.
I've run across this same bug with a Sony Walkman NWZ-E436F. In my case it's caused because libmtp doesn't return a valid playlist folder for the device. When this happens, it's safe to set the playlist folder to the same folder as the music folder. Attached patch fixes it against current git master.
Comment on attachment 141912 [details] [review] When libmtp doesn't return a valid playlist folder, use music folder to prevent crash. 1. use 4 spaces for tabs 2. can you do == 0 instead of 0x00...0? if so, please do
Created attachment 143029 [details] [review] update version of the patch Ok, here's a version with those changes.
Fixed in master, thanks.