When oldtail is 0, miEventQueue.events[oldtail - 1] is out of bound.
Created attachment 9351 [details] [review] patch for this This patch resolved the problem except the case that the first event enqueued has type DeviceValuator.
this bug has been fixed a while ago. thanks for reporting!
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.