The bug has been opened on https://bugs.launchpad.net/ubuntu/+source/telepathy-butterfly/+bug/512596 and has some duplicates there The descriptions seems to indicate it happens when adding a buddy Stacktrace on 0.5.7 "Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/papyon/client.py", line 446, in event self._dispatch(method_name, *event_args) File "/usr/lib/pymodules/python2.6/papyon/event/__init__.py", line 44, in _dispatch if event_handler._dispatch_event(name, *args): File "/usr/lib/pymodules/python2.6/papyon/event/__init__.py", line 65, in _dispatch_event handler(*params) File "/usr/lib/python2.6/dist-packages/butterfly/channel/group.py", line 122, in on_addressbook_group_added self.AddMembers(self.__pending_add, None) File "/usr/lib/python2.6/dist-packages/butterfly/channel/group.py", line 71, in AddMembers contact_handle_id) File "/usr/lib/python2.6/dist-packages/butterfly/connection.py", line 139, in handle self.check_handle(handle_type, handle_id) File "/usr/lib/python2.6/dist-packages/telepathy/server/conn.py", line 154, in check_handle (handle, handle_type)) InvalidHandle: org.freedesktop.Telepathy.Error.InvalidHandle: handle number 18 not valid for type 1" Other stacktraces: http://launchpadlibrarian.net/38384257/Traceback.txt http://launchpadlibrarian.net/40823588/Traceback.txt
*** Bug 27829 has been marked as a duplicate of this bug. ***
Odd. Can I get some butterfly logs please?
Created attachment 35280 [details] butterfly.log bug with space. " example@correo.cl"
Created attachment 35283 [details] debbug2-butterfly.log Bug add user with spache in the end. "example@correo.cl "
Okay what's happening here is Empathy is calling RequestHandles for the contact you are trying to add, and then the contact list channel waits for the mutex to become unlocked before progressing. In the mean time, Empathy calls ReleaseHandles on the handle which was just requested. This means that the contact handle object gets disposed and gets lost from the Connection._handles dict. When the mutex unlocked callback gets called, it can't find the object, hence the traceback. However, if you try to add a contact which actually exists (i.e. not foo@example.com), then it kind of works, which is odd. It requests the handle of the contact, does something, then the callback gets called and the ReleaseHandles has already been called so it can't find the handle. However, papyon calls a callback with this new contact and a brand new handle appears out of the blue. I've not got time to look into this more right now, but I thought I'd write down what I know for now. We could use this as an excuse to push butterfly into the future of having connection-persistent handles?
Okay, so my diagnosis in comment #5 wasn't entirely correct. I was getting confused between the publish and subscribe lists. I've written a patch which should solve this. There's a big comment in the patch which should explain my reasoning. Testing adding new valid and invalid contacts appears to show this patch works as expected.
Better ideas of how to keep handle in scope until after finished_cb() are welcome. You can demonstrate that this scope hack works because if you try to add a bogus contact "boguscontact@example.com", watch it fail, then try RequestHandles on "boguscontact@example.com" gives you a new contact, which is cool.
*** Bug 27879 has been marked as a duplicate of this bug. ***
*** Bug 27907 has been marked as a duplicate of this bug. ***
Merged, this fix is available in butterfly 0.5.10
*** Bug 28122 has been marked as a duplicate of this bug. ***
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.