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 752577 - infinite loop on using nautilus menu
infinite loop on using nautilus menu
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkButton
3.16.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2015-07-19 08:09 UTC by Edward Sheldrake
Modified: 2015-07-31 02:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GtkMenuButton: explicitly protect against recursion (1.61 KB, patch)
2015-07-23 12:33 UTC, Carlos Garnacho
committed Details | Review

Description Edward Sheldrake 2015-07-19 08:09:53 UTC
In Files (nautilus), trying to use "Reload" or "Visible Columns...", or doing nothing and trying to cancel that menu, results in nautilus becoming unresponsive and using 100% CPU.

gtk3-3.16.5-1.fc22
nautilus-3.16.2-2.fc22

Those functions in nautilus work OK with gtk+ 3.16.4.

If I kill nautilus, or eventually it will crash, part of the backtrace is:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff4da8dc4 in emission_find (instance=0xa80b70, detail=149, 
    signal_id=1) at gsignal.c:761
761	gsignal.c: No such file or directory.
(gdb) bt
  • #0 signal_emit_unlocked_R
    at gsignal.c line 761
  • #1 signal_emit_unlocked_R
    at gsignal.c line 3433
  • #2 g_signal_emit_valist
    at gsignal.c line 3305
  • #3 g_signal_emit
    at gsignal.c line 3361
  • #4 g_object_dispatch_properties_changed
    at gobject.c line 1056
  • #5 g_object_notify
    at gobject.c line 1149
  • #6 g_object_notify
    at gobject.c line 1197
  • #7 gtk_widget_grab_focus
    at gtkwidget.c line 8076
  • #8 gtk_popover_apply_modality
    at gtkpopover.c line 464
  • #9 gtk_popover_hide
    at gtkpopover.c line 1514
  • #13 <emit signal ??? on instance 0x982340 [GtkPopoverMenu]>
    at gsignal.c line 3361
  • #14 gtk_widget_hide
    at gtkwidget.c line 4960
  • #15 gtk_menu_button_clicked
    at gtkmenubutton.c line 458
  • #16 _g_closure_invoke_va
    at gclosure.c line 831
  • #17 g_signal_emit_valist
    at gsignal.c line 3214
  • #18 g_signal_emit
    at gsignal.c line 3361
  • #19 gtk_button_clicked
    at gtkbutton.c line 1488
  • #20 gtk_toggle_button_set_active
    at gtktogglebutton.c line 473
  • #21 gtk_menu_button_clicked
    at gtkmenubutton.c line 465
  • #22 _g_closure_invoke_va
    at gclosure.c line 831
  • #23 g_signal_emit_valist
    at gsignal.c line 3214
  • #24 g_signal_emit
    at gsignal.c line 3361
  • #25 gtk_button_clicked
    at gtkbutton.c line 1488
  • #26 gtk_toggle_button_set_active
    at gtktogglebutton.c line 473
  • #27 gtk_menu_button_clicked
    at gtkmenubutton.c line 465
  • #28 _g_closure_invoke_va
    at gclosure.c line 831
  • #29 g_signal_emit_valist
    at gsignal.c line 3214
  • #30 g_signal_emit
    at gsignal.c line 3361
  • #31 gtk_button_clicked
    at gtkbutton.c line 1488
  • #32 gtk_toggle_button_set_active
    at gtktogglebutton.c line 473
  • #33 gtk_menu_button_clicked
    at gtkmenubutton.c line 465
  • #34 _g_closure_invoke_va
    at gclosure.c line 831
  • #35 g_signal_emit_valist
    at gsignal.c line 3214
  • #36 g_signal_emit
    at gsignal.c line 3361
  • #37 gtk_button_clicked
    at gtkbutton.c line 1488
  • #38 gtk_toggle_button_set_active
    at gtktogglebutton.c line 473
  • #39 gtk_menu_button_clicked
    at gtkmenubutton.c line 465
  • #40 _g_closure_invoke_va
    at gclosure.c line 831
  • #41 g_signal_emit_valist
    at gsignal.c line 3214
  • #42 g_signal_emit
    at gsignal.c line 3361
  • #43 gtk_button_clicked
    at gtkbutton.c line 1488
  • #44 gtk_toggle_button_set_active
    at gtktogglebutton.c line 473
  • #45 gtk_menu_button_clicked
    at gtkmenubutton.c line 465
  • #46 _g_closure_invoke_va
    at gclosure.c line 831
  • #47 g_signal_emit_valist
    at gsignal.c line 3214
  • #48 g_signal_emit
    at gsignal.c line 3361
  • #49 gtk_button_clicked
    at gtkbutton.c line 1488
  • #50 gtk_toggle_button_set_active
    at gtktogglebutton.c line 473
  • #51 gtk_menu_button_clicked
    at gtkmenubutton.c line 465
  • #52 _g_closure_invoke_va
    at gclosure.c line 831
  • #53 g_signal_emit_valist
    at gsignal.c line 3214
  • #54 g_signal_emit
    at gsignal.c line 3361
  • #55 gtk_button_clicked
    at gtkbutton.c line 1488
  • #56 gtk_toggle_button_set_active
    at gtktogglebutton.c line 473
  • #57 gtk_menu_button_clicked
    at gtkmenubutton.c line 465
  • #58 _g_closure_invoke_va
    at gclosure.c line 831
  • #59 g_signal_emit_valist
    at gsignal.c line 3214
  • #60 g_signal_emit
    at gsignal.c line 3361
  • #61 gtk_button_clicked
    at gtkbutton.c line 1488
  • #62 gtk_toggle_button_set_active
    at gtktogglebutton.c line 473
  • #63 gtk_menu_button_clicked
    at gtkmenubutton.c line 465
  • #64 _g_closure_invoke_va
    at gclosure.c line 831
  • #65 g_signal_emit_valist
    at gsignal.c line 3214
  • #66 g_signal_emit
    at gsignal.c line 3361
  • #67 gtk_button_clicked
    at gtkbutton.c line 1488
  • #68 gtk_toggle_button_set_active
    at gtktogglebutton.c line 473
  • #69 gtk_menu_button_clicked
    at gtkmenubutton.c line 465
  • #70 _g_closure_invoke_va
    at gclosure.c line 831
  • #71 g_signal_emit_valist
    at gsignal.c line 3214
  • #72 g_signal_emit
    at gsignal.c line 3361
  • #73 gtk_button_clicked
    at gtkbutton.c line 1488
  • #74 gtk_toggle_button_set_active
    at gtktogglebutton.c line 473
  • #75 gtk_menu_button_clicked
    at gtkmenubutton.c line 465
  • #76 _g_closure_invoke_va
    at gclosure.c line 831
  • #77 g_signal_emit_valist
    at gsignal.c line 3214
  • #78 g_signal_emit
    at gsignal.c line 3361
  • #79 gtk_button_clicked
    at gtkbutton.c line 1488
  • #80 gtk_toggle_button_set_active
    at gtktogglebutton.c line 473
  • #81 gtk_menu_button_clicked
    at gtkmenubutton.c line 465
  • #82 _g_closure_invoke_va
    at gclosure.c line 831
  • #83 g_signal_emit_valist
    at gsignal.c line 3214
  • #84 g_signal_emit
    at gsignal.c line 3361
  • #85 gtk_button_clicked
    at gtkbutton.c line 1488
  • #86 gtk_toggle_button_set_active
    at gtktogglebutton.c line 473
  • #87 gtk_menu_button_clicked
    at gtkmenubutton.c line 465
  • #88 _g_closure_invoke_va
    at gclosure.c line 831
  • #89 g_signal_emit_valist
    at gsignal.c line 3214
  • #90 g_signal_emit
    at gsignal.c line 3361
  • #91 gtk_button_clicked
    at gtkbutton.c line 1488
  • #92 gtk_toggle_button_set_active
    at gtktogglebutton.c line 473
  • #93 gtk_menu_button_clicked
    at gtkmenubutton.c line 465
  • #94 _g_closure_invoke_va
    at gclosure.c line 831
  • #95 g_signal_emit_valist
    at gsignal.c line 3214
  • #96 g_signal_emit
    at gsignal.c line 3361
  • #97 gtk_button_clicked
    at gtkbutton.c line 1488
  • #98 gtk_toggle_button_set_active
    at gtktogglebutton.c line 473
  • #99 gtk_menu_button_clicked
    at gtkmenubutton.c line 465
  • #100 _g_closure_invoke_va
    at gclosure.c line 831

Comment 1 Carlos Garnacho 2015-07-23 12:33:27 UTC
Created attachment 307985 [details] [review]
GtkMenuButton: explicitly protect against recursion

The visibility toggling happening on ::click() relied implicitly
on the popover animation, but breaks on disabled animations. The
recursion happening within gtk_toggle_button_set_active() (which
triggers ::clicked when changing state) makes this vfunc to run
again, inverting the visibility of the popover in result.

Fix this by explicitly checking about recursion, we want the
button to be toggled to the right state, but we don't want the
callback running again.
Comment 2 Matthias Clasen 2015-07-23 17:20:15 UTC
Review of attachment 307985 [details] [review]:

I wonder why we have to rely on the menu/popover visiblity at all to get the current state here - the toggle button already has an active field that we could just use ?
Comment 3 Matthias Clasen 2015-07-31 02:38:47 UTC
Attachment 307985 [details] pushed as 65f7fb0 - GtkMenuButton: explicitly protect against recursion