Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#5375 closed defect (fixed)

Traceback: KeyError u'foo@jabber.org'

Reported by: cilugnedon Owned by:
Priority: normal Milestone: 0.13
Component: chat Version: hg
Severity: normal Keywords:
Cc: Blocked By:
Blocking: OS: Unix

Description

Environment

Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41) on Ubuntu 9.04.

The traceback showed up upon reproduction of #5346. It's on hg checkout ab1f9ab7cc6c.

Setup

  • Start Gajim normally, client is called Machine
  • Start Gajim with another profile, e.g. gajim -p test, client is called Test
  • Login Machine on account foo@jabber.org, ressource is Machine and set status to available for foo@jabber.org/Machine
  • Login Test on account foo@jabber.org, ressource is Test and set status to invisible for foo@jabber.org/Test
  • On Machine, select Action - Start Chat - Account jabber.org and enter foo@jabber.org/Test. A chat window opens. Type some text and send it. The text will be received on Test. Go to Test and answer. The following traceback shows up:
Traceback (most recent call last):
  File "/usr/local/gajim/share/gajim/src/common/xmpp/idlequeue.py", line 497, in _process_events
    return IdleQueue._process_events(self, fd, flags)
  File "/usr/local/gajim/share/gajim/src/common/xmpp/idlequeue.py", line 367, in _process_events
    obj.pollin()
  File "/usr/local/gajim/share/gajim/src/common/xmpp/transports_nb.py", line 391, in pollin
    self._do_receive()
  File "/usr/local/gajim/share/gajim/src/common/xmpp/transports_nb.py", line 571, in _do_receive
    self._on_receive(received)
  File "/usr/local/gajim/share/gajim/src/common/xmpp/transports_nb.py", line 583, in _on_receive
    self.on_receive(data)
  File "/usr/local/gajim/share/gajim/src/common/xmpp/dispatcher_nb.py", line 445, in dispatch
    handler['func'](session, stanza)
  File "/usr/local/gajim/share/gajim/src/common/connection_handlers.py", line 2045, in _messageCB
    jid, invite, tim)
  File "/usr/local/gajim/share/gajim/src/common/connection_handlers.py", line 2058, in _on_message_decrypted
    session.received(frm, msgtxt, tim, encrypted, msg)
  File "/usr/local/gajim/share/gajim/src/session.py", line 93, in received
    self.control.change_resource(self.resource)
  File "/usr/local/gajim/share/gajim/src/chat_control.py", line 1491, in change_resource
    gajim.events.change_jid(self.account, old_full_jid, new_full_jid)
  File "/usr/local/gajim/share/gajim/src/common/events.py", line 165, in change_jid
    if old_jid not in self._events[account]:
KeyError: u'foo@jabber.org'

It doesn't matter how many tabs are opened.

I could reproduce the traceback several times as described above. I also tested with the foo@jabber.org/Test on a different machine using Gajim latest hg checkout.

Change History (4)

comment:1 Changed 7 years ago by Yann Leboulanger <asterix@…>

  • Resolution set to fixed
  • Status changed from new to closed

(In [7905d12c7bf0]) prevent traceback when changing resource of a control when there is no event for the account at all. Fixes #5375

comment:2 Changed 7 years ago by Yann Leboulanger <asterix@…>

(In [5d5f16e7d63b]) remove hack I did for #5366, It was most probably due to #5375. see #5366, #5375

comment:3 Changed 7 years ago by Yann Leboulanger <asterix@…>

(In [43346fd87f43]) prevent traceback when changing resource of a control when there is no event for the account at all. Fixes #5375

comment:4 Changed 7 years ago by Yann Leboulanger <asterix@…>

(In [be5323dd50a7]) remove hack I did for #5366, It was most probably due to #5375. see #5366, #5375

Note: See TracTickets for help on using tickets.