After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 760669 - wayland: crash when closing window after drag
wayland: crash when closing window after drag
Status: RESOLVED OBSOLETE
Product: mutter
Classification: Core
Component: wayland
git master
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks: WaylandRelated
 
 
Reported: 2016-01-15 12:00 UTC by Marek Chalupa
Modified: 2021-07-05 13:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
repick after ending the grab (1.15 KB, patch)
2016-01-15 12:02 UTC, Marek Chalupa
none Details | Review

Description Marek Chalupa 2016-01-15 12:00:32 UTC
Reproducer:
1. start GDK_BACKEND=x11 gtk3-demo
2. start Tool palete
3. drag icon/emoticon to quit cross (keep the button pressed), change to another window using Alt+Tab, drop icon (release the press), click on cross

After these steps the pointer->focus_surface has dangling reference on destroyed surface and gnome-shell crashes when setting new focus.
Comment 1 Marek Chalupa 2016-01-15 12:02:36 UTC
Created attachment 319095 [details] [review]
repick after ending the grab
Comment 2 Jonas Ådahl 2016-02-22 10:18:35 UTC
I can't reproduce the issue you are describing. As far as I can see we add a destroy listener to the pointer->focus_surface that unsets the focus if it goes away.

Are you maybe referring to pointer->current? If so, I think we'd rather need to add a destroy listener to pointer->current surface (or a weak pointer really, since thats pretty much the same with a lot less code).
Comment 3 Marek Chalupa 2016-04-25 13:13:54 UTC
I can not reproduce the issue anymore too and I don't remember the details. Damn me that I didn't put here better explanation, or at least a backtrace...

I think that the problem was that

interface->focus (pointer->grab, pointer->current);

was called (that is meta_wayland_pointer_set_focus()), the pointer->current was correctly set to NULL (since the focused surface was destroyed), but the pointer->focus_surface was not NULL (it was dangling reference) and gnome-shell crashed.

This patch made the code call sync_focus_surface before setting new focus, so focus_surface was correctly NULL.
Comment 4 GNOME Infrastructure Team 2021-07-05 13:49:11 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/mutter/-/issues/

Thank you for your understanding and your help.