feisty: gajim does not start up correctly

Bug #174406 reported by Michael Nagel
4
Affects Status Importance Assigned to Milestone
gajim (Ubuntu)
Invalid
Undecided
Unassigned
Feisty
Fix Released
Undecided
Philipp Kern

Bug Description

Binary package hint: gajim

gajim does not start up correctly and produces quite some output when started from console, the last lines being:

  File "gajim.py", line 432, in handle_event_status
    self.roster.on_status_changed(account, status)
  File "/usr/share/gajim/src/roster_window.py", line 3038, in on_status_changed
    self.chg_contact_status(contact, 'offline', '', account)
  File "/usr/share/gajim/src/roster_window.py", line 1203, in chg_contact_status
    self.add_contact_to_roster(contact.jid, account)
  File "/usr/share/gajim/src/roster_window.py", line 315, in add_contact_to_roster
    shown_family)
  File "/usr/share/gajim/src/common/contacts.py", line 419, in get_metacontacts_big_brother
    score = self._get_data_score(data)
  File "/usr/share/gajim/src/common/contacts.py", line 399, in _get_data_score
    score = (max_order - order)*10000
TypeError: unsupported operand type(s) for -: 'unicode' and 'unicode'

It seems that the XML handling converts the attribute "order='0'" to return a unicode string instead of a simple number where arithmetic operations could be applied on. According to RFC 3921 the order attribute contains an unsigned int so that cast should be safe.

TEST CASE: Run Gajim on the console and the exception given above is printed in it. Depending on the roster it could lead to it being unusable.

Revision history for this message
Philipp Kern (pkern) wrote :

Taking this over.

Changed in gajim:
assignee: nobody → pkern
status: New → Confirmed
Revision history for this message
Philipp Kern (pkern) wrote :
Philipp Kern (pkern)
description: updated
description: updated
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted into feisty-proposed, please test. Please get this fixed in Hardy, too (SRU policy mandates fixing a bug in the development release first).

Changed in gajim:
status: Confirmed → Fix Committed
Revision history for this message
Philipp Kern (pkern) wrote :

This is already fixed in Hardy because the code changed massively.

Changed in gajim:
status: New → Invalid
Revision history for this message
Philipp Kern (pkern) wrote :

Michael, please confirm to the bug report that http://de.archive.ubuntu.com/ubuntu/pool/universe/g/gajim/gajim_0.11.1-0ubuntu3.1_i386.deb fixes your problem.

Revision history for this message
Michael Nagel (nailor) wrote :

it fixes the problem

Revision history for this message
Philipp Kern (pkern) wrote :

Works fine on our pool of Etch machines, which is basically the same version of Gajim.

Revision history for this message
Nafallo Bjälevik (nafallo) wrote :

Looks sane to me, even to I don't have the resources needed to test the fix.

Revision history for this message
Martin Pitt (pitti) wrote :

Copied to feisty-updates

Changed in gajim:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.