Bug 27544 - Disconnecting during a channel creation doesn't unregister the path of channel
Summary: Disconnecting during a channel creation doesn't unregister the path of channel
Status: RESOLVED MOVED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: butterfly (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL: http://git.collabora.co.uk/?p=user/jo...
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2010-04-08 18:10 UTC by Olivier Le Thanh Duong
Modified: 2019-12-03 19:45 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Olivier Le Thanh Duong 2010-04-08 18:10:36 UTC
When we disconnect butterfly while it's creating a channel, the dbus path is already registered but we don't unregister it afterward. So after we reconnect and try to open a channel with the same name it fail, however Empathy seems to still use the channel and the messages we send are losts

Error when disconnecting :

Traceback (most recent call last):
  File "/home/olivier/Projects/papyon/papyon/client.py", line 471, in event
    self._dispatch(method_name, *args[:-1])
  File "/home/olivier/Projects/papyon/papyon/event/__init__.py", line 44, in _dispatch
    if event_handler._dispatch_event(name, *args):
  File "/home/olivier/Projects/papyon/papyon/event/__init__.py", line 65, in _dispatch_event
    handler(*params)
  File "/home/olivier/Projects/telepathy-butterfly/butterfly/connection.py", line 461, in on_oim_messages_fetched
    signal=True)
  File "/home/olivier/test/lib/python2.6/site-packages/telepathy/server/channelmanager.py", line 120, in channel_for_props
    return self.create_channel_for_props(props, signal, **args)
  File "/home/olivier/test/lib/python2.6/site-packages/telepathy/server/channelmanager.py", line 105, in create_channel_for_props
    props, **args)
  File "/home/olivier/Projects/telepathy-butterfly/butterfly/channel_manager.py", line 151, in _get_text_channel
    object_path=path)
  File "/home/olivier/Projects/telepathy-butterfly/butterfly/channel/im.py", line 54, in __init__
    conversation = papyon.Conversation(client, [contact])
  File "/home/olivier/Projects/papyon/papyon/conversation.py", line 62, in Conversation
    return SwitchboardConversation(client, contacts)
  File "/home/olivier/Projects/papyon/papyon/conversation.py", line 421, in __init__
    SwitchboardClient.__init__(self, client, contacts, priority=0)
  File "/home/olivier/Projects/papyon/papyon/switchboard_manager.py", line 54, in __init__
    self._process_pending_queues()
  File "/home/olivier/Projects/papyon/papyon/switchboard_manager.py", line 162, in _process_pending_queues
    if self._request_switchboard():
  File "/home/olivier/Projects/papyon/papyon/switchboard_manager.py", line 185, in _request_switchboard
    self._switchboard_manager.request_switchboard(self, self._switchboard_priority) # may set the switchboard immediatly
  File "/home/olivier/Projects/papyon/papyon/switchboard_manager.py", line 260, in request_switchboard
    request_switchboard(priority, self._ns_switchboard_request_response, handler)
  File "/home/olivier/Projects/papyon/papyon/util/decorator.py", line 111, in new_function
    func(*args, **kwargs)
  File "/home/olivier/Projects/papyon/papyon/msnp/notification.py", line 219, in request_switchboard
    self._send_command('XFR', ('SB',))
  File "/home/olivier/Projects/papyon/papyon/msnp/base.py", line 80, in _send_command
    increment, callback, *cb_args)
  File "/home/olivier/Projects/papyon/papyon/transport.py", line 207, in send_command_ex
    self.send_command(cmd, increment, callback, *cb_args)
  File "/home/olivier/Projects/papyon/papyon/transport.py", line 277, in send_command
    self._transport.send(str(command), self.__on_command_sent, *our_cb_args)
  File "/home/olivier/Projects/papyon/papyon/gnet/io/iochannel.py", line 157, in send
    assert(self._status == IoStatus.OPEN), self._status
AssertionError: 1
DEBUG:Butterfly.MailN


When a new connection is made and we try to reopen the channel:
DEBUG:Butterfly.ChannelManager:New text channel
Traceback (most recent call last):
  File "/home/olivier/Projects/papyon/papyon/client.py", line 471, in event
    self._dispatch(method_name, *args[:-1])
  File "/home/olivier/Projects/papyon/papyon/event/__init__.py", line 44, in _dispatch
    if event_handler._dispatch_event(name, *args):
  File "/home/olivier/Projects/papyon/papyon/event/__init__.py", line 65, in _dispatch_event
    handler(*params)
  File "/home/olivier/Projects/telepathy-butterfly/butterfly/connection.py", line 461, in on_oim_messages_fetched
    signal=True)
  File "/home/olivier/test/lib/python2.6/site-packages/telepathy/server/channelmanager.py", line 120, in channel_for_props
    return self.create_channel_for_props(props, signal, **args)
  File "/home/olivier/test/lib/python2.6/site-packages/telepathy/server/channelmanager.py", line 105, in create_channel_for_props
    props, **args)
  File "/home/olivier/Projects/telepathy-butterfly/butterfly/channel_manager.py", line 151, in _get_text_channel
    object_path=path)
  File "/home/olivier/Projects/telepathy-butterfly/butterfly/channel/im.py", line 42, in __init__
    ButterflyTextChannel.__init__(self, conn, manager, conversation, props, object_path)
  File "/home/olivier/Projects/telepathy-butterfly/butterfly/channel/text.py", line 56, in __init__
    object_path=object_path)
  File "/home/olivier/test/lib/python2.6/site-packages/telepathy/server/channel.py", line 232, in __init__
    object_path=object_path)
  File "/home/olivier/test/lib/python2.6/site-packages/telepathy/server/channel.py", line 62, in __init__
    _Channel.__init__(self, self._conn._name, object_path)
  File "/usr/lib/pymodules/python2.6/dbus/service.py", line 480, in __init__
    self.add_to_connection(conn, object_path)
  File "/usr/lib/pymodules/python2.6/dbus/service.py", line 571, in add_to_connection
    self._fallback)
KeyError: "Can't register the object-path handler for '/org/freedesktop/Telepathy/Connection/butterfly/msn/istaz_40live_2efr/TextChannel1': there is already a handler"
Comment 1 Jonny Lamb 2010-04-09 04:20:16 UTC
Interesting.

Can you try out the patch and see if my workaround sorts the problem?
Comment 2 Guillaume Desmottes 2010-06-09 01:14:31 UTC
This is a really nasty issue as the only way to workaround it is ot manually kill butterfly which isn't really user friendly.
Would be good to fix it asap.
Comment 3 GitLab Migration User 2019-12-03 19:45:09 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/telepathy/telepathy-butterfly/issues/14.


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.