Red Hat Bugzilla – Bug 124800
Unusual Modeline names in X server config file crash system-config-display
Last modified: 2007-11-30 17:10:43 EST
When I run system-config-display I get
Traceback (most recent call last):
File "/usr/share/system-config-display/xconf.py", line 346, in ?
hardware_state = XF86HardwareState(xconfig)
File "/usr/lib/python2.3/site-packages/rhpl/xhwstate.py", line 151,
File "/usr/lib/python2.3/site-packages/rhpl/xhwstate.py", line 284,
File "/usr/lib/python2.3/site-packages/rhpl/xhwstate.py", line 55,
a1 = resolution_area(res1)
File "/usr/lib/python2.3/site-packages/rhpl/xhwstate.py", line 51,
(w, h) = resolution_from_string(res)
File "/usr/lib/python2.3/site-packages/rhpl/xhwstate.py", line 48,
return (string.atoi(w), string.atoi(h))
File "/usr/lib/python2.3/string.py", line 220, in atoi
return _int(s, base)
ValueError: invalid literal for int(): 900_100.00
This is because my /etc/X11/XF86Config file contains
ModeLine "1200x900_100.00" 157.1 1200 1296 1424 1648 900
901 904 953 -hsync +vsync
It seems that system-config-display expects the mode name to always be
'NxM' with N and M integer, but other names are also quite valid (the
above was generated by the standard 'gtf' program).
Suggest that system-config-display be changed to not make assumptions
about the mode name, or at least that if you do try to convert strings
to integers there is suitable exception handling when it fails.
(BTW, I don't fully understand why I still have an XF86Config file
when FC2 uses xorg - but I don't think the filename affects this bug
Changing component to rhpl since that's where this code lives.
Jeremy: I'm not sure how to handle this. Aside from the contents of
the second token in the ModeLine line, I don't know another easy way
to tell what resolution the mode line is set to. I guess you could
try to calculate it by the rest of the tokens in the line, but that
seems kindof hackish too.
I guess it would be valid to have "Foobar" in the modeline name field,
but that's not really helpful to anybody. My inclination is to say
that even though non-integer fields are technically valid, it's bad
practice to do this. I'd almost be in favor of changing gtf and xorg
to only accept integer values in this field.
*** Bug 123398 has been marked as a duplicate of this bug. ***
Surely it's quite simple - the second number in the modeline gives
horizontal resolution and the sixth gives vertical. This seems a lot
less hackish than expecting a magic string as the modeline name.
Fedora Core 2 is now maintained by the Fedora Legacy project for
security updates only. If this problem is a security issue, please
reopen and reassign to the Fedora Legacy product. If it is not a
security issue and hasn't been resolved in the current FC3 updates or
in the FC4 test release, reopen and change the version to match.
Closing as fixed in later releases