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 792599 - mutter inhibit-shortcuts crash
mutter inhibit-shortcuts crash
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2018-01-17 11:34 UTC by Christoph Reiter (lazka)
Modified: 2018-05-03 09:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
example code (676 bytes, text/plain)
2018-01-17 11:34 UTC, Christoph Reiter (lazka)
  Details
mutter stack trace (4.14 KB, text/plain)
2018-01-17 11:34 UTC, Christoph Reiter (lazka)
  Details
[PATCH] wayland: shortcuts inhibitor requires a window (1.41 KB, patch)
2018-01-18 13:35 UTC, Olivier Fourdan
committed Details | Review

Description Christoph Reiter (lazka) 2018-01-17 11:34:28 UTC
Created attachment 366924 [details]
example code

The attached gtk+ code crashes mutter/gnome-shell.

It's a reduced example of some code I use for adding a grab for a popup window.
Comment 1 Christoph Reiter (lazka) 2018-01-17 11:34:53 UTC
Created attachment 366925 [details]
mutter stack trace
Comment 2 Jonas Ådahl 2018-01-18 10:46:40 UTC
The backtrace seems to involve the inhibit-shortcuts dialog.
Comment 3 Olivier Fourdan 2018-01-18 10:53:03 UTC
looking...
Comment 4 Olivier Fourdan 2018-01-18 13:07:26 UTC
Many thanks for the simple reproducer!

Indeed, this is trying to issue a shortcut inhibitor request on a surface without any window (the GtkWindow is just realized, never been mapped, so no MetaWindow).
Comment 5 Christoph Reiter (lazka) 2018-01-18 13:10:48 UTC
In previous gtk+/mutter versions trying to grab an already mapped window failed under wayland, so I moved the map after it.
Comment 6 Olivier Fourdan 2018-01-18 13:35:56 UTC
Created attachment 367016 [details] [review]
[PATCH] wayland: shortcuts inhibitor requires a window

Issuing a shortcut inhibit request for a surface without a window set
will lead to a crash when trying to show the shortcut inhibitor dialog.

In such a case, it's safer to deny the request.
Comment 7 Florian Müllner 2018-01-18 13:42:15 UTC
Review of attachment 367016 [details] [review]:

Makes sense to me
Comment 8 Olivier Fourdan 2018-01-18 14:49:20 UTC
Comment on attachment 367016 [details] [review]
[PATCH] wayland: shortcuts inhibitor requires a window

attachment 367016 [details] [review] pushed to git master as commit 13cf19e - wayland: shortcuts inhibitor requires a window

attachment 367016 [details] [review] pushed to branch gnome-3-26 as commit 77dd1bf - wayland: shortcuts inhibitor requires a window
Comment 9 Fernando 2018-05-03 08:48:38 UTC
Still happening in Evolution 3.28.1 (Fedora 28) when trying to insert an emoji. It stopped happening when changing dates in calendar events.
Comment 10 Olivier Fourdan 2018-05-03 09:37:59 UTC
This bug is about mutter crashing, do you mean mutter still crashes every time you try to insert an emoji in evolution?
Comment 11 Fernando 2018-05-03 09:47:52 UTC
Oh, no, sorry :S