GNOME Bugzilla – Bug 627770
MTP issue: PANIC: Could not open session! (Return code 767)
Last modified: 2010-09-07 09:30:25 UTC
Created attachment 168591 [details] --debug log I get this when inserting my Sansa Fuze set in mtp mode. PTP_ERROR_IO: Trying again after re-initializing USB interface LIBMTP PANIC: Could not open session! (Return code 767) Try to reset the device. [10 Debug 23:11:10.156] Failed to connect to mtp device. Trying 0 more times... [10 Warn 23:11:12.229] Caught an exception - System.NullReferenceException: Object reference not set to an instance of an object (in `Banshee.Gio') at Banshee.Hardware.Gio.RawVolume.get_MountPoint () [0x00000] in /home/david/Projekter/banshee/src/Backends/Banshee.Gio/Banshee.Hardware.Gio/LowLevel/RawVolume.cs:126 at Banshee.Hardware.Gio.Volume.get_MountPoint () [0x00000] in /home/david/Projekter/banshee/src/Backends/Banshee.Gio/Banshee.Hardware.Gio/Volume.cs:51 at Banshee.Dap.MassStorage.MassStorageSource.DeviceInitialize (IDevice device) [0x0011f] in /home/david/Projekter/banshee/src/Dap/Banshee.Dap.MassStorage/Banshee.Dap.MassStorage/MassStorageSource.cs:96 at Banshee.Dap.DapService.FindDeviceSource (IDevice device) [0x00025] in /home/david/Projekter/banshee/src/Dap/Banshee.Dap/Banshee.Dap/DapService.cs:162
Does the `mtp-detect` command line tool run fine? You might need the `libmtp-tools` or `mtp-tools` or mtp-utils package.
The NRE shouldn't matter -- that's the MassStorage dap support trying to load it. Though I guess we could just return null (and check for that) instead of throwing. Reducing severity.
I think the system just got in a strange state. I now get this when I insert the device: [1 Debug 21:06:01.151] Unmapping DAP source (/devices/pci0000:00/0000:00:04.1/usb1/1-5/1-5:1.0/host7/target7:0:0/7:0:0:0/block/sdb/sdb2) Device 0 (VID=0781 and PID=74c2) is a SanDisk Sansa Fuze v2. [1 Info 21:06:44.302] Received device command: action = Activate, device = /home/david/.gvfs/gphoto2-montering på usb%3A002,004 PTP_ERROR_IO: Trying again after re-initializing USB interface [13 Debug 21:06:56.805] Found DAP support (Banshee.Dap.Mtp.MtpSource) for device Sansa Fuze 4GB and Uuid /devices/pci0000:00/0000:00:04.0/usb2/2-5 And adding media to the device works. Close?
Created attachment 168681 [details] new log of the issue I seem to be able to reproduce it by repeatedly inserting and ejecting the device. Output of mtp-detect when in this state. libmtp version: 1.0.3 Listing raw device(s) Device 0 (VID=0781 and PID=74c2) is a SanDisk Sansa Fuze v2. Found 1 device(s): SanDisk: Sansa Fuze v2 (0781:74c2) @ bus 1, dev 23 Attempting to connect device(s) PTP_ERROR_IO: Trying again after re-initializing USB interface ignoring usb_claim_interface = -9ignoring usb_claim_interface = -22LIBMTP PANIC: Could not open session! (Return code 767) Try to reset the device. Unable to open raw device 0 OK.
Do you have the gphoto2 backend for gvfs on your system? If so it's a known issue which has been filed upstream with them. They attempt to connect to all MTP/PTP devices on startup and there's no clean way for banshee to tell them to stop and let banshee have the device. The only workaround is to connect your device while banshee is *not* running, then wait for the gphoto2 backend to mount the device, then start banshee. This will allow banshee to unmount the device and take ownership of it correctly.
gvfs-gphoto2 is installed by default on Ubuntu (and most other current distros) so that is likely the cause. Closing as NOTGNOME as blame has been rightfully assigned.
*** This bug has been marked as a duplicate of bug 614657 ***
*** This bug has been marked as a duplicate of bug 627698 ***
It helps to choose the right bug# when marking it as a dupe ;) Doh!