Bug 37479 - mouseconfig segfaults if /dev/mouse is set to ttyS0 and X is not configured.
Summary: mouseconfig segfaults if /dev/mouse is set to ttyS0 and X is not configured.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: mouseconfig
Version: 7.1
Hardware: i386
OS: Linux
low
low
Target Milestone: ---
Assignee: Matt Wilson
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-04-24 20:28 UTC by Panic
Modified: 2005-10-31 22:00 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-04-24 20:48:13 UTC
Embargoed:


Attachments (Terms of Use)

Description Panic 2001-04-24 20:28:23 UTC
mouseconfig segfaults if /dev/mouse points to ttyS0 (1,2,...), X is not
configured, and no mouse is present.  If the soft link is returned to psaux
manually, mouseconfig runs normally again.

Reproducible: Always (the 3 times I tested it)

Steps to reproduce:

1.  Run mouseconfig, and choose a Generic Mouse on ttyS0 (with no mouse
present, simulating user confusion over which serial port the mouse is
plugged into). 

2.  Select No when asked to make the XF86Config changes.

3.  mouseconfig exits.  note the symlink /dev/mouse -> /dev/ttyS0, but
/etc/sysconfig/mouse looks like this:

MOUSETYPE="Microsoft"
XMOUSETYPE="Microsoft"
FULLNAME="Generic Mouse (serial)"
XEMU3=yes
DEVICE=/dev/mouse

4.  Running mouseconfig again gives this error (across the top of the screen):

mouseconfig: line 5 unexpected in /etc/sysconfig/mouse

And the box shows:

There was an error reading the file /etc/sysconfig/mouse.  Would you like
to proceed in creating a new configuration?

5.  Hit OK.  This presents you with a choice of serial mice.  Choosing
another mouse again results in the same behavior (probably because of the
missing mouse).

6.  The problem comes when you try to get back to using a PS/2 mouse. 
Since mouseconfig no longer gives you the option to choose a PS/2 mouse (or
anything else) you delete /etc/sysconfig/mouse and...

7.  Run mouseconfig again, which tries to probe for a mouse and then
segfaults when it can't find one.

Results:

This seems to result from mouseconfig checking to see where /dev/mouse is
pointing, and then presenting you with options that apply there (apparently
all options apply to PS/2 mice).  If /dev/mouse is pointed to a serial port
without a mouse, mouseconfig cannot handle that situation and either
segfaults or presents with the error and won't allow you to switch back to
/dev/psaux.

Expected behavior:

The expected behavior would be for mouseconfig to allow you to choose your
mouse, and set up /dev/mouse, /etc/sysconfig/mouse, and the XF86Config file
accordingly.

Comment 1 Panic 2001-04-24 20:30:43 UTC
small addendum:  If /etc/sysconfig/mouse does not exist, mouseconfig continues
to segfault until you touch or otherwise re-create the file.

Comment 2 Panic 2001-04-24 20:48:08 UTC
another small addition:  Now my mouseconfig doesn't work at all (/dev/mouse ->
/dev/psaux, /etc/sysconfig/mouse exists but is empty).  I tried cleaning out
everything I could find -- the symlink, the /etc/sysconfig/mouse file, and the
XF86Config-4. Still no go.  I love test boxes...

Comment 3 Panic 2001-07-27 22:05:04 UTC
This should've been fixed by the 7.1 mouseconfig errata.  Closing - Errata.


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