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 761651 - [Wayland] glade previewer is resizing windows until it crashes gnome-shell
[Wayland] glade previewer is resizing windows until it crashes gnome-shell
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Wayland
3.20.x
Other All
: Normal critical
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: WaylandRelated
 
 
Reported: 2016-02-06 21:38 UTC by Christian Stadelmann
Modified: 2016-04-26 09:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH] wayland: do not update shadows for child windows (1.18 KB, patch)
2016-04-07 14:02 UTC, Olivier Fourdan
none Details | Review
Simple reproducer for testing purpose. (1.89 KB, text/plain)
2016-04-08 11:31 UTC, Olivier Fourdan
  Details
[PATCH] wayland: do not update shadows for child windows (1.28 KB, patch)
2016-04-08 12:38 UTC, Olivier Fourdan
committed Details | Review

Description Christian Stadelmann 2016-02-06 21:38:37 UTC
Steps to reproduce:
1. open glade on a gnome+wayland session
2. build some ui
3. preview UI
4. focus ui by clicking on window header or GtkHeaderBar

What happens:
Window is constantly increasing its width and height until it crashes and takes gnome-shell with it.

What should happen:
No reason to resize window, so don't resize window

There might be other issues with glade too, but this is pretty obvious and most users should be running into it.

For detailed backtraces see downstream bug report https://bugzilla.redhat.com/show_bug.cgi?id=1277723
Comment 1 Christian Stadelmann 2016-02-06 21:48:24 UTC
I'm marking this bug as critical since according to [1] https://wiki.gnome.org/Initiatives/Wayland/Applications this should not be present and the wayland port is gaining more attention. It's not far from being "as important as X".

[1] https://wiki.gnome.org/Initiatives/Wayland/Applications

I'm running these software versions, on Fedora 23:
glade-3.19.0-3.fc23
gtk3-3.18.7-1.fc23
glib2-2.46.2-1.fc23

(In reply to Christian Stadelmann from comment #0)
> There might be other issues with glade too, but this is pretty obvious and
> most users should be running into it.

I meant: There might be other issues with glade on wayland, …
Comment 2 Olivier Fourdan 2016-04-07 13:27:33 UTC
Matthias pointed out this bug to me some time ago, but it escaped my radar for some reason, sorry :(

The problem occurs because glade-previewer places a the previewed gtkwindow inside a gtkwindow, and the shadows update of the inner child gtkwindow will cause this infinite growth.

I have some sort of a fix to avoid that, trying to polish it a bit...
Comment 3 Olivier Fourdan 2016-04-07 14:02:46 UTC
Created attachment 325542 [details] [review]
[PATCH] wayland: do not update shadows for child windows

This is a first try, it fixes the issue but there are some rendering issues now.
Comment 4 Olivier Fourdan 2016-04-08 11:31:24 UTC
=> Moving to gtk+
Comment 5 Olivier Fourdan 2016-04-08 11:31:50 UTC
Created attachment 325583 [details]
Simple reproducer for testing purpose.
Comment 6 Olivier Fourdan 2016-04-08 11:37:26 UTC
Good thing is this doesn't seem top be a regression caused by my CSD window size patches in 3.20 (for once!) because the exact same occurs with gtk+-3.18...
Comment 7 Olivier Fourdan 2016-04-08 12:38:10 UTC
Created attachment 325585 [details] [review]
[PATCH] wayland: do not update shadows for child windows

This patch fixes the "resize of death" issue and the shadow glitches.

Not entirely sure if it could have nasty side effects though...
Comment 8 Matthias Clasen 2016-04-08 13:31:40 UTC
Review of attachment 325585 [details] [review]:

Updating the opaque region should also be strictly toplevel-only, maybe ?
Comment 9 Olivier Fourdan 2016-04-08 13:47:33 UTC
(In reply to Matthias Clasen from comment #8)
> Review of attachment 325585 [details] [review] [review]:
> 
> Updating the opaque region should also be strictly toplevel-only, maybe ?

Yes, it is, because of the return above :) Now, if not a toplevel, we do nothing.
Comment 10 Matthias Clasen 2016-04-08 13:52:53 UTC
Review of attachment 325585 [details] [review]:

Ah, I totally misread the patch. Lets commit this to master now - if nobody screams, I'll cherry pick it for 3.20
Comment 11 Olivier Fourdan 2016-04-08 15:05:02 UTC
Comment on attachment 325585 [details] [review]
[PATCH] wayland: do not update shadows for child windows

attachment 325585 [details] [review] pushed to git *master* as commit 83e7751 - wayland: do not update shadows for child windows
Comment 12 Olivier Fourdan 2016-04-08 15:06:51 UTC
(In reply to Matthias Clasen from comment #10)
> [...] Lets commit this to master now - if nobody screams, I'll cherry pick 
> it for 3.20

Done, leaving the bug opened until we are sure the fix is harmless and we can get it in 3.20 as well.
Comment 13 Olivier Fourdan 2016-04-22 15:24:22 UTC
Matthias, do you think we could add this patch to the branch gtk-3.20 now?

Been a couple of weeks now, and I did not hear back from it in master.
Comment 14 Matthias Clasen 2016-04-25 13:19:01 UTC
sure, lets do it
Comment 15 Olivier Fourdan 2016-04-26 09:01:11 UTC
Thanks, closing then (I see you cherry-picked it in branch gtk-3-20 as commit 115af7c)