Comment # 4 on bug 1197719 from
I think the problem is that when GtkListBox is disposed, it will call 
`gtk_list_box_remove()` for each row
(<https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtklistbox.c#L437>), and
if `gtk_list_box_remove()` is called on a selected row, it will emit
`selected-rows-changed` if not in destruction
(<https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtklistbox.c#L2424>).

However this line does not work as intended, because of the dispose chain,
`gtk_list_box_dispose()` is called before `gtk_widget_dispose()`, and
`gtk_widget_in_destruction()` will always return false, even we are disposing
list box, so `gtk_list_box_remove()` will always emit `selected-rows-changed`
even dispose is called.

CcInputChooser uses this signal to set add_button's sensitive to false, but if
on dispose, add_button is already freed, and we got a segmentation fault, so I
think it's a GTK problem.

(However, if I have more than one input sources, and then add another by the
chooser, it will not crash, wired.)


You are receiving this mail because: