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 627770 - MTP issue: PANIC: Could not open session! (Return code 767)
MTP issue: PANIC: Could not open session! (Return code 767)
Status: RESOLVED DUPLICATE of bug 627698
Product: banshee
Classification: Other
Component: Device - MTP
git master
Other Linux
: Normal minor
: 1.x
Assigned To: Banshee Maintainers
Banshee Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-08-23 21:13 UTC by David Nielsen
Modified: 2010-09-07 09:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
--debug log (69.18 KB, application/octet-stream)
2010-08-23 21:13 UTC, David Nielsen
Details
new log of the issue (10.83 KB, application/octet-stream)
2010-08-24 20:31 UTC, David Nielsen
Details

Description David Nielsen 2010-08-23 21:13:09 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
Comment 1 Gabriel Burt 2010-08-24 18:08:53 UTC
Does the `mtp-detect` command line tool run fine?  You might need the `libmtp-tools` or `mtp-tools` or mtp-utils package.
Comment 2 Gabriel Burt 2010-08-24 18:10:32 UTC
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.
Comment 3 David Nielsen 2010-08-24 19:14:15 UTC
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?
Comment 4 David Nielsen 2010-08-24 20:31:02 UTC
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.
Comment 5 Alan McGovern 2010-09-06 23:21:05 UTC
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.
Comment 6 David Nielsen 2010-09-07 09:19:35 UTC
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.
Comment 7 Alan McGovern 2010-09-07 09:29:24 UTC

*** This bug has been marked as a duplicate of bug 614657 ***
Comment 8 Alan McGovern 2010-09-07 09:29:53 UTC

*** This bug has been marked as a duplicate of bug 627698 ***
Comment 9 Alan McGovern 2010-09-07 09:30:25 UTC
It helps to choose the right bug# when marking it as a dupe ;)

Doh!