Bug 83314 - redhat-config-xfree86 crashes if XF86Config contains no Modes line
redhat-config-xfree86 crashes if XF86Config contains no Modes line
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: redhat-config-xfree86 (Show other bugs)
8.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Brent Fox
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-02-02 06:29 EST by Need Real Name
Modified: 2008-05-01 11:38 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-03-15 19:09:37 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2003-02-02 06:29:21 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021212

Description of problem:
If XF86Config contains a display section like this :

Section "Screen"
	Identifier "Screen0"
	Device     "geforce0"
	Monitor    "Monitor0"
	DefaultDepth     24
	SubSection "Display"
		Depth     24
#		Modes    "1024x768"
	EndSubSection
EndSection

then 'redhat-config-xfree86' will crash with : 

Traceback (most recent call last):
  File "/usr/share/redhat-config-xfree86/xconf.py", line 1585, in ?
    hardware_state = HardwareState(xconfig)
  File "/usr/share/redhat-config-xfree86/xconf.py", line 181, in __init__
    self.init_from_xconfig(xconfig)
  File "/usr/share/redhat-config-xfree86/xconf.py", line 266, in init_from_xconfig
    self.resolution = d.modes[0].name
IndexError: index out-of-bounds

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. comment out Modes line
2. start redhat-config-xfree86
3. .. crash.
    

Actual Results:  app crashes.

Expected Results:  app should never crash.

Additional info:

With commented out Modes line, XFree86 runs fine and chooses highest possible
resolution.
Comment 1 Brent Fox 2003-02-05 14:32:49 EST
I've made is so that the system falls back to 800x600.  That should be a low
enough mode to work on most monitors.  That will at least get the
redhat-config-xfree86 interface up and running.  Then if you want a higher
resolution, you can pick it in the menu.

Also, this probing code has been moved to rhpl, so you will need a new rhpl and
a new redhat-config-xfree86.

Should be fixed in rhpl-0.84-1 and redhat-config-xfree86-0.7.3-2.  QA, please
verify.
Comment 2 Peter van Egdom 2003-03-15 06:00:47 EST
Commented out the Modes lines from my "/etc/X11/XF86Config" file and started
"redhat-config-xfree86".

"redhat-config-xfree86" starts correctly and defaults to 800x600. Quit program.

Recommented out again the new Modes line from my "/etc/X11/XF86Config" file and
started "redhat-config-xfree86" again.

"redhat-config-xfree86" again starts correctly and defaults to 800x600.

So, verified fixed with packages "redhat-config-xfree86-0.7.3-2" and
"rhpl-0.92-1" on Phoebe 8.0.94.

Note You need to log in before you can comment on or make changes to this bug.