[Bug 77844] displayconfig-restore.py can crash kde login with ZeroDivisionError

Michael Blakeley mike+ubuntu at blakeley.com
Wed Jan 3 18:35:43 UTC 2007

Public bug reported:

Binary package hint: kde-guidance

$ uname -a
Linux mblakele-lt 2.6.20-2-generic #3 SMP Sat Dec 16 07:43:26 UTC 2006 x86_64 GNU/Linux
$ apt-show-versions kde-guidance
kde-guidance/feisty uptodate 0.7.1~svn20061215-0ubuntu1

I'm not sure how to reproduce this- it may be due to an error in my
xorg.conf - but recently I've noticed that I must login twice after any
restart. The first login appears to succeed, but kde seems to crash and
X restarts. The second login successfully starts kde.

Looking at .xsession-errors after one of these crashes, I see a ZeroDivisionError, on line 84:
  w_dpi = float(width)/(float(width_mm)/24.5)

So apparently width_mm is 0.

The next line in .xsession-errors may also be related:
  Size 1400x1050 not found in available modes.

Suggested change: check for 0 width_mm and do something sensible - not
sure what that would be, but doing nothing would be better than

** Affects: kde-guidance (Ubuntu)
     Importance: Undecided
         Status: Unconfirmed

displayconfig-restore.py can crash kde login with ZeroDivisionError

More information about the kubuntu-bugs mailing list