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 770563 - gnome-control-center crashes on exit after previewing a keyboard layout
gnome-control-center crashes on exit after previewing a keyboard layout
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Region & Language
git master
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-08-29 16:32 UTC by Hussam Al-Tayeb
Modified: 2016-08-30 15:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
region: Avoid a crash on panel destruction (1.59 KB, patch)
2016-08-29 17:35 UTC, Rui Matos
committed Details | Review

Description Hussam Al-Tayeb 2016-08-29 16:32:45 UTC
1) Open /usr/bin/gnome-control-center in a terminal.
2) go to regional and language.
3) Press on a language in 'input sources'.
4) Notice the keyboard layout in a new window and close that window.
5) Close gnome-control-center. Notice the crash.


Starting program: /usr/bin/gnome-control-center 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7fffcf570700 (LWP 31681)]
[New Thread 0x7fffcdf96700 (LWP 31682)]
[New Thread 0x7fffcd795700 (LWP 31683)]
[New Thread 0x7fffc6264700 (LWP 31707)]
[New Thread 0x7fffc5a63700 (LWP 31708)]
[Thread 0x7fffc5a63700 (LWP 31708) exited]
[Thread 0x7fffc6264700 (LWP 31707) exited]
[Thread 0x7fffcdf96700 (LWP 31682) exited]
[Thread 0x7fffcf570700 (LWP 31681) exited]
[Thread 0x7ffff7ebb980 (LWP 31677) exited]
[Inferior 1 (process 31677) exited normally]
(gdb) run
Starting program: /usr/bin/gnome-control-center 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7fffcf570700 (LWP 31711)]
[New Thread 0x7fffcdf96700 (LWP 31712)]
[New Thread 0x7fffcd795700 (LWP 31713)]
[New Thread 0x7fffc6264700 (LWP 31714)]
[New Thread 0x7fffc5a63700 (LWP 31715)]

(gkbd-keyboard-display:31740): Gtk-CRITICAL **: gtk_widget_set_allocation: assertion '_gtk_widget_get_visible (widget) || _gtk_widget_is_toplevel (widget)' failed
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.

Thread 1 "gnome-control-c" received signal SIGSEGV, Segmentation fault.
0x00007ffff2df1b0d in gtk_widget_set_visible (widget=0x111dc00, visible=0)
    at gtkwidget.c:8984
8984	gtkwidget.c: No such file or directory.
(gdb) bt full
  • #0 gtk_widget_set_visible
    at gtkwidget.c line 8984
  • #1 g_closure_invoke
    at gclosure.c line 804
  • #2 signal_emit_unlocked_R
    at gsignal.c line 3635
  • #3 g_signal_emit_valist
    at gsignal.c line 3391
  • #4 g_signal_emit
    at gsignal.c line 3447
  • #5 gtk_list_box_remove
    at gtklistbox.c line 2494
  • #6 g_cclosure_marshal_VOID__OBJECTv
    at gmarshal.c line 2102
  • #7 _g_closure_invoke_va
  • #8 g_signal_emit_valist
    at gsignal.c line 3300
  • #9 g_signal_emit
    at gsignal.c line 3447
  • #10 gtk_container_remove
  • #11 gtk_widget_dispose
    at gtkwidget.c line 12046
  • #12 g_object_run_dispose
    at gobject.c line 1084
  • #13 gtk_list_box_forall
    at gtklistbox.c line 2519
  • #14 gtk_container_destroy
    at gtkcontainer.c line 1700
  • #15 g_closure_invoke
  • #16 signal_emit_unlocked_R
    at gsignal.c line 3751
  • #17 g_signal_emit_valist
    at gsignal.c line 3391
  • #18 g_signal_emit
    at gsignal.c line 3447
  • #19 gtk_widget_dispose
    at gtkwidget.c line 12057
  • #20 g_object_unref
    at gobject.c line 3148
  • #21 g_hash_table_remove_all_nodes
    at ghash.c line 548
  • #22 g_hash_table_remove_all_nodes
    at ghash.c line 1426
  • #23 g_hash_table_remove_all
    at ghash.c line 1429
  • #24 g_hash_table_destroy
    at ghash.c line 1122
  • #25 gtk_builder_finalize
    at gtkbuilder.c line 323
  • #26 g_object_unref
    at gobject.c line 3185
  • #27 ??
  • #28 g_object_unref
    at gobject.c line 3185
  • #29 gtk_box_forall
    at gtkbox.c line 2669
  • #30 gtk_container_destroy
    at gtkcontainer.c line 1700
  • #31 g_closure_invoke
    at gclosure.c line 804
  • #32 signal_emit_unlocked_R
    at gsignal.c line 3751
  • #33 g_signal_emit_valist
    at gsignal.c line 3391
  • #34 g_signal_emit
    at gsignal.c line 3447
  • #35 gtk_widget_dispose
    at gtkwidget.c line 12057
  • #36 g_object_run_dispose
    at gobject.c line 1084
  • #37 gtk_stack_forall
    at gtkstack.c line 1909
  • #38 gtk_container_destroy
    at gtkcontainer.c line 1700
  • #39 g_closure_invoke
    at gclosure.c line 804
  • #40 signal_emit_unlocked_R
    at gsignal.c line 3751
  • #41 g_signal_emit_valist
  • #42 g_signal_emit
    at gsignal.c line 3447
  • #43 gtk_widget_dispose
    at gtkwidget.c line 12057
  • #44 g_object_run_dispose
    at gobject.c line 1084
  • #45 gtk_box_forall
  • #46 gtk_container_destroy
    at gtkcontainer.c line 1700
  • #47 g_closure_invoke
    at gclosure.c line 804
  • #48 signal_emit_unlocked_R
    at gsignal.c line 3751
  • #49 g_signal_emit_valist
    at gsignal.c line 3391
  • #50 g_signal_emit
    at gsignal.c line 3447
  • #51 gtk_widget_dispose
    at gtkwidget.c line 12057
  • #52 g_object_run_dispose
    at gobject.c line 1084
  • #53 gtk_window_forall
    at gtkwindow.c line 8321
  • #54 gtk_container_destroy
    at gtkcontainer.c line 1700
  • #55 g_closure_invoke
    at gclosure.c line 804
  • #56 signal_emit_unlocked_R
    at gsignal.c line 3751
  • #57 g_signal_emit_valist
    at gsignal.c line 3391
  • #58 g_signal_emit
    at gsignal.c line 3447
  • #59 gtk_widget_dispose
    at gtkwidget.c line 12057
  • #60 gtk_window_dispose
    at gtkwindow.c line 3149
  • #61 gtk_application_window_dispose
    at gtkapplicationwindow.c line 796
  • #62 g_object_run_dispose
    at gobject.c line 1084
  • #63 gtk_widget_destroy
    at gtkwidget.c line 4715
  • #64 gtk_main_do_event
    at gtkmain.c line 1800
  • #65 send_delete_event
    at gtkwindow.c line 1321
  • #66 gdk_threads_dispatch
    at gdk.c line 743
  • #67 g_main_dispatch
    at gmain.c line 3201
  • #68 g_main_context_dispatch
    at gmain.c line 3854
  • #69 g_main_context_iterate
    at gmain.c line 3927
  • #70 g_main_context_iteration
    at gmain.c line 3988
  • #71 g_application_run
    at gapplication.c line 2381
  • #72 main

Comment 1 Rui Matos 2016-08-29 17:35:50 UTC
Created attachment 334395 [details] [review]
region: Avoid a crash on panel destruction

GtkListBox might emit the row-selected signal while being destroyed
and our row-selected handler accesses widgets owned by GtkBuilder so,
depending on the order on which the builder destroys its objects, we
could crash on the signal handler when destroying the builder.

Using g_signal_connect_object() avoids this issue by disconnecting us
before our finalize() runs.
Comment 2 Hussam Al-Tayeb 2016-08-29 19:28:04 UTC
That fixed my crash. Thank you.
Comment 3 Bastien Nocera 2016-08-30 13:12:59 UTC
Review of attachment 334395 [details] [review]:

Looks good.
Comment 4 Bastien Nocera 2016-08-30 15:19:01 UTC
Attachment 334395 [details] pushed as bbdcaaa - region: Avoid a crash on panel destruction