Bug 23881 - KeyError: 'audio' in session.py
Summary: KeyError: 'audio' in session.py
Status: RESOLVED FIXED
Alias: None
Product: papyon
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Louis-Francis Ratté-Boulianne
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-12 05:55 UTC by Guillaume Desmottes
Modified: 2009-11-15 12:49 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Guillaume Desmottes 2009-09-12 05:55:49 UTC
I was testing audio only calls and got this trace:

Traceback (most recent call last):
  File "/home/cassidy/dev/papyon/build/lib.linux-x86_64-2.6/papyon/sip/connection.py", line 92, in on_message_received
    call.on_message_received(message)
  File "/home/cassidy/dev/papyon/build/lib.linux-x86_64-2.6/papyon/sip/call.py", line 174, in on_message_received
    handler(msg)
  File "/home/cassidy/dev/papyon/build/lib.linux-x86_64-2.6/papyon/sip/call.py", line 487, in on_bye_response
    self.dispose()
  File "/home/cassidy/dev/papyon/build/lib.linux-x86_64-2.6/papyon/sip/call.py", line 387, in dispose
    MediaCall.dispose(self)
  File "/home/cassidy/dev/papyon/build/lib.linux-x86_64-2.6/papyon/media/call.py", line 87, in dispose
    self._media_session.close()
  File "/home/cassidy/dev/papyon/build/lib.linux-x86_64-2.6/papyon/media/session.py", line 112, in close
    self.remove_stream(stream)
  File "/home/cassidy/dev/papyon/build/lib.linux-x86_64-2.6/papyon/media/session.py", line 166, in remove_stream
    for handler_id in self._signals[name]:
KeyError: 'audio'
Comment 1 Guillaume Desmottes 2009-09-17 09:40:54 UTC
Just got this bug again after closing an established incoming audio/video call.
Comment 2 Olivier Crête 2009-09-22 10:21:07 UTC
Here is one more copy of the same bug:

Traceback (most recent call last):
  File "/home/tester/cinst/lib/python2.6/site-packages/papyon/msnp2p/session_manager.py", line 53, in <lambda>
    lambda tr, blob: self._on_blob_received(blob))
  File "/home/tester/cinst/lib/python2.6/site-packages/papyon/msnp2p/session_manager.py", line 172, in _on_blob_received
    session._on_blob_received(blob)
  File "/home/tester/cinst/lib/python2.6/site-packages/papyon/msnp2p/session.py", line 217, in _on_blob_received
    self._on_bye_received(message)
  File "/home/tester/cinst/lib/python2.6/site-packages/papyon/msnp2p/webcam.py", line 108, in _on_bye_received
    self.dispose()
  File "/home/tester/cinst/lib/python2.6/site-packages/papyon/msnp2p/webcam.py", line 93, in dispose
    MediaCall.dispose(self)
  File "/home/tester/cinst/lib/python2.6/site-packages/papyon/media/call.py", line 79, in dispose
    self._media_session.close()
  File "/home/tester/cinst/lib/python2.6/site-packages/papyon/media/session.py", line 112, in close
    self.remove_stream(stream)
  File "/home/tester/cinst/lib/python2.6/site-packages/papyon/media/session.py", line 167, in remove_stream
    for handler_id in self._signals[name]:
KeyError: 'video'
Comment 3 Youness Alaoui 2009-10-26 10:08:39 UTC
It should be fixed by these two changes in butterfly and papyon :
http://git.collabora.co.uk/?p=user/kakaroto/papyon.git;a=shortlog;h=refs/heads/fix-23881
http://git.collabora.co.uk/?p=user/kakaroto/telepathy-butterfly.git;a=shortlog;h=refs/heads/fix-23881

The problem was that telepathy-farsight was sending a stream_error because empathy would dispose of the tf channel before the close on the channel is handled by butterfly. So butterfly removed the stream from the session but didn't remove it correctly, then when the close on the channel reaches tp-butterfly, it removes the stream a second time, and it crashes.

The fix ends the whole call if a stream gets an error.. it's not really a "proper" fix, but in the case of MSN you can't downgrade a call.
The fix in papyon just makes sure we don't get the bug if a stream is closed twice, but we should also make sure a stream isn't added twice to the channel, although it won't happen, that would a cleaner fix.
Comment 4 Olivier Le Thanh Duong 2009-11-15 12:49:49 UTC
Merged both branches


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.