<html>
    <head>
      <base href="https://bugzilla.gnome.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [Wayland]: Destroying the parent of a subsurface causes _gdk_window_destroy_hierarchy: assertion failed"
   href="https://bugzilla.gnome.org/show_bug.cgi?id=775319">775319</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[Wayland]: Destroying the parent of a subsurface causes _gdk_window_destroy_hierarchy: assertion failed
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Platform
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>gtk+
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.22.x
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Backend: Wayland
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>gtk-bugs@gtk.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>ofourdan@redhat.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>gtk-bugs@gtk.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>rob@robster.org.uk, wayland-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Depends on</th>
          <td>774475
          </td>
        </tr>

        <tr>
          <th>Blocks</th>
          <td>774546
          </td>
        </tr>

        <tr>
          <th>GNOME version</th>
          <td>---
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Description:

Creating a gdk window subsurface with another gdk window as parent generates
critical warnings:

  GLib-GObject-WARNING **: invalid (NULL) pointer instance
  GLib-GObject-CRITICAL **: g_signal_connect_data: assertion
'G_TYPE_CHECK_INSTANCE (instance)' failed
  GLib-GObject-WARNING **: invalid (NULL) pointer instance
  GLib-GObject-CRITICAL **: g_signal_connect_data: assertion
'G_TYPE_CHECK_INSTANCE (instance)' failed

Those are coming from _gdk_wayland_display_create_window_impl() because
gdk_window_get_frame_clock() returns NULL.

gdk_window_get_frame_clock() tries to get the frame clock from the toplevel, by
walking the window tree back to the corresponding top level.

Unfortunately, it does so by checking the window_type to be GDK_WINDOW_CHILD
whereas it can also be a GDL_WINDOW_SUBSURFACE now (<a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - wayland: gtk+ prevents using subsurfaces if the parent is not root"
   href="show_bug.cgi?id=774475">bug 774475</a>).

Since it cannot find the correct toplevel window, it returns NULL as the clock
frame, which then causes the critical warnings in
_gdk_wayland_display_create_window_impl()

Trivial patch to follow.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>