Bug 22392

Summary: Recent changes to git head break gnome-settings-daemon
Product: xorg Reporter: François-Denis Gonthier <neumann>
Component: Server/GeneralAssignee: Peter Hutterer <peter.hutterer>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: bgamari
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Ignores mappings of value 0
none
New patch removing entire check
none
Another patch none

Description François-Denis Gonthier 2009-06-20 20:05:54 UTC
Changes done recently to Xserver git or xf86-driver-input-synaptics crash gnome-settings-daemon:

I've built the current git HEAD for xserver, and the git head of xf86-driver-input-synaptics with the patch that is included in this message:

http://lists.freedesktop.org/archives/xorg/2009-June/046108.html

xtrace output, just before the crash:

000:>:015f:44: Reply to GetPointerMapping:  map=0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x00,0x00,0x00,0x00,0x00;
000:<:0160: 16: Request(116): SetPointerMapping  map=0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x00,0x00,0x00,0x00,0x00;
000:>:160:Error 2=Value: major=0, minor=116, bad=0
The program 'gnome-settings-daemon' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadValue (integer parameter out of range for operation)'.
  (Details: serial 352 error_code 2 request_code 116 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
[1245550950,000,xklavier.c:xkl_engine_start_listen/] 	The backend does not require manual layout management - but it is provided by the application%

I've went around this by removing the XSetPointerMapping call from gnome-settings-daemon.

Everything was working perfectly before the switch to XInput2.
Comment 1 François-Denis Gonthier 2009-06-20 20:38:26 UTC
Created attachment 26988 [details] [review]
Ignores mappings of value 0
Comment 2 François-Denis Gonthier 2009-06-20 20:41:32 UTC
I have attached a patch which fixes the problem for me.  It ignores mappings of value 0, just like BadDeviceMap did before the Xi2 merge.  Changing the bug Component since the patch is on xserver
Comment 3 Peter Hutterer 2009-06-21 16:55:07 UTC
since map is a CARD8 (unsigned char) and 0 is a valid value, wouldn't it be easier to just remove the check altogether?
seems like checking an unsigned 8 bit value for values < 0 and > 255 is rather pointless :)
Comment 4 François-Denis Gonthier 2009-06-21 20:00:20 UTC
Ah, it is quite obvious now that you say it :)
Comment 5 Peter Hutterer 2009-06-21 20:02:00 UTC
can you resubmit the patch please so the authorship information is correct? I'll push it to master then. Thanks
Comment 6 Peter Hutterer 2009-06-22 00:00:40 UTC
for the archive: bug uncovered by 280b7f92d729ec910ffa3d18dce7bbc215be7a3c
Comment 7 Ben Gamari 2009-06-22 05:57:33 UTC
Created attachment 27003 [details] [review]
New patch removing entire check

In the interest of moving things along, here's a patch to remove the entire check as Peter suggested. Seems to fix the issue on this side.
Comment 8 François-Denis Gonthier 2009-06-22 11:33:20 UTC
That's a bit nitpicky, but I don't think errval_out is useful as a parameter anymore if you remove the check.
Comment 9 Ben Gamari 2009-06-22 11:44:01 UTC
Created attachment 27019 [details] [review]
Another patch

Very good point; missed that entirely. This patch removes the parameter as well.
Comment 10 Ben Gamari 2009-06-23 23:05:35 UTC
Considering this is now committed I guess we can call this closed.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.