[ubuntu-x] Heisenbug in xserver-xorg-input-synaptics
lists.tormod at gmail.com
Sat Jan 7 17:09:50 UTC 2012
On Sat, Jan 7, 2012 at 5:48 PM, Chase Douglas
<chase.douglas at canonical.com> wrote:
> On 01/06/2012 06:05 PM, Chase Douglas wrote:
>> Hi all,
>> I tried to track down the bug in the X staging ppa
>> (ppa:ubuntu-x-swat/x-staging) that causes trackpads to flip to the edge
>> of the screen. This is what I found:
>> In the X server when there's a relative motion event it computes an
>> acceleration for it. You can follow the events from QueuePointerEvents()
>> to BasicComputeAcceleration(). BasicComputeAcceleration() then calls a
>> function pointer, which by default for the X synaptics driver calls back
>> into the driver's SynapticsAccelerationProfile() function.
>> If you set a breakpoint in BasicComputeAcceleration() with the condition
>> of "result > 10000", you'll get a hit. When you continue, your pointer
>> will flip to an edge of the screen. Generally, the value of the result
>> variable is on the order of +<some value>e+304 or inf when this occurs.
>> The next step is to try setting a breakpoint in
>> SynapticsAccelerationProfile() with the condition "accelfct > 10000" on
>> the return statement.
>> I compiled xserver-xorg-input-synaptics with noopt, but I wasn't able to
>> trigger the bug. Then, I compiled with the default optimizations, and
>> the bug reappeared, but the breakpoint with the condition was never hit.
>> I tried removing the condition, and the breakpoint worked as expected.
>> I've sent this to both ubuntu-x and ubuntu-devel to ask if anyone has
>> any ideas on how to debug this without getting to the level of
>> compiler/assembly/linker debugging :).
> Nevermind, I should have looked closer at the build log. The signature
> of the acceleration callback changed to returning a double instead of a
> float. This emitted a warning that I failed to see.
Just figured this out before seeing your mail :) You will need (at least)
Not only the return value changed type, also the input parameters. You
would see this in the debugger that e.g. acc was not the same inside
BasicComputeAcceleration() as inside SynapticsAccelerationProfile().
> -- Chase
> Ubuntu-x mailing list
> Ubuntu-x at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-x
More information about the Ubuntu-x