Adding secondary input source makes GNOME Control Center crash after upgrading to 42
Original bug: https://bugzilla.suse.com/show_bug.cgi?id=1197719
After upgrading to GNOME 42, adding secondary input source will crash GNOME Control Center with a SIGSEGV, it can be manually reproduced on a newly installed Tumbleweed on VM.
This can only happens when you adding a secondary source, if you already have more than one sources in list, it won't crash, so please remove extra sources before reproduce it.
Steps to reproduce:
- Open GNOME Settings
- Go to Keyboard tab, make sure you only have 1 input source.
- Click the add button, and add a random input source with the chooser.
Expected:
All things work fine.
Happened:
Once you click the Add
button (or double click on the input source you want to add) in the chooser, control center crashes.
I did a backtrace with GDB, here is the output:
#0 g_type_check_instance_cast (type_instance=0x555559405310, iface_type=93824996529856) at ../gobject/gtype.c:4125
#1 0x00005555555f89bf in on_input_sources_listbox_selected_rows_changed_cb (self=0x5555560525a0) at ../panels/keyboard/cc-input-chooser.c:646
#2 0x00007ffff7d7077f in g_closure_invoke (closure=0x5555594281b0, return_value=return_value@entry=0x0, n_param_values=1, param_values=param_values@entry=0x7fffffffd130, invocation_hint=invocation_hint@entry=0x7fffffffd0b0)
at ../gobject/gclosure.c:830
#3 0x00007ffff7d83416 in signal_emit_unlocked_R (node=node@entry=0x555555a433b0, detail=detail@entry=0, instance=instance@entry=0x555555b2f750, emission_return=emission_return@entry=0x0,
instance_and_params=instance_and_params@entry=0x7fffffffd130) at ../gobject/gsignal.c:3743
#4 0x00007ffff7d8a007 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fffffffd2b0) at ../gobject/gsignal.c:3496
#5 0x00007ffff7d8a15f in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at ../gobject/gsignal.c:3553
#6 0x00007ffff742fea3 in gtk_list_box_dispose (object=0x555555b2f750) at ../gtk/gtklistbox.c:437
#7 0x00007ffff7d75bed in g_object_unref (_object=<optimized out>) at ../gobject/gobject.c:3636
#8 g_object_unref (_object=0x555555b2f750) at ../gobject/gobject.c:3553
#9 0x00007ffff7c64002 in g_hash_table_remove_all_nodes (hash_table=0x555555e49de0, notify=<optimized out>, destruction=<optimized out>) at ../glib/ghash.c:706
#10 0x00007ffff7c65bab in g_hash_table_remove_all_nodes (destruction=0, notify=1, hash_table=0x555555e49de0) at ../glib/ghash.c:628
#11 g_hash_table_remove_all (hash_table=0x555555e49de0) at ../glib/ghash.c:1910
#12 0x00007ffff7c65bee in g_hash_table_destroy (hash_table=0x555555e49de0) at ../glib/ghash.c:1513
#13 0x00007ffff7c64002 in g_hash_table_remove_all_nodes (hash_table=0x555555e359e0, notify=<optimized out>, destruction=<optimized out>) at ../glib/ghash.c:706
#14 0x00007ffff7c65bab in g_hash_table_remove_all_nodes (destruction=0, notify=1, hash_table=0x555555e359e0) at ../glib/ghash.c:628
#15 g_hash_table_remove_all (hash_table=0x555555e359e0) at ../glib/ghash.c:1910
#16 0x00007ffff7c65bee in g_hash_table_destroy (hash_table=0x555555e359e0) at ../glib/ghash.c:1513
#17 0x00007ffff7c573ae in g_data_set_internal (datalist=0x5555560525b0, key_id=<optimized out>, new_data=<optimized out>, new_destroy_func=<optimized out>, dataset=0x0) at ../glib/gdataset.c:407
#18 0x00007ffff7568ffb in gtk_widget_real_destroy (object=0x5555560525a0) at ../gtk/gtkwidget.c:7534
#19 gtk_widget_dispose (object=0x5555560525a0) at ../gtk/gtkwidget.c:7428
#20 0x00007ffff7d75bed in g_object_unref (_object=<optimized out>) at ../gobject/gobject.c:3636
#21 g_object_unref (_object=0x5555560525a0) at ../gobject/gobject.c:3553
#22 0x00007ffff7726f1c in gtk_widget_stack_free_elements (end=<optimized out>, start=<optimized out>) at ../gdk/gdkarrayimpl.c:95
#23 gtk_widget_stack_clear (self=0x7fffffffd5d0) at ../gdk/gdkarrayimpl.c:104
#24 gtk_propagate_event_internal.isra.0 (widget=0x555559405310, event=0x555558fea8f0, topmost=<optimized out>) at ../gtk/gtkmain.c:1952
#25 0x00007ffff744401b in gtk_main_do_event (event=<optimized out>) at ../gtk/gtkmain.c:1685
#26 0x00007ffff7575278 in surface_event () at ../gtk/gtkwindow.c:3587
#27 0x00007ffff764dd89 in _gdk_marshal_BOOLEAN__POINTERv (closure=<optimized out>, return_value=0x7fffffffd950, instance=<optimized out>, args=<optimized out>, marshal_data=<optimized out>, n_params=<optimized out>,
param_types=0x555555bef2d0) at gdk/gdkmarshalers.c:302
#28 0x00007ffff767dc0d in gdk_surface_event_marshallerv (closure=closure@entry=0x55555a57f110, return_value=return_value@entry=0x7fffffffd950, instance=instance@entry=0x555556052650, args=args@entry=0x7fffffffda20,
marshal_data=marshal_data@entry=0x0, n_params=n_params@entry=1, param_types=0x555555bef2d0) at ../gdk/gdksurface.c:463
#29 0x00007ffff7d709a9 in _g_closure_invoke_va (closure=closure@entry=0x55555a57f110, return_value=return_value@entry=0x7fffffffd950, instance=instance@entry=0x555556052650, args=args@entry=0x7fffffffda20, n_params=1,
param_types=0x555555bef2d0) at ../gobject/gclosure.c:893
#30 0x00007ffff7d89317 in g_signal_emit_valist (instance=0x555556052650, signal_id=262, detail=0, var_args=var_args@entry=0x7fffffffda20) at ../gobject/gsignal.c:3406
#31 0x00007ffff7d8a15f in g_signal_emit (instance=instance@entry=0x555556052650, signal_id=<optimized out>, detail=detail@entry=0) at ../gobject/gsignal.c:3553
#32 0x00007ffff7727140 in gdk_surface_handle_event.isra.0 (event=0x555558fea8f0) at ../gdk/gdksurface.c:2961
#33 0x00007ffff7699b5a in gdk_event_source_dispatch (base=base@entry=0x5555559c7b00, callback=<optimized out>, data=<optimized out>) at ../gdk/wayland/gdkeventsource.c:142
#34 0x00007ffff7c78122 in g_main_dispatch (context=0x555555975770) at ../glib/gmain.c:3417
#35 g_main_context_dispatch (context=0x555555975770) at ../glib/gmain.c:4135
#36 0x00007ffff7c784b8 in g_main_context_iterate (context=context@entry=0x555555975770, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4211
#37 0x00007ffff7c7856f in g_main_context_iteration (context=context@entry=0x555555975770, may_block=may_block@entry=1) at ../glib/gmain.c:4276
#38 0x00007ffff7ea5afd in g_application_run (application=0x555555971110, argc=argc@entry=1, argv=argv@entry=0x7fffffffdde8) at ../gio/gapplication.c:2569
#39 0x00005555555b8b03 in main (argc=1, argv=0x7fffffffdde8) at ../shell/main.c:57