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 787274 - ComboBox in appears-as-list-mode: Gtk-CRITICAL when popping down with scrollbar fully shown
ComboBox in appears-as-list-mode: Gtk-CRITICAL when popping down with scrollb...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkComboBox
3.22.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2017-09-04 22:58 UTC by Daniel Boles
Modified: 2017-10-04 22:22 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Daniel Boles 2017-09-04 22:58:59 UTC
With a GtkComboBox having the style property appears-as-list set to TRUE, any time you release and cause the CB to popdown, when the Scrollbar was fully shown due to having started a drag, you get this:

> (testcombochange:28421): Gtk-CRITICAL **: gtk_css_gadget_queue_allocate: assertion 'GTK_IS_CSS_GADGET (gadget)' failed


backtrace:

Thread 1 "testcombochange" received signal SIGTRAP, Trace/breakpoint trap.
_g_log_abort (breakpoint=1) at /home/daniel/jhbuild/checkout/gnome/glib/glib/gmessages.c:554
warning: Source file is more recent than executable.
554	}
(ins)(gdb) bt
  • #0 _g_log_abort
    at /home/daniel/jhbuild/checkout/gnome/glib/glib/gmessages.c line 554
  • #1 g_logv
    at /home/daniel/jhbuild/checkout/gnome/glib/glib/gmessages.c line 1362
  • #2 g_log
    at /home/daniel/jhbuild/checkout/gnome/glib/glib/gmessages.c line 1403
  • #3 g_return_if_fail_warning
  • #4 gtk_css_gadget_queue_allocate
    at /home/daniel/jhbuild/checkout/gnome/gtk+-3/gtk/gtkcssgadget.c line 953
  • #5 range_grab_remove
    at /home/daniel/jhbuild/checkout/gnome/gtk+-3/gtk/gtkrange.c line 2461
  • #6 stop_scrolling
    at /home/daniel/jhbuild/checkout/gnome/gtk+-3/gtk/gtkrange.c line 3012
  • #7 gtk_range_unmap
    at /home/daniel/jhbuild/checkout/gnome/gtk+-3/gtk/gtkrange.c line 2266
  • #8 g_cclosure_marshal_VOID__VOIDv
    at /home/daniel/jhbuild/checkout/gnome/glib/gobject/gmarshal.c line 905
  • #9 g_type_class_meta_marshalv
    at /home/daniel/jhbuild/checkout/gnome/glib/gobject/gclosure.c line 1024
  • #10 _g_closure_invoke_va
    at /home/daniel/jhbuild/checkout/gnome/glib/gobject/gclosure.c line 867
  • #11 g_signal_emit_valist
    at /home/daniel/jhbuild/checkout/gnome/glib/gobject/gsignal.c line 3300
  • #12 g_signal_emit
    at /home/daniel/jhbuild/checkout/gnome/glib/gobject/gsignal.c line 3447
  • #13 gtk_widget_unmap
    at /home/daniel/jhbuild/checkout/gnome/gtk+-3/gtk/gtkwidget.c line 5027
  • #14 gtk_scrolled_window_forall
    at /home/daniel/jhbuild/checkout/gnome/gtk+-3/gtk/gtkscrolledwindow.c line 3021
  • #15 gtk_container_forall
    at /home/daniel/jhbuild/checkout/gnome/gtk+-3/gtk/gtkcontainer.c line 2440
  • #16 gtk_container_unmap
    at /home/daniel/jhbuild/checkout/gnome/gtk+-3/gtk/gtkcontainer.c line 3702
  • #17 gtk_scrolled_window_unmap
    at /home/daniel/jhbuild/checkout/gnome/gtk+-3/gtk/gtkscrolledwindow.c line 4141
  • #18 g_cclosure_marshal_VOID__VOIDv
    at /home/daniel/jhbuild/checkout/gnome/glib/gobject/gmarshal.c line 905
  • #19 g_type_class_meta_marshalv
    at /home/daniel/jhbuild/checkout/gnome/glib/gobject/gclosure.c line 1024
  • #20 _g_closure_invoke_va
    at /home/daniel/jhbuild/checkout/gnome/glib/gobject/gclosure.c line 867
  • #21 g_signal_emit_valist
    at /home/daniel/jhbuild/checkout/gnome/glib/gobject/gsignal.c line 3300
  • #22 g_signal_emit
    at /home/daniel/jhbuild/checkout/gnome/glib/gobject/gsignal.c line 3447
  • #23 gtk_widget_unmap
    at /home/daniel/jhbuild/checkout/gnome/gtk+-3/gtk/gtkwidget.c line 5027
  • #24 gtk_window_unmap
    at /home/daniel/jhbuild/checkout/gnome/gtk+-3/gtk/gtkwindow.c line 6433
  • #25 g_cclosure_marshal_VOID__VOID
    at /home/daniel/jhbuild/checkout/gnome/glib/gobject/gmarshal.c line 875
  • #26 g_type_class_meta_marshal
    at /home/daniel/jhbuild/checkout/gnome/glib/gobject/gclosure.c line 997
  • #27 g_closure_invoke
    at /home/daniel/jhbuild/checkout/gnome/glib/gobject/gclosure.c line 804
  • #28 signal_emit_unlocked_R
    at /home/daniel/jhbuild/checkout/gnome/glib/gobject/gsignal.c line 3565
  • #29 g_signal_emit_valist
    at /home/daniel/jhbuild/checkout/gnome/glib/gobject/gsignal.c line 3391
  • #30 g_signal_emit
    at /home/daniel/jhbuild/checkout/gnome/glib/gobject/gsignal.c line 3447
  • #31 gtk_widget_unmap
    at /home/daniel/jhbuild/checkout/gnome/gtk+-3/gtk/gtkwidget.c line 5027
  • #32 gtk_window_hide
    at /home/daniel/jhbuild/checkout/gnome/gtk+-3/gtk/gtkwindow.c line 6194
  • #33 g_cclosure_marshal_VOID__VOID
    at /home/daniel/jhbuild/checkout/gnome/glib/gobject/gmarshal.c line 875
  • #34 g_type_class_meta_marshal
    at /home/daniel/jhbuild/checkout/gnome/glib/gobject/gclosure.c line 997
  • #35 g_closure_invoke
    at /home/daniel/jhbuild/checkout/gnome/glib/gobject/gclosure.c line 804
  • #36 signal_emit_unlocked_R
    at /home/daniel/jhbuild/checkout/gnome/glib/gobject/gsignal.c line 3565
  • #37 g_signal_emit_valist
    at /home/daniel/jhbuild/checkout/gnome/glib/gobject/gsignal.c line 3391
  • #38 g_signal_emit
    at /home/daniel/jhbuild/checkout/gnome/glib/gobject/gsignal.c line 3447
  • #39 gtk_widget_hide
    at /home/daniel/jhbuild/checkout/gnome/gtk+-3/gtk/gtkwidget.c line 4895
  • #40 gtk_combo_box_popdown
    at /home/daniel/jhbuild/checkout/gnome/gtk+-3/gtk/gtkcombobox.c line 2448
  • #41 gtk_combo_box_list_button_released
    at /home/daniel/jhbuild/checkout/gnome/gtk+-3/gtk/gtkcombobox.c line 3179
  • #42 _gtk_marshal_BOOLEAN__BOXED
    at gtkmarshalers.c line 82
  • #43 g_closure_invoke
    at /home/daniel/jhbuild/checkout/gnome/glib/gobject/gclosure.c line 804
  • #44 signal_emit_unlocked_R
    at /home/daniel/jhbuild/checkout/gnome/glib/gobject/gsignal.c line 3635
  • #45 g_signal_emit_valist
    at /home/daniel/jhbuild/checkout/gnome/glib/gobject/gsignal.c line 3401
  • #46 g_signal_emit
    at /home/daniel/jhbuild/checkout/gnome/glib/gobject/gsignal.c line 3447
  • #47 gtk_widget_event_internal
    at /home/daniel/jhbuild/checkout/gnome/gtk+-3/gtk/gtkwidget.c line 7723
  • #48 gtk_widget_event
    at /home/daniel/jhbuild/checkout/gnome/gtk+-3/gtk/gtkwidget.c line 7293
  • #49 propagate_event_up
  • #50 propagate_event
    at /home/daniel/jhbuild/checkout/gnome/gtk+-3/gtk/gtkmain.c line 2680
  • #51 gtk_propagate_event
    at /home/daniel/jhbuild/checkout/gnome/gtk+-3/gtk/gtkmain.c line 2715
  • #52 gtk_main_do_event
    at /home/daniel/jhbuild/checkout/gnome/gtk+-3/gtk/gtkmain.c line 1911
  • #53 _gdk_event_emit
    at /home/daniel/jhbuild/checkout/gnome/gtk+-3/gdk/gdkevents.c line 73
  • #54 gdk_event_source_dispatch
    at /home/daniel/jhbuild/checkout/gnome/gtk+-3/gdk/x11/gdkeventsource.c line 367
  • #55 g_main_dispatch
    at /home/daniel/jhbuild/checkout/gnome/glib/glib/gmain.c line 3148
  • #56 g_main_context_dispatch
    at /home/daniel/jhbuild/checkout/gnome/glib/glib/gmain.c line 3813
  • #57 g_main_context_iterate
    at /home/daniel/jhbuild/checkout/gnome/glib/glib/gmain.c line 3886
  • #58 g_main_loop_run
    at /home/daniel/jhbuild/checkout/gnome/glib/glib/gmain.c line 4082
  • #59 gtk_dialog_run
    at /home/daniel/jhbuild/checkout/gnome/gtk+-3/gtk/gtkdialog.c line 1397
  • #60 main
    at /home/daniel/jhbuild/checkout/gnome/gtk+-3/tests/testcombochange.c line 305

Comment 1 Daniel Boles 2017-09-05 01:15:38 UTC
Reverting Commit 9b032073cbcf5aadbeb4b74f0cf662a9fa5f5530 from Bug 782870 results in this critical going away.

Carlos, any thoughts? Knowing what ComboBox in appears-as-list mode is like, it's almost certainly the one in the wrong, but I don't really know where to begin. :)
Comment 2 Carlos Garnacho 2017-09-05 10:02:39 UTC
Uhm, not sure by quickly looking at the bt/code... It's weird that priv->grab_location is non-NULL but invalid, this var does not take a ref, so it's possible though that the grab_location is left pointing to a just destroyed GtkCssGadget.

Maybe the grab should be undone at the time of destroying the gadget, since that's what is conceptually holding the grab.

How are you popping down the combobox?
Comment 3 Daniel Boles 2017-09-05 10:11:14 UTC
Thanks for looking!

(In reply to Carlos Garnacho from comment #2)
> How are you popping down the combobox?

1: Click and hold on the scrollbar to start a drag
2: Move the pointer to a position that would cause a popdown, and release:
   a: on a treeview item
   b: outwith the popup_window
3: That causes the window to popdown, and the critical to appear.
Comment 4 Daniel Boles 2017-10-04 10:13:13 UTC
Also, need to test this on Linux later, but here on Windows, it's really easy to accidentally move out of the scrollbar, then release and the popup closes. Not sure if that's to do with the event widget checks in button_release(), or maybe a failed grab on the scrollbar.
Comment 5 Daniel Boles 2017-10-04 16:25:22 UTC
(In reply to Carlos Garnacho from comment #2)
> Uhm, not sure by quickly looking at the bt/code... It's weird that
> priv->grab_location is non-NULL but invalid, this var does not take a ref,
> so it's possible though that the grab_location is left pointing to a just
> destroyed GtkCssGadget.
>
> Maybe the grab should be undone at the time of destroying the gadget, since
> that's what is conceptually holding the grab.

Why would any of the involved gadgets be destroyed? GtkComboBox doesn't rebuild its ScrolledWindow except when changing modes, and it's not clear to me that GtkRange rebuilds any of the gadgets that would be involved in this case.
Comment 6 Daniel Boles 2017-10-04 20:06:23 UTC
Ugh, OK, my revert commit 13017239055dc492f7e5cdeae63f01e6e820da4e probably fixed its mentioned bugs purely out of coincidence, and it's not the real fix for them, as it:

 * breaks grabs, as seen in Comment 4; the bar seemingly just doesn't get one...
   like restoring the "superfluous GTK+" grabs actually means we get NO grab.

 * and, apparently, introduces this critical too. :(

List-mode ComboBoxes could fuel a lifetime of patches.