Bug 96536

Summary: XServer Crashes on UnmapWindow with PointerGrab and Touch
Product: xorg Reporter: Gerhard Muehlbauer <gerhard.m.jhoss>
Component: Server/Input/CoreAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: jean-noel.avila
Version: 7.7 (2012.06)   
Hardware: x86 (IA32)   
OS: Linux (All)   
i915 platform: i915 features:
Description Flags
Patch to avoid segmentation fault
Backtace for segmantation fault none

Description Gerhard Muehlbauer 2016-06-15 13:07:31 UTC

Comment 1 Gerhard Muehlbauer 2016-06-15 13:19:38 UTC
Created attachment 124542 [details] [review]
Patch to avoid segmentation fault
Comment 2 Gerhard Muehlbauer 2016-06-15 13:28:01 UTC
A QT application that does QWidget::grabGesture() on a window that is shown/hidden by touch events to another button sometimes crashes the XServer in dix/events.c function DeactivatePointerGrab(). See attacked backtrace.
My assumption is that the pointer "grab" is no more valid after some calls to touch functions.
My patch checks if the pointer in mouse->device.grab is still the same after the touch treatment. If not, a message is printed and the new pointer is loaded.
The patch solves the  problem for me and sometimes prints out messages that show the object in *grab has been replaced.
I don't  know ifthe patch is the solution or just a workaround.
Comment 3 Gerhard Muehlbauer 2016-06-15 13:29:43 UTC
Created attachment 124543 [details]
Backtace for segmantation fault
Comment 4 Marco Trevisan (Treviño) 2018-10-27 03:13:05 UTC
I've proposed another solution for this bug: https://gitlab.freedesktop.org/xorg/xserver/merge_requests/61
Comment 6 Marco Trevisan (Treviño) 2018-11-12 22:08:45 UTC
*** Bug 105557 has been marked as a duplicate of this bug. ***

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.