Gdk-CRITICAL when GtkScrolledWindow unsetting scroll cursor
@mjog
Submitted by Michael Gratton Assigned to gtk..@..tk.org
Link to original bug (#778190)
Description
Since Bug 753202 landed, I'm now getting a Gdk-CRITICAL when GtkScrolledWindow unsets the scroll cursor, after a WebKitGTK+ web view has been removed from the toplevel's widget hierarchy.
This may be related to how WebKitGTK+ handles events (see https://bugs.webkit.org/show_bug.cgi?id=136430#c1) but I think it might happen any time a widget with a GDK window has been removed before the cursor is unset. In any case, GtkScrolledWindow probably shouldn't crash.
Representative stack error and stack trace below, but looking at the value of priv->scroll_window, in the call to uninstall_scroll_cursor (#5 (closed) in the stack below), I get the following:
(gdb) print priv->scroll_window.state $12 = GDK_WINDOW_STATE_WITHDRAWN (gdb) print priv->scroll_window.parent $13 = 0x0 (gdb) print priv->scroll_window.destroyed $14 = 1
Maybe an an extra test should be added to uninstall_scroll_cursor? I'll look into getting a patch to fix this.
(geary:16329): Gdk-CRITICAL **: gdk_window_set_cursor: assertion 'GDK_IS_WINDOW (window)' failed
Thread 1 "geary" received signal SIGTRAP, Trace/breakpoint trap. _g_log_abort (breakpoint=breakpoint@entry=1) at ././glib/gmessages.c:487 487 ././glib/gmessages.c: No such file or directory.
(gdb) bt
#0 0x00007ffff752c241 in _g_log_abort (breakpoint=breakpoint@entry=1)
at ././glib/gmessages.c:487
#1 0x00007ffff752d64d in g_logv (log_domain=0x7ffff2dc156e "Gdk", log_level=G_LOG_LEVEL_CRITICAL, format=<optimised out>, args=args@entry=0x7fffffffdb70)
at ././glib/gmessages.c:1296
#2 0x00007ffff752d7af in g_log (log_domain=log_domain@entry=0x7ffff2dc156e "Gdk", log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=format@entry=0x7ffff7578a1d "%s: assertion '%s' failed") at ././glib/gmessages.c:1337
#3 0x00007ffff752dc29 in g_return_if_fail_warning (log_domain=log_domain@entry=0x7ffff2dc156e "Gdk", pretty_function=pretty_function@entry=0x7ffff2dda280 <__func__.63956> "gdk_window_set_cursor", expression=expression@entry=0x7ffff2dc2034 "GDK_IS_WINDOW (window)")
at ././glib/gmessages.c:2456
#4 0x00007ffff2d6460f in gdk_window_set_cursor (window=<optimised out>, cursor=<optimised out>) at ././gdk/gdkwindow.c:6558
#5 0x00007ffff32d51dd in uninstall_scroll_cursor (scrolled_window=<optimised out>)
at ././gtk/gtkscrolledwindow.c:3410
#6 0x00007ffff32d7c19 in gtk_scrolled_window_scroll_event (widget=0x5555563a8390 [GtkScrolledWindow], event=0x7fff444ea720) at ././gtk/gtkscrolledwindow.c:3571
#7 0x00007ffff324df81 in _gtk_marshal_BOOLEAN__BOXEDv (closure=0x555555c36c30, return_value=0x7fffffffdea0, instance=0x5555563a8390, args=<optimised out>, marshal_data=<optimised out>, n_params=<optimised out>, param_types=0x555555c36c60)
at ././gtk/gtkmarshalers.c:131
#8 0x00007ffff78001a4 in _g_closure_invoke_va (closure=closure@entry=0x555555c36c30, return_value=return_value@entry=0x7fffffffdea0, instance=instance@entry=0x5555563a8390, args=args@entry=0x7fffffffdf70, n_params=<optimised out>, param_types=0x555555c36c60)
at ././gobject/gclosure.c:867
#9 0x00007ffff781a391 in g_signal_emit_valist (instance=0x5555563a8390, signal_id=<optimised out>, detail=0, var_args=var_args@entry=0x7fffffffdf70)
at ././gobject/gsignal.c:3300
#10 0x00007ffff781afaf in g_signal_emit (instance=instance@entry=0x5555563a8390, signal_id=<optimised out>, detail=detail@entry=0) at ././gobject/gsignal.c:3447
#11 0x00007ffff339b09c in gtk_widget_event_internal (widget=0x5555563a8390 [GtkScrolledWindow], event=0x7fff444ea720) at ././gtk/gtkwidget.c:7723
#12 0x00007ffff324af3e in propagate_event_up (topmost=<optimised out>, event=<optimised out>, widget=0x5555563a8390 [GtkScrolledWindow]) at ././gtk/gtkmain.c:2567
#13 0x00007ffff324af3e in propagate_event (widget=<optimised out>, event=0x7fff444ea720, captured=<optimised out>, topmost=0x0) at ././gtk/gtkmain.c:2669
#14 0x00007ffff324cfce in gtk_main_do_event (event=0x7fff444ea720)
at ././gtk/gtkmain.c:1890
#15 0x00007ffff2d51ed5 in _gdk_event_emit (event=event@entry=0x7fff444ea720)
at ././gdk/gdkevents.c:73
#16 0x00007ffff2d82ec2 in gdk_event_source_dispatch (source=<optimised out>, callback=<optimised out>, user_data=<optimised out>) at ././gdk/x11/gdkeventsource.c:367
#17 0x00007ffff75267d7 in g_main_dispatch (context=0x555555be00d0)
at ././glib/gmain.c:3203
---Type <return> to continue, or q <return> to quit---
#18 0x00007ffff75267d7 in g_main_context_dispatch (context=context@entry=0x555555be00d0) at ././glib/gmain.c:3856
#19 0x00007ffff7526a40 in g_main_context_iterate (context=context@entry=0x555555be00d0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimised out>)
at ././glib/gmain.c:3929
#20 0x00007ffff7526aec in g_main_context_iteration (context=context@entry=0x555555be00d0, may_block=may_block@entry=1) at ././glib/gmain.c:3990
#21 0x00007ffff7ae270d in g_application_run (application=0x555555bd1120 [GearyApplication], argc=2, argv=0x7fffffffe3e8) at ././gio/gapplication.c:2381
#22 0x00005555555d488b in _vala_main (args=0x7fffffffe3e8, args_length1=2) at /home/mjg/Projects/GNOME/geary/src/client/application/main.vala:33
#23 0x00007ffff04e23f1 in __libc_start_main (main=
0x5555555d46e0 <main>, argc=2, argv=0x7fffffffe3e8, init=<optimised out>, fini=<optimised out>, rtld_fini=<optimised out>, stack_end=0x7fffffffe3d8) at ../csu/libc-start.c:291
#24 0x00005555555d472a in _start ()
Version: 3.22.x