Bug 37100 - telepathy-butterfly crashed with ValueError in Received(): You can't receive the same message twice.
Summary: telepathy-butterfly crashed with ValueError in Received(): You can't receive ...
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:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2011-05-11 02:21 UTC by Pedro Villavicencio
Modified: 2019-12-03 19:47 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Fixing the issue by incrementing the recv id correctly. (1.41 KB, patch)
2011-10-10 06:45 UTC, Nathan Samson
Details | Splinter Review

Description Pedro Villavicencio 2011-05-11 02:21:43 UTC
this report has been filed here:

https://bugs.launchpad.net/ubuntu/+source/telepathy-butterfly/+bug/763242

"I was in invisible mode in empathy....error message appeared several times" 

Traceback:

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/papyon/client.py", line 517, in event
    self._dispatch(method_name, *args[:-1])
  File "/usr/lib/pymodules/python2.7/papyon/event/__init__.py", line 44, in _dispatch
    if event_handler._dispatch_event(name, *args):
  File "/usr/lib/pymodules/python2.7/papyon/event/__init__.py", line 65, in _dispatch_event
    handler(*params)
  File "/usr/lib/python2.7/dist-packages/butterfly/connection.py", line 480, in on_oim_messages_fetched
    channel.offline_message_received(message)
  File "/usr/lib/python2.7/dist-packages/butterfly/channel/im.py", line 194, in offline_message_received
    self._signal_text_received(id, timestamp, handle, type, 0, message.display_name, text)
  File "/usr/lib/python2.7/dist-packages/butterfly/channel/text.py", line 157, in _signal_text_received
    self.Received(id, timestamp, sender, type, flags, text)
  File "/usr/lib/pymodules/python2.7/dbus/decorators.py", line 293, in emit_signal
    func(self, *args, **keywords)
  File "/usr/lib/python2.7/dist-packages/telepathy/server/channel.py", line 296, in Received
    raise ValueError("You can't receive the same message twice.")
ValueError: You can't receive the same message twice.
Comment 1 Nathan Samson 2011-10-10 06:45:07 UTC
Created attachment 52173 [details] [review]
Fixing the issue by incrementing the recv id correctly.

I've fixed the issue.

The root cause for me was a crash in ButterflyTextChannel._signal_text_received
(UnicodeDecodeError). The message ended up in the pending messages queue, but the current ID did not increase. The attached patch fixes this.

Fixing the crashes in _signal_text_received would also be a good idea (the UnicodeDecodeError has already been reported). The easiest way to fix that would probably be using python 3 instead of python 2...
Comment 2 Nathan Samson 2011-11-10 04:43:57 UTC
See also https://github.com/nathansamson/Telepathy-Butterfly for my patch in git repo
Comment 3 GitLab Migration User 2019-12-03 19:47:32 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/56.


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.