Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
gtk
gtk
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,152
    • Issues 1,152
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 146
    • Merge Requests 146
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • GNOME
  • gtkgtk
  • Merge Requests
  • !2809

Merged
Opened Nov 11, 2020 by Benedikt Ames@wisperwindContributor

Wayland: Fix segfault when receiving tablet/touch events for surfaces that have already been destroyed client-side

  • Overview 14
  • Commits 1
  • Pipelines 4
  • Changes 1

Fixes #3296 (closed)

The tablet part of the issue appears to be fixed for me: As described in the issue, I can reliably reproduce the crash without the patch, but didn't manage to do so with the fix.

The touch part of the patch is incomplete: It currently only ignores events in touch_handle_down(), but I'm quite certain that subsequent touch_handle_up, touch_handle_motion and touch_handle_cancel will still crash.

In the tablet case, there was an obvious way to check whether the surface is destroyed and we are ignoring all further events for it. Namely, by checking whether tool->current_tablet == NULL: This is reset to NULL after each proximity out event, and set to the respective tablet on the proximity in event. I couldn't find a similar indicator in the touch code. Maybe someone more familiar with the code can come up with an idea? Updated the MR with a version that might also fix the touch case. I don't have a touch device to test this, though.

The same issue existed some time ago for pointers and keyboards:

https://bugzilla.gnome.org/show_bug.cgi?id=693338

which was fixed in bfd7137f, 3625f178 and a8fc099a

This MR is relative to 3.24.23, a slight change is required for master.

Edited Nov 11, 2020 by Benedikt Ames
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Reference: GNOME/gtk!2809
Source branch: fix-tablet-3.24

Revert this merge request

This will create a new commit in order to revert the existing changes.

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.

Cherry-pick this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.