<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Enabling button scrolling on L/R with middle button emulation enabled triggers a bug"
href="https://bugs.freedesktop.org/show_bug.cgi?id=99845">99845</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Enabling button scrolling on L/R with middle button emulation enabled triggers a bug
</td>
</tr>
<tr>
<th>Product</th>
<td>Wayland
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>libinput
</td>
</tr>
<tr>
<th>Assignee</th>
<td>wayland-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>peter.hutterer@who-t.net
</td>
</tr></table>
<p>
<div>
<pre>Enabling button scrolling on the left or right button with middle button
emulation enabled triggers a timer bug assertion in libinput. Cause is that
once the middle button expires, it sends the button event with the original
event timestamp (but delayed by the timeout).
That feeds into the scroll button emulation code which triggers the next
timer for the scroll expiry, based on the event timestamp. That triggers the
assertion in the timer system because it checks the current time against the
event timestamp (which is now in the past).
Output from the test suite:
litest debug: event18: tagged as LIBINPUT_MODEL_TRACKBALL
litest debug: event18: tagged as LIBINPUT_MODEL_LOGITECH_MARBLE_MOUSE
litest debug: event18: tagged as ID_INPUT_TRACKBALL
litest info: input device 'litest Logitech USB Trackball',
/dev/input/event18 is tagged by udev as: Mouse Trackball
litest info: input device 'litest Logitech USB Trackball',
/dev/input/event18 is a pointer caps
litest debug: middlebuttonstate: MIDDLEBUTTON_IDLE →
MIDDLEBUTTON_EVENT_L_DOWN → MIDDLEBUTTON_LEFT_DOWN, rc 1
litest error: libinput bug: timer offset negative (-100109)
FAILED: aborting
libinput bug triggered, aborting.
in litest_log_handler() (litest.c:803)
Backtrace:
0: litest_fail_condition() (.today/libinput/test/litest.c:284)
1: litest_log_handler() (.today/libinput/test/litest.c:804)
2: /home/whot/tmp/today/libinput/src/.libs/libinput.so.10 (log_msg_va+0x52)
[0x7fab423f5206]
3: /home/whot/tmp/today/libinput/src/.libs/libinput.so.10 (log_msg+0xba)
[0x7fab423f52c3]
4: /home/whot/tmp/today/libinput/src/.libs/libinput.so.10
(libinput_timer_set+0x5c) [0x7fab4241d6c0]
5: /home/whot/tmp/today/libinput/src/.libs/libinput.so.10
(evdev_button_scroll_button+0x53) [0x7fab423fda3c]
6: /home/whot/tmp/today/libinput/src/.libs/libinput.so.10
(evdev_pointer_notify_button+0x4a) [0x7fab423fdb28]
7: /home/whot/tmp/today/libinput/src/.libs/libinput.so.10
(middlebutton_post_event+0x2c) [0x7fab42405246]
8: /home/whot/tmp/today/libinput/src/.libs/libinput.so.10
(evdev_middlebutton_ldown_handle_event+0x14d) [0x7fab42405423]
9: /home/whot/tmp/today/libinput/src/.libs/libinput.so.10
(evdev_middlebutton_handle_event+0x87) [0x7fab42405b8f]
10: /home/whot/tmp/today/libinput/src/.libs/libinput.so.10
(evdev_middlebutton_handle_timeout+0x38) [0x7fab42405f26]
11: /home/whot/tmp/today/libinput/src/.libs/libinput.so.10
(libinput_timer_handler+0x110) [0x7fab4241d8d7]
12: /home/whot/tmp/today/libinput/src/.libs/libinput.so.10
(libinput_dispatch+0xbe) [0x7fab423f8e10]
13: litest_button_scroll() (.today/libinput/test/litest.c:2094)
14: pointer_scroll_button() (.today/libinput/test/test-pointer.c:999)
15: /lib64/libcheck.so.0 (srunner_run+0x869) [0x7fab42839db9]
16: litest_run_suite() (.today/libinput/test/litest.c:945)
17: litest_run() (.today/libinput/test/litest.c:998)
18: main() (.today/libinput/test/litest.c:3581)
19: /lib64/libc.so.6 (__libc_start_main+0xf1) [0x7fab412ed401]
20: ./test/libinput-test-suite-runner (_start+0x2a) [0x40980a]
21: ? (?+0x2a) [0x2a]</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>