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 543938 - MTP device (Sony NWZ-S616F) - Banshee says it can handle only one device at the same time.
MTP device (Sony NWZ-S616F) - Banshee says it can handle only one device at t...
Status: RESOLVED FIXED
Product: banshee
Classification: Other
Component: Device - MTP
1.0.0
Other All
: Normal normal
: 1.x
Assigned To: Patrick van Staveren
Patrick van Staveren
: 562664 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-07-21 03:46 UTC by Rafael K. Tesser
Modified: 2009-12-25 17:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
output of "hal-device" (79.94 KB, text/plain)
2008-07-28 02:51 UTC, Rafael K. Tesser
  Details
output of lshal (99.17 KB, text/plain)
2008-07-28 20:07 UTC, Rafael K. Tesser
  Details
output from hal-device executed in another PC (99.34 KB, text/plain)
2008-07-28 20:08 UTC, Rafael K. Tesser
  Details
Debug patch for MtpSource.cs (2.10 KB, text/plain)
2008-07-29 00:18 UTC, Richard Mottershead
  Details
This is the hal-device with includes the W910i MTP device. (163.05 KB, text/plain)
2008-07-29 00:19 UTC, Richard Mottershead
  Details
hal-device output from Palm Treo 680 w/ Pocket Tunes (86.75 KB, text/plain)
2008-09-20 03:14 UTC, Chris Hurley
  Details
hal-device output yp-p2 (118.71 KB, text/plain)
2009-01-05 04:07 UTC, Guillaume Beland
  Details
Fixes mtp detection of sony walkman products (722 bytes, patch)
2009-08-13 22:05 UTC, nyall
none Details | Review
fixed version of patch with proper parenthesis (725 bytes, patch)
2009-08-13 22:36 UTC, nyall
needs-work Details | Review
add debug info to track problem (639 bytes, application/octet-stream)
2009-08-13 22:43 UTC, nyall
  Details
updated version of the patch (763 bytes, patch)
2009-09-11 21:14 UTC, nyall
committed Details | Review

Description Rafael K. Tesser 2008-07-21 03:46:35 UTC
Please describe the problem:
When I try to use my Sony NWZ-S616F with banshee it says it can't handle more than one device at the same time.

This device can be used both as mass storage device and MTP device. I've used it with MTP in other players (Rhythmbox, Amarok) and it worked.

I tried to disable one of the device plugins (mass storage and mtp), but the error persisted.


Steps to reproduce:
1. Have the player connected when you open Banshee or connect it when Banshee is executing.



Actual results:
A pop up dialog is shown saying that the device will be ignored because banshee can handle only one device at a time.

Expected results:
I expect the device to be connected through the MTP protocol, allowing me to transfer music files to it, and remove files which are stored in it.

Does this happen every time?
Yes.

Other information:
Comment 1 Richard Mottershead 2008-07-24 10:10:33 UTC
This occurs with my Sony Ericsson W910i as well.

There is no debug output from the command "banshee-1 --debug --debug-addins".
Comment 2 Rafael K. Tesser 2008-07-24 19:23:09 UTC
rktesser@carpa ~ $ banshee-1 --debug --debug-addins
[Debug 16:18:24.908] NDesk.DBus.Bus.Session.RequestName ('org.bansheeproject.Banshee') => PrimaryOwner
[Info  16:18:24.919] Running Banshee 1.0.0
Checking: /home/rktesser/.config/banshee-1/addin-db-001/hosts
Checking: /usr/lib/banshee-1
Checking: /usr/lib/banshee-1/Backends
Checking: /usr/lib/banshee-1/Extensions
Folders checked (39 ms)
Looking for addins
Checking: /home/rktesser/.config/banshee-1/addin-db-001/hosts
Checking: /usr/lib/banshee-1
Checking: /usr/lib/banshee-1/Backends
Checking: /usr/lib/banshee-1/Extensions
Checking: /home/rktesser/.config/banshee-1/addins
Scanning file: /usr/lib/banshee-1/Banshee.Core.dll
Scanning file: /usr/lib/banshee-1/Backends/Banshee.GStreamer.dll
Scanning file: /usr/lib/banshee-1/Backends/Banshee.Gnome.dll
Scanning file: /usr/lib/banshee-1/Backends/Banshee.Hal.dll
Scanning file: /usr/lib/banshee-1/Backends/Banshee.Unix.dll
Scanning file: /usr/lib/banshee-1/Extensions/Banshee.AudioCd.dll
Scanning file: /usr/lib/banshee-1/Extensions/Banshee.BooScript.dll
Scanning file: /usr/lib/banshee-1/Extensions/Banshee.Bookmarks.dll
Scanning file: /usr/lib/banshee-1/Extensions/Banshee.CoverArt.dll
Scanning file: /usr/lib/banshee-1/Extensions/Banshee.Dap.MassStorage.dll
Scanning file: /usr/lib/banshee-1/Extensions/Banshee.Dap.Mtp.dll
Scanning file: /usr/lib/banshee-1/Extensions/Banshee.Dap.dll
Scanning file: /usr/lib/banshee-1/Extensions/Banshee.FileSystemQueue.dll
Scanning file: /usr/lib/banshee-1/Extensions/Banshee.Lastfm.dll
Scanning file: /usr/lib/banshee-1/Extensions/Banshee.MiniMode.dll
Scanning file: /usr/lib/banshee-1/Extensions/Banshee.MultimediaKeys.dll
Scanning file: /usr/lib/banshee-1/Extensions/Banshee.NotificationArea.dll
Scanning file: /usr/lib/banshee-1/Extensions/Banshee.NowPlaying.dll
Scanning file: /usr/lib/banshee-1/Extensions/Banshee.PlayQueue.dll
Scanning file: /usr/lib/banshee-1/Extensions/Banshee.Podcasting.dll
Scanning file: /usr/lib/banshee-1/Banshee.Services.dll
Scanning file: /usr/lib/banshee-1/Banshee.ThickClient.dll
Scanning file: /usr/lib/banshee-1/Banshee.Widgets.dll
Scanning file: /usr/lib/banshee-1/Halie.exe
Scanning file: /usr/lib/banshee-1/Hyena.Gui.dll
Scanning file: /usr/lib/banshee-1/Hyena.dll
Scanning file: /usr/lib/banshee-1/Lastfm.Gui.dll
Scanning file: /usr/lib/banshee-1/Lastfm.dll
Scanning file: /usr/lib/banshee-1/Migo.dll
Scanning file: /usr/lib/banshee-1/Mono.Media.dll
Scanning file: /usr/lib/banshee-1/Mtp.dll
Scanning file: /usr/lib/banshee-1/MusicBrainz.dll
Scanning file: /usr/lib/banshee-1/Nereid.exe
Scanning file: /usr/lib/banshee-1/gconf-schema-extractor.exe
Folders scan completed (425 ms)
Generating add-in extension maps
Addin relation map generated.
  Addins Updated: 22
  Extension points: 14
  Extensions: 26
  Extension nodes: 27
  Node sets: 0
Add-in relations analyzed (56 ms)
[Debug 16:18:25.875] Core service started (DBusServiceManager, 0,002119s)
[Debug 16:18:25.893] Core service started (DBusCommandService, 0,017157s)
[Debug 16:18:26.033] Opened SQLite connection to /home/rktesser/.config/banshee-1/banshee.db
[Debug 16:18:26.034] Core service started (DbConnection, 0,140485s)
[Debug 16:18:26.066] Database version 11 is up to date
[Debug 16:18:26.091] Core service started (PreferenceService, 0,022619s)
[Debug 16:18:26.095] Core service started (SourceManager, 0,00336s)
[Debug 16:18:26.283] Core service started (MediaProfileManager, 0,187781s)
[Debug 16:18:26.287] Core service started (PlayerEngine, 0,004404s)
[Debug 16:18:26.295] Configuration client extension loaded (Banshee.GnomeBackend.GConfConfigurationClient)
[Debug 16:18:26.367] IO provider extension loaded (Banshee.IO.Unix.Provider)
[Debug 16:18:26.378] Core service started (TranscoderService, 0,015903s)
[Debug 16:18:26.382] Core service started (PlaybackController, 0,003342s)
[Debug 16:18:26.383] Core service started (ImportSourceManager, 0,000659s)
[Debug 16:18:26.390] Core service started (LibraryImportManager, 0,0066s)
[Debug 16:18:26.391] Core service started (UserJobManager, 0,000983s)
[Debug 16:18:26.413] Core service started (HardwareManager, 0,021146s)
[Debug 16:18:26.445] Adding icon theme search path: /usr/share/banshee-1/icons
[Debug 16:18:26.446] Core service started (GtkElementsService, 0,032994s)
[Debug 16:18:26.520] Core service started (InterfaceActionService, 0,074507s)
[Debug 16:18:26.521] Album artwork path set to /home/rktesser/.cache/album-art
[Debug 16:18:26.522] Core service started (ArtworkManager, 0,001104s)
[Debug 16:18:27.231] Core service started (NereidPlayerInterface, 0,709434s)
[Warn  16:18:27.246] Caught an exception - No support GNOME Settings Daemon could be reached. (in `Banshee.MultimediaKeys')
  at Banshee.MultimediaKeys.MultimediaKeysService.Banshee.ServiceStack.IExtensionService.Initialize () [0x000bc] in /var/tmp/portage/media-sound/banshee-1.0.0-r1/work/banshee-1-1.0.0/src/Extensions/Banshee.MultimediaKeys/Banshee.MultimediaKeys/MultimediaKeysService.cs:117 
  at Banshee.ServiceStack.ServiceManager.StartExtension (Mono.Addins.TypeExtensionNode node) [0x00034] in /var/tmp/portage/media-sound/banshee-1.0.0-r1/work/banshee-1-1.0.0/src/Core/Banshee.Services/Banshee.ServiceStack/ServiceManager.cs:167 
[Warn  16:18:27.247] Extension `Banshee.MultimediaKeys.MultimediaKeysService' not started: No support GNOME Settings Daemon could be reached.
[Debug 16:18:27.250] Extension service started (DapService, 0,003037s)
[Debug 16:18:27.272] Extension service started (BookmarksService, 0,02145s)
[Debug 16:18:27.394] GStreamer pipeline does not run: audioconvert ! xingenc bitrate=128 ! id3v2mux
[Debug 16:18:27.480] GStreamer pipeline does not run: audioconvert ! wavpackenc mode=2 md5=false extra-processing=0 ! apev2mux
[Debug 16:18:27.482] GStreamer pipeline does not run: audioconvert ! fluwmaenc bitrate=64000 vbr=false ! fluasfmux
[Debug 16:18:27.483] Extension service started (GStreamerCoreService, 0,210161s)
[Debug 16:18:27.494] Player state change: NotReady -> Ready
[Debug 16:18:27.505] Player state change: Ready -> Idle
[Debug 16:18:27.564] Extension service started (AudioCdService, 0,052467s)
[Debug 16:18:27.568] Extension service started (GnomeService, 0,004231s)
[Debug 16:18:27.708] Extension service started (NotificationAreaService, 0,139555s)
[Debug 16:18:27.967] Extension service started (PodcastService, 0,258959s)
[Warn  16:18:27.978] Não é possível conectar-se ao NetworkManager - É assumido que uma conexão de rede disponível está em funcionamento
[Debug 16:18:27.979] Audioscrobbler state: connected
[Debug 16:18:27.982] Extension service started (AudioscrobblerService, 0,014826s)
[Debug 16:18:27.985] Extension service started (CoverArtService, 0,003302s)
[Warn  16:18:27.988] Caught an exception - No support GNOME Settings Daemon could be reached. (in `Banshee.MultimediaKeys')
  at Banshee.MultimediaKeys.MultimediaKeysService.Banshee.ServiceStack.IExtensionService.Initialize () [0x000bc] in /var/tmp/portage/media-sound/banshee-1.0.0-r1/work/banshee-1-1.0.0/src/Extensions/Banshee.MultimediaKeys/Banshee.MultimediaKeys/MultimediaKeysService.cs:117 
  at Banshee.ServiceStack.ServiceManager.StartExtension (Mono.Addins.TypeExtensionNode node) [0x00034] in /var/tmp/portage/media-sound/banshee-1.0.0-r1/work/banshee-1-1.0.0/src/Core/Banshee.Services/Banshee.ServiceStack/ServiceManager.cs:167 
[Warn  16:18:27.988] Extension `Banshee.MultimediaKeys.MultimediaKeysService' not started: No support GNOME Settings Daemon could be reached.
[Info  16:18:27.989] All services are started 2,119572s
[Info  16:18:28.788] nereid Client Started
[Debug 16:18:28.819] Dap support extension loaded: Banshee.Dap.Mtp
[Debug 16:18:29.134] Dap support extension loaded: Banshee.Dap.MassStorage
PTP: Opening session
PTP: Opening session
[Debug 16:19:00.314] Service disposed (CoverArtService)
[Debug 16:19:00.318] Service disposed (AudioscrobblerService)
[Debug 16:19:00.337] Service disposed (PodcastService)
[Debug 16:19:00.344] Service disposed (NotificationAreaService)
[Debug 16:19:00.345] Service disposed (GnomeService)
[Debug 16:19:00.352] Service disposed (AudioCdService)
[Debug 16:19:00.352] Service disposed (GStreamerCoreService)
[Debug 16:19:00.353] Service disposed (BookmarksService)
[Debug 16:19:00.357] Service disposed (DapService)
[Debug 16:19:00.358] Service disposed (NereidPlayerInterface)
[Debug 16:19:00.359] Service disposed (HardwareManager)
[Debug 16:19:00.361] (libbanshee:player) bp_stop: setting state to GST_STATE_NULL
[Debug 16:19:00.362] (libbanshee:player) bp_destroy: disposed player
[Debug 16:19:00.362] Service disposed (PlayerEngine)
[Debug 16:19:00.372] Service disposed (SourceManager)
[Debug 16:19:00.374] Service disposed (DbConnection)
PTP: Closing session
PTP: Closing session
ERROR: Could not close session!
Comment 3 Gabriel Burt 2008-07-28 01:04:33 UTC
With your device plugged in, please run hal-device > hal and attach the hal file here.  Also, can you double check you don't have extensions listed twice in Preferences -> extensions tab?
Comment 4 Rafael K. Tesser 2008-07-28 02:51:31 UTC
Created attachment 115404 [details]
output of "hal-device"
Comment 5 Rafael K. Tesser 2008-07-28 02:53:25 UTC
I have  checked it and there are no duplicated extensions!

I had already tested to disable the mass storage media player support extension because I thought that the problem could be caused by conflict between the extensions, but the problem persisted.
Comment 6 Gabriel Burt 2008-07-28 16:37:06 UTC
(In reply to comment #4)
> Created an attachment (id=115404) [edit]
> output of "hal-device"
> 

I don't think you had your device plugged in when you took this; the device info is missing.
Comment 7 Rafael K. Tesser 2008-07-28 20:06:11 UTC
Of course it was plugged. I can see references to my device in the lines:

1: udi = '/org/freedesktop/Hal/devices/storage_serial_Sony_WALKMAN_BEBE05355400'
  info.vendor = 'SONY'  (string)

...

  info.product = 'WALKMAN'  (string)

...

2: udi = '/org/freedesktop/Hal/devices/usb_device_1d6b_2_0000_00_02_1_if0_0_scsi_host_scsi_device_lun0'
  scsi.vendor = 'SONY'  (string)
...
  scsi.model = 'WALKMAN'  (string)


...

5: udi = '/org/freedesktop/Hal/devices/usb_device_54c_327_BEBE05355400'
...
  info.vendor = 'Sony Corp.'  (string)
  info.product = 'WALKMAN'  (string)

----
OK, maybe it's harder to find it if you don't know its a Sony Walkman and don't search for the string "SONY" and "WALKMAN".

I will send the output generated in another computer together with the lshal output which can be useful to you also.
Comment 8 Rafael K. Tesser 2008-07-28 20:07:01 UTC
Created attachment 115445 [details]
output of lshal
Comment 9 Rafael K. Tesser 2008-07-28 20:08:21 UTC
Created attachment 115446 [details]
output from hal-device executed in another PC
Comment 10 Richard Mottershead 2008-07-29 00:15:24 UTC
I have been having a look at this with my Sony Ericsson W910i and this is what I have found.

I put some debugging code into the MtpSource.cs routine (Patch Attached) and work out where the problem for my device actually occurs.

This is the output from the Debug Code.

PTP: Opening session
[Debug 01:00:27.392] MTP Device count is (1)
[Debug 01:00:27.392] MTP Device
[Debug 01:00:27.393] Device Serial Number is (00000000000000000358875016410675)
[Debug 01:00:27.394] Device Version is (1.10)
[Debug 01:00:27.394] Device Name is (W910i)
[Debug 01:00:27.395] mtp_serial is (00000000000000000358875016410675)
[Debug 01:00:27.395] device.Uuid is (3588750164106750)
[Debug 01:00:27.395] mtp_device is null
PTP: Closing session

It looks to me like the device is being detected correctly but the serial number is being truncated by one character, therefore does not contain device.Uuid. This causes mtp_device not to be set, which inturns is detected as Null.

I am currently running a SVN code (post 1.0.0). The SVN revision is 4242.

I have attached:
1) The patch with the debugging code.
2) hal-device for my PC.

If you want any more information, just ask. 

BTW, this is the first time I have touched C# and if the patch looks awful, i apologise.
Comment 11 Richard Mottershead 2008-07-29 00:18:09 UTC
Created attachment 115462 [details]
Debug patch for MtpSource.cs

This patch helped me with producing debug output for the MTP plugin
Comment 12 Richard Mottershead 2008-07-29 00:19:15 UTC
Created attachment 115463 [details]
This is the hal-device with includes the W910i MTP device.
Comment 13 Richard Mottershead 2008-08-05 23:35:38 UTC
This may be a libmtp problem.

Whilst "dmesg" shows:

usb 1-2: new high speed USB device using ehci_hcd and address 3
usb 1-2: configuration #4 chosen from 1 choice
usb 1-2: New USB device found, idVendor=0fce, idProduct=0076
usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-2: Product: Sony Ericsson Phone
usb 1-2: Manufacturer: Sony Ericsson
usb 1-2: SerialNumber: 3588750164106750

the mtp-detect utility shows:

Device info:
   Manufacturer: Sony Ericsson
   Model: Sony Ericsson Phone
   Device version: 1.10
   Serial number: 00000000000000000358875016410675
   Vendor extension ID: 0x00000006
   Vendor extension description: microsoft.com: 1.0; microsoft.com/WMDRMPD: 10.1
; microsoft.com/WMPPD: 11.0; microsoft.com/WMPPD: 10.0; vodafone.com/omadrmv2: 1
.0;
   Detected object size: 64 bits


These output show that banshee is not manipulating the serial numbers in any way, therefore my summation that it could be a libmtp problem.

Comment 14 Rafael K. Tesser 2008-08-06 00:35:42 UTC
> 
> These output show that banshee is not manipulating the serial numbers in any
> way, therefore my summation that it could be a libmtp problem.
> 

I don't think so. At least for my device the problem doesn't seem to be in libmtp. I tested Amarok and Rhythmbox. Both use libmtp and my device works right with them. If the error is in libmtp then it is not caught by these applications or they use some workaround to bypass the problem.

Comment 15 Richard Mottershead 2008-08-06 08:22:00 UTC

The reasoning behind my summation, about libmtp, is that the code requires the serial number from the USB device matching part of the serial number from libmtp. If there is a match a pointer gets set and it these are not a match then the pointer does not get set and the error message is produced.

I have had a look at the rhythmbox code and it does not do this check and yes my device works fine in rhythmbox. Although I find C++ more difficult to read then C#.

I am going to pose the question about the serial numbers to the libmtp discussion group, to see what sort of response I get.

Do you have mtp-detect on your system? If you don't have this then gphoto2 --summary will suffice.

Can you run it and post the output from it with the dmesg output?
Comment 16 Rafael K. Tesser 2008-08-06 13:40:00 UTC
Hi. I filed a bug in the libmtp Sourceforge tracker asking to add my device to the list supported by libmtp. The output of mtp-detect can be found there. They said that my device is supported by the cvs version of libmtp, maybe you can test with that version. 

https://sourceforge.net/tracker/?func=detail&atid=809061&aid=2019026&group_id=158745
Comment 17 Linus Walleij 2008-08-07 13:52:40 UTC
(I'm a developer on libmtp)

First, last time I checked, Banshee was using libgphoto2 to interface MTP devices, not libmtp. Has this changed?

The serial number at the USB level obviously differs from the one at the MTP level. This is probably a firmware bug.

libmtp 0.3.0+ has a safer way of identifying a device by using the raw device descriptor, which gives the device physical attachment point in the USB hierarchy. And it can also handle multiple devices... I would migrate to libmtp 0.3.0 (Amarok 2.0 will use it too) ASAP as this solves this and a few other issues as well.
Comment 18 Rafael K. Tesser 2008-08-07 17:55:20 UTC
(In reply to comment #17)
> (I'm a developer on libmtp)
> 
> First, last time I checked, Banshee was using libgphoto2 to interface MTP
> devices, not libmtp. Has this changed?
> 
Yes it has changed. I didn't use any of  the previous versions of Banshee but the 1.0.0 uses libmtp.

> The serial number at the USB level obviously differs from the one at the MTP
> level. This is probably a firmware bug.
> 

Yes it really seems to be the problem, if banshee expects them to be equal. The lart part of the number is 05355400 in both lshal and mtp-detect. But in lshal a BEBE appears in the beginning of the number and in mtp-detect there are only zeros in the beginning of the number.

> libmtp 0.3.0+ has a safer way of identifying a device by using the raw device
> descriptor, which gives the device physical attachment point in the USB
> hierarchy. And it can also handle multiple devices... I would migrate to libmtp
> 0.3.0 (Amarok 2.0 will use it too) ASAP as this solves this and a few other
> issues as well.
> 
Yes, it would be good. I am willing to know if libmtp 3.0 a and Banshee will handle folders the right way for my device. I was looking for using Banshee because I am trying to find a player which works well with directories for albums and artists. But i couldn't test it yet because of this bug. Amarok has support for creating folders but the stable version creates repeated folders in device. 
Comment 19 Chris Hurley 2008-09-20 03:08:54 UTC
FYI... I'm having same problems with a Palm Treo680 and pocket tunes.  Running Ubuntu heron and Banshee 0.13.2.
Comment 20 Chris Hurley 2008-09-20 03:14:04 UTC
Created attachment 119027 [details]
hal-device output from Palm Treo 680 w/ Pocket Tunes
Comment 21 Loyl 2008-10-24 13:23:29 UTC
I've the same bug with my W910i.
Comment 22 xavier 2008-12-06 17:20:12 UTC
Same here with a Nokia N78.
Comment 23 Guillaume Beland 2009-01-05 04:07:58 UTC
Created attachment 125768 [details]
hal-device output yp-p2

Same thing happen with my samsung yp-p2, which had work nicely with banshee in the past.

attached is my hal-device output.
Comment 24 Gabriel Burt 2009-01-13 22:18:29 UTC
Comment on attachment 115462 [details]
Debug patch for MtpSource.cs

Unmaking debug code as a patch
Comment 25 Gabriel Burt 2009-01-30 00:19:20 UTC
*** Bug 562664 has been marked as a duplicate of this bug. ***
Comment 26 nyall 2009-08-13 17:10:15 UTC
Has anyone successfully got a sony nwz device working with banshee and mtp? Are there any hacky workarounds that I could use for now?
Comment 27 nyall 2009-08-13 22:04:29 UTC
Here's a patch which bypasses (fixes?) the problem for me. I'm unsure if this bug only affects sony walkman products, so i've left the original logic in place for other manufacturers, but for sony at least, it seems the check is backward.

For me:
mtp_serial is (00000000000000000000000005453003)
device.serial is (10FA17D5453003)

Comment 28 nyall 2009-08-13 22:05:02 UTC
Created attachment 140709 [details] [review]
Fixes mtp detection of sony walkman products
Comment 29 Rob 2009-08-13 22:30:29 UTC
First of all, that patch doesn't work like that. You forgot to close one set of parentheses and to open the curly bracket on the first line of additional code.

I used the patch against banshee-1.5.0 and then tried hooking up my Sony Walkman NWZ-S639F. It still does not connect. This is the output to console:

-------------------------------------

[Info  00:24:08.034] Running Banshee 1.5.0: [source-tarball (linux-gnu, i686) @ 2009-08-14 00:21:35 CEST]

(Banshee:5670): GStreamer-WARNING **: Failed to load plugin '/usr/lib/gstreamer-0.10/libgstofa.so': libofa.so.0: cannot open shared object file: No such file or directory
[Info  00:24:09.176] All services are started 1.015852s
[Info  00:24:09.845] nereid Client Started
[Warn  00:24:10.855] Caught an exception - NoDeviceAttached (in `Mtp')
  at Mtp.Error.CheckError (ErrorCode errorCode) [0x00000] 
  at Mtp.MtpDevice.GetConnectedDevices (System.IntPtr& list) [0x00000] 
  at Mtp.MtpDevice.Detect () [0x00000] 
  at Banshee.Dap.Mtp.MtpSource.DeviceInitialize (IDevice device) [0x00000] 
[Warn  00:24:10.941] Caught an exception - NoDeviceAttached (in `Mtp')
  at Mtp.Error.CheckError (ErrorCode errorCode) [0x00000] 
  at Mtp.MtpDevice.GetConnectedDevices (System.IntPtr& list) [0x00000] 
  at Mtp.MtpDevice.Detect () [0x00000] 
  at Banshee.Dap.Mtp.MtpSource.DeviceInitialize (IDevice device) [0x00000] 
[Warn  00:24:11.039] Caught an exception - NoDeviceAttached (in `Mtp')
  at Mtp.Error.CheckError (ErrorCode errorCode) [0x00000] 
  at Mtp.MtpDevice.GetConnectedDevices (System.IntPtr& list) [0x00000] 
  at Mtp.MtpDevice.Detect () [0x00000] 
  at Banshee.Dap.Mtp.MtpSource.DeviceInitialize (IDevice device) [0x00000] 
System.DllNotFoundException: libnss_mdns-0.2.so
  at (wrapper managed-to-native) Mono.Zeroconf.Providers.Bonjour.Native:DNSServiceCreateConnection (Mono.Zeroconf.Providers.Bonjour.ServiceRef&)
  at Mono.Zeroconf.Providers.Bonjour.Zeroconf.Initialize () [0x00000] 
  at Mono.Zeroconf.Providers.Bonjour.ZeroconfProvider.Initialize () [0x00000] 
  at Mono.Zeroconf.Providers.ProviderFactory.GetProviders () [0x00000]
Comment 30 nyall 2009-08-13 22:36:16 UTC
Created attachment 140715 [details] [review]
fixed version of patch with proper parenthesis
Comment 31 nyall 2009-08-13 22:43:38 UTC
Created attachment 140716 [details]
add debug info to track problem

Rob - can you try with this patch applied too for some more debugging info?
Comment 32 Rob 2009-08-13 22:52:52 UTC
Doesn't seem to actually get to that point in the code, 'cause I can't see the expected debugging output. Here is the output of mtp-detect, it doesn't actually do anything and I have to cancel it:

$ sudo mtp-detect 
libmtp version: 0.3.7

Listing raw device(s)
   Found 1 device(s):
   Sony: Walkman NWZ-S638F (054c:038e) @ bus 0, dev 3
Attempting to connect device(s)
^C


Here is the output again for banshee:

$ banshee-1 
[Info  00:50:46.658] Running Banshee 1.5.0: [source-tarball (linux-gnu, i686) @ 2009-08-14 00:45:36 CEST]

(Banshee:17957): GStreamer-WARNING **: Failed to load plugin '/usr/lib/gstreamer-0.10/libgstofa.so': libofa.so.0: cannot open shared object file: No such file or directory
[Info  00:50:47.761] All services are started 0.97388s
[Info  00:50:48.423] nereid Client Started
[Warn  00:50:49.377] Caught an exception - NoDeviceAttached (in `Mtp')
  at Mtp.Error.CheckError (ErrorCode errorCode) [0x00000] 
  at Mtp.MtpDevice.GetConnectedDevices (System.IntPtr& list) [0x00000] 
  at Mtp.MtpDevice.Detect () [0x00000] 
  at Banshee.Dap.Mtp.MtpSource.DeviceInitialize (IDevice device) [0x00000] 
[Warn  00:50:49.499] Caught an exception - NoDeviceAttached (in `Mtp')
  at Mtp.Error.CheckError (ErrorCode errorCode) [0x00000] 
  at Mtp.MtpDevice.GetConnectedDevices (System.IntPtr& list) [0x00000] 
  at Mtp.MtpDevice.Detect () [0x00000] 
  at Banshee.Dap.Mtp.MtpSource.DeviceInitialize (IDevice device) [0x00000] 
[Warn  00:50:49.545] Caught an exception - NoDeviceAttached (in `Mtp')
  at Mtp.Error.CheckError (ErrorCode errorCode) [0x00000] 
  at Mtp.MtpDevice.GetConnectedDevices (System.IntPtr& list) [0x00000] 
  at Mtp.MtpDevice.Detect () [0x00000] 
  at Banshee.Dap.Mtp.MtpSource.DeviceInitialize (IDevice device) [0x00000] 
System.DllNotFoundException: libnss_mdns-0.2.so
  at (wrapper managed-to-native) Mono.Zeroconf.Providers.Bonjour.Native:DNSServiceCreateConnection (Mono.Zeroconf.Providers.Bonjour.ServiceRef&)
  at Mono.Zeroconf.Providers.Bonjour.Zeroconf.Initialize () [0x00000] 
  at Mono.Zeroconf.Providers.Bonjour.ZeroconfProvider.Initialize () [0x00000] 
  at Mono.Zeroconf.Providers.ProviderFactory.GetProviders () [0x00000] 
Comment 33 nyall 2009-08-13 22:57:30 UTC
Hmmm... if mtp-detect isn't connecting, then I'm guessing it's a different bug to the one I've been seeing. For me (and the supplied patch), mtp-detect works fine and returns the expected output. I think you must be running into a different bug with libmt8 itself.
Comment 34 Gabriel Burt 2009-09-11 21:08:57 UTC
Comment on attachment 140715 [details] [review]
fixed version of patch with proper parenthesis

Please make it } else if { on one line
Comment 35 nyall 2009-09-11 21:14:24 UTC
Created attachment 143024 [details] [review]
updated version of the patch

Ok, here's an updated version.
Comment 36 Gabriel Burt 2009-10-05 18:56:52 UTC
Comment on attachment 143024 [details] [review]
updated version of the patch

Committed, thanks Nyall.
Comment 37 William McKee 2009-12-25 17:35:59 UTC
I see this bug is resolved but since I'm seeing this behavior under Ubuntu Karmic (9.10) and latest release of Banshee (1.5.2) downloaded from the developer's ppa, I figured I'd post here rather than open a new ticket. 

MP3 hardware is a Samsung YP-S3 with firmware 1.12. All mtp utils functions work and I can access the device via Rhythmbox or Gnomad2.

One thing I've noticed about the mtp lib is that if the device is open in Rhythmbox, I cannot use the mtp utils. Not sure if this is a symptom of a bigger issue or expected behavior.