<html>
<head>
<base href="https://bugzilla.gnome.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [Wayland] Crash under gdk_wayland_window_attach_image()"
href="https://bugzilla.gnome.org/show_bug.cgi?id=793062#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [Wayland] Crash under gdk_wayland_window_attach_image()"
href="https://bugzilla.gnome.org/show_bug.cgi?id=793062">bug 793062</a>
from <span class="vcard"><a href="page.cgi?id=describeuser.html&login=ofourdan%40redhat.com" title="Olivier Fourdan <ofourdan@redhat.com>"> <span class="fn">Olivier Fourdan</span></a>
</span></b>
<pre>I wonder how we can end up in end_paint() with a wl_surface being NULL.
_gdk_frame_clock_emit_paint() ends up calling gtk_widget_render() which calls
gdk_window_end_draw_frame (window, context) which calls
gdk_window_impl_wayland_end_paint(), but there the window's wl_surface is NULL.
As Martin pointed out, this is from:
1833 case GDK_EXPOSE:
1834 if (event->any.window)
1835 gtk_widget_render (event_widget, event->any.window,
event->expose.region);
1836 break;
So the window here from event->any.window has its wl_surface NULL.
That event here comes from _gdk_window_process_updates_recurse_helper():
3835 /* While gtk+ no longer handles exposes on anything but native
3836 window we still have to send them to all windows that have the
3837 event mask set for backwards compat. We also need to send
3838 it to all native windows, even if they don't specify the
3839 expose mask, because they may have non-native children that do. */
3840 if (gdk_window_has_impl (window) ||
3841 window->event_mask & GDK_EXPOSURE_MASK)
3842 {
3843 GdkEvent event;
3844
3845 event.expose.type = GDK_EXPOSE;
3846 event.expose.window = window; /* we already hold a ref */
3847 event.expose.send_event = FALSE;
3848 event.expose.count = 0;
3849 event.expose.region = clipped_expose_region;
3850 cairo_region_get_extents (clipped_expose_region,
&event.expose.area);
3851
3852 _gdk_event_emit (&event);
3853 }
3854
And this is from gdk_window_process_updates_internal(window) called from:
4163 static void
4164 gdk_window_process_updates_with_mode (GdkWindow *window,
4165 int recurse_mode)
4166 {
...
4174
4175 find_impl_windows_to_update (list, window, recurse_mode);
4176
4177 if (window->impl_window != window)
4178 g_ptr_array_add (list, g_object_ref (window->impl_window));
4179
4180 for (i = (int)list->len - 1; i >= 0; i --)
4181 {
4182 GdkWindow *impl_window = g_ptr_array_index (list, i);
4183
4184 if (impl_window->update_area &&
4185 !impl_window->update_freeze_count &&
4186 !gdk_window_is_toplevel_frozen (impl_window) &&
4187
4188 /* Don't recurse into process_updates_internal, we'll
4189 * do the update later when idle instead. */
4190 !impl_window->in_update)
4191 {
4192 gdk_window_process_updates_internal (impl_window);
4193 gdk_window_remove_update_window (impl_window);
4194 }
4195 }</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>