After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 590342 - can't eject media player
can't eject media player
Status: RESOLVED FIXED
Product: banshee
Classification: Other
Component: Device - MTP
1.4.3
Other Linux
: Normal normal
: 1.x
Assigned To: Gabriel Burt
Gabriel Burt
Depends on:
Blocks:
 
 
Reported: 2009-07-31 07:10 UTC by Coudy
Modified: 2009-10-05 19:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
When libmtp doesn't return a valid playlist folder, use music folder to prevent crash. (768 bytes, patch)
2009-08-28 03:30 UTC, nyall
needs-work Details | Review
update version of the patch (820 bytes, patch)
2009-09-11 21:34 UTC, nyall
committed Details | Review

Description Coudy 2009-07-31 07:10:32 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
Comment 1 Coudy 2009-07-31 07:12:51 UTC
I've forgotten to write, that banshee don't save this playlist on device.
Comment 2 nyall 2009-08-28 03:30:42 UTC
Created attachment 141912 [details] [review]
When libmtp doesn't return a valid playlist folder, use music folder to prevent crash.
Comment 3 nyall 2009-08-28 03:31:41 UTC
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 4 Gabriel Burt 2009-09-11 21:10:00 UTC
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
Comment 5 nyall 2009-09-11 21:34:25 UTC
Created attachment 143029 [details] [review]
update version of the patch

Ok, here's a version with those changes.
Comment 6 Gabriel Burt 2009-10-05 19:01:28 UTC
Fixed in master, thanks.