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 749339 - [Wayland] Gdk-CRITICAL **: gdk_window_get_display: assertion 'GDK_IS_WINDOW (window)' failed
[Wayland] Gdk-CRITICAL **: gdk_window_get_display: assertion 'GDK_IS_WINDOW (...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Wayland
3.16.x
Other Windows
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2015-05-13 22:43 UTC by Christian Stadelmann
Modified: 2015-08-16 16:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
backtrace of gedit running under gnome/wayland session (8.16 KB, text/plain)
2015-05-14 13:45 UTC, Christian Stadelmann
  Details
backtrace of evince running on gnome/wayland (9.28 KB, text/plain)
2015-05-14 13:45 UTC, Christian Stadelmann
  Details
wayland: Don't assume drag context has a source window when finalizing (1.95 KB, patch)
2015-08-03 06:38 UTC, Jonas Ådahl
committed Details | Review

Description Christian Stadelmann 2015-05-13 22:43:31 UTC
Steps to reproduce: (tested on several Fedora 22 installations)
1. log in to your gnome/wayland session
2. open some applications (windows) based on gtk
3. switch to tty
4. check syslog

You will see that some gtk applications print this error message:

Gdk-CRITICAL **: gdk_window_get_display: assertion 'GDK_IS_WINDOW (window)' failed

this e.g. affects abrt, transmission, evolution-alarm-notify, gnome-terminal-server. I can only reproduce this bug on gnome/wayland, not on gnome/X11.
Comment 1 Christian Persch 2015-05-14 08:50:17 UTC
Please get a backtrace from the critical.
Comment 2 Christian Stadelmann 2015-05-14 13:45:00 UTC
Created attachment 303365 [details]
backtrace of gedit running under gnome/wayland session
Comment 3 Christian Stadelmann 2015-05-14 13:45:35 UTC
Created attachment 303366 [details]
backtrace of evince running on gnome/wayland
Comment 4 Matthias Clasen 2015-05-15 02:20:58 UTC
What version of gtk3 was this with ? It looks to me like this should have been fixed quite a while ago.
Comment 5 Christian Stadelmann 2015-05-15 09:40:36 UTC
gtk3 3.16.2 from gtk3-3.16.2-2.fc22 package. Up-to-date F22 beta with updates + updates-testing enabled.
Comment 6 Christian Stadelmann 2015-07-12 10:22:43 UTC
It is still present with gtk3-3.16.5-1.fc22
Comment 7 AGS 2015-08-03 05:50:05 UTC
This leads to a crash and hang on Wayland with 'gtk3-3.16.6-1.fc22' with the following logs:

(gnome-terminal-server:3193):
Gdk-CRITICAL **: gdk_device_get_window_at_position_double: assertion 'GDK_IS_DEVICE (device)' failed
Gdk-CRITICAL **: gdk_window_get_toplevel: assertion 'GDK_IS_WINDOW (window)' failed
Gdk-CRITICAL **: gdk_window_get_device_position_double: assertion 'GDK_IS_WINDOW (window)' failed

This happened when I pulled a Terminal window from one workspace to the other in overview mode while running Wayland, btw. I'm on Intel HD 4000.
Comment 8 Jonas Ådahl 2015-08-03 06:35:49 UTC
(In reply to AGS from comment #7)
> This leads to a crash and hang on Wayland with 'gtk3-3.16.6-1.fc22' with the
> following logs:
> 
> (gnome-terminal-server:3193):
> Gdk-CRITICAL **: gdk_device_get_window_at_position_double: assertion
> 'GDK_IS_DEVICE (device)' failed
> Gdk-CRITICAL **: gdk_window_get_toplevel: assertion 'GDK_IS_WINDOW (window)'
> failed
> Gdk-CRITICAL **: gdk_window_get_device_position_double: assertion
> 'GDK_IS_WINDOW (window)' failed
> 
> This happened when I pulled a Terminal window from one workspace to the
> other in overview mode while running Wayland, btw. I'm on Intel HD 4000.

These errors are unrelated to the ones mentioned in this bug. They are also probably fixed by bug 748951.

Anyhow, I think I have a fix for the issue originally reported. Patch coming.
Comment 9 Jonas Ådahl 2015-08-03 06:38:01 UTC
Created attachment 308651 [details] [review]
wayland: Don't assume drag context has a source window when finalizing

Only a drag context which was created with 'drag_begin' will be
guaranteed to have a source window. Thus, in finalize we cannot assume
we can retrieve a GdkDisplay from the source_window pointer since it
may be NULL. Though, the display is only needed for contexts created
via 'drag_begin' thus we can retrieve it after checking that is the
case.
Comment 10 Carlos Garnacho 2015-08-03 15:32:23 UTC
Review of attachment 308651 [details] [review]:

Oops indeed. FWIW, the dest-side GdkDragContext is also set a source window, but is only supposedly valid between data_device.enter/leave. The patch looks good, but the commit log might need clarification.

During testing I've also noticed other warnings, filled in bug #753185 for these.
Comment 11 Jonas Ådahl 2015-08-05 02:33:16 UTC
Attachment 308651 [details] pushed as 2776374 - wayland: Don't assume drag context has a source window when finalizing
Comment 12 AGS 2015-08-16 16:44:34 UTC
I've created a new bug for my issue, I think it may be related:

"Fatal system crash when dragging gnome-terminal window between workspaces..."
https://bugzilla.gnome.org/show_bug.cgi?id=753690