gnome-osd always crash

Bug #688138 reported by YunQiang Su on 2010-12-09
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-osd (Debian)
Fix Released
Unknown
gnome-osd (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: gnome-osd

After update to python 2.7 ,it always crash

even using
#!/usr/bin/env python2.6

$ python2.6 notify-cet6.py
ServerError: Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/gnomeosd/server.py", line 316, in message_show_cb
    osd_msg.show(message, timeout)
  File "/usr/lib/pymodules/python2.7/gnomeosd/server.py", line 127, in show
    self.__show_task = gtasklet.Tasklet(self._show_messages())
  File "/usr/lib/pymodules/python2.7/gnomeosd/gtasklet.py", line 644, in __init__
    self.__next_round() # bootstrap
  File "/usr/lib/pymodules/python2.7/gnomeosd/gtasklet.py", line 693, in __next_round
    gen_value = self.__invoke()
  File "/usr/lib/pymodules/python2.7/gnomeosd/gtasklet.py", line 672, in __invoke
    gen_value = self.gen.next()
  File "/usr/lib/pymodules/python2.7/gnomeosd/server.py", line 171, in _show_messages
    w.move(x, y_final)
TypeError: integer argument expected, got float

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: gnome-osd 0.12.2-1
ProcVersionSignature: Ubuntu 2.6.37-8.21-generic 2.6.37-rc4
Uname: Linux 2.6.37-8-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Fri Dec 10 00:17:25 2010
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Alpha amd64 (20100812)
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=zh_CN:zh_TW:zh:en
 PATH=(custom, user)
 LANG=zh_CN.utf8
 SHELL=/usr/bin/zsh
SourcePackage: gnome-osd

YunQiang Su (wzssyqa) wrote :
wiewi (lwldcr) wrote :

Got the same problem.

myhost ~$ gnome-osd-client "Hello,World"
ServerError: Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/gnomeosd/server.py", line 323, in message_show_cb
    osd_msg.show(message, timeout)
  File "/usr/lib/python2.7/site-packages/gnomeosd/server.py", line 136, in show
    self.__show_task = gtasklet.Tasklet(self._show_messages())
  File "/usr/lib/python2.7/site-packages/gnomeosd/gtasklet.py", line 644, in __init__
    self.__next_round() # bootstrap
  File "/usr/lib/python2.7/site-packages/gnomeosd/gtasklet.py", line 693, in __next_round
    gen_value = self.__invoke()
  File "/usr/lib/python2.7/site-packages/gnomeosd/gtasklet.py", line 672, in __invoke
    gen_value = self.gen.next()
  File "/usr/lib/python2.7/site-packages/gnomeosd/server.py", line 178, in _show_messages
    w.move(x, y_final)
TypeError: integer argument expected, got float

Gnome-osd version: gnome-osd_0.20.1
Python version: python-2.7.2
Locale: zh_CN.UTF-8
Kernel: 2.6.39

wiewi (lwldcr) wrote :

Sorry to mention that my distro is Arch Linux.

Dave Gordon (python-bugz) wrote :

Probably down to a change in Python 2.7. Up until 2.6, if you passed a float to a function that was defined as taking an int, the float would automatically be converted, though possibly with a DeprecationWarnng. In 2.7 (and Python 3000) it's now a TypeError. So, you have to put in an explicit conversion to int wherever this occurs.

There are quite a lot of packages affected by this!

Also, in the OP's case it was happening on python 2.6, but only after 2.7 was installed; the traceback shows that "python2.6" is actually using the library modules from 2.7, so it gets the same error.

Dave

Changed in gnome-osd (Debian):
status: Unknown → New
Changed in gnome-osd (Debian):
status: New → Fix Committed
Changed in gnome-osd (Debian):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-osd - 0.12.2-1.1

---------------
gnome-osd (0.12.2-1.1) unstable; urgency=low

  * Non-maintainer upload.
  * Fix "TypeError: integer argument expected, got float":
    add patch integer_division.patch from Thibaut Girka:
    - Fix type mismatch by using explicit integer divisions.
    (Closes: #648892, LP: #688138)

 -- gregor herrmann <email address hidden> Wed, 22 Feb 2012 17:54:06 +0100

Changed in gnome-osd (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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