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 733489 - Crashes with SIGSEGV on closing Media Sharing dialogue after adding a folder to share
Crashes with SIGSEGV on closing Media Sharing dialogue after adding a folder ...
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Sharing
3.12.x
Other Linux
: Normal major
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-07-21 10:43 UTC by Stephen
Modified: 2014-07-24 10:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
sharing: Fix crash in media preferences (1.58 KB, patch)
2014-07-21 17:14 UTC, Bastien Nocera
committed Details | Review
sharing: Avoid truncated folders list in media sharing (2.65 KB, patch)
2014-07-21 17:14 UTC, Bastien Nocera
committed Details | Review

Description Stephen 2014-07-21 10:43:27 UTC
Running 64-bit Fedora 20 with 3.12 from Copr repository, on Haswell.

Steps to reproduce:

1. Open Sharing control panel.
2. Select Media Sharing item and switch on.
3. Add any folder to Shared Folders list.
4. Click Close.

Result:

Crashes (window disappears). No error message when run from a terminal. When run under GDB, gives the following:

Program received signal SIGSEGV, Segmentation fault.
0x00007fffefd1a21a in __strcmp_ssse3 () from /lib64/libc.so.6
Comment 1 Bastien Nocera 2014-07-21 10:57:04 UTC
Can you please get a full backtrace (run "thread apply all bt" at the gdb prompt)?
Comment 2 Stephen 2014-07-21 13:04:01 UTC
I installed the debuginfo packages for g-c-c, then with the following:

gdb gnome-control-center
thread apply all bt
run

I got the following:

Program received signal SIGSEGV, Segmentation fault.
__strcmp_ssse3 () at ../sysdeps/x86_64/strcmp.S:210
210	 movlpd	(%rsi), %xmm2

gdb then prompts for a further (huge) set of debuginfo packages, let me know if you need these installed then a re-run.
Comment 3 Rui Matos 2014-07-21 13:09:50 UTC
You should run "thread apply all bt" *after* the crash.
Comment 4 Stephen 2014-07-21 13:14:32 UTC
My mind-reading skills aren't what they used to be :J

Thread 1 (Thread 0x7ffff7f6fa40 (LWP 4010))

  • #0 __strcmp_ssse3
    at ../sysdeps/x86_64/strcmp.S line 210
  • #1 g_str_equal
    at ghash.c line 1776
  • #2 cc_media_sharing_set_preferences
    at cc-media-sharing.c line 188
  • #3 cc_sharing_panel_media_sharing_dialog_response
    at cc-sharing-panel.c line 544
  • #4 g_closure_invoke
    at gclosure.c line 768
  • #5 signal_emit_unlocked_R
    at gsignal.c line 3551
  • #6 g_signal_emit_valist
    at gsignal.c line 3307
  • #7 g_signal_emit
  • #8 _g_closure_invoke_va
    at gclosure.c line 831
  • #9 g_signal_emit_valist
    at gsignal.c line 3215
  • #10 g_signal_emit
    at gsignal.c line 3363
  • #11 gtk_button_do_release
    at gtkbutton.c line 1985
  • #12 gtk_real_button_released
    at gtkbutton.c line 2103
  • #13 g_closure_invoke
    at gclosure.c line 768
  • #14 signal_emit_unlocked_R
    at gsignal.c line 3481
  • #15 g_signal_emit_valist
    at gsignal.c line 3307
  • #16 g_signal_emit
    at gsignal.c line 3363
  • #17 gtk_button_button_release
    at gtkbutton.c line 1940
  • #18 _gtk_marshal_BOOLEAN__BOXEDv
    at gtkmarshalers.c line 130
  • #19 _g_closure_invoke_va
    at gclosure.c line 831
  • #20 g_signal_emit_valist
    at gsignal.c line 3215
  • #21 g_signal_emit
    at gsignal.c line 3363
  • #22 gtk_widget_event_internal
    at gtkwidget.c line 7229
  • #23 gtk_widget_event
    at gtkwidget.c line 6891
  • #24 propagate_event_up
    at gtkmain.c line 2406
  • #25 propagate_event
    at gtkmain.c line 2514
  • #26 gtk_main_do_event
    at gtkmain.c line 1735
  • #27 gdk_event_source_dispatch
    at gdkeventsource.c line 364
  • #28 g_main_dispatch
    at gmain.c line 3064
  • #29 g_main_context_dispatch
    at gmain.c line 3663
  • #30 g_main_context_iterate
    at gmain.c line 3734
  • #31 g_main_loop_run
    at gmain.c line 3928
  • #32 gtk_dialog_run
    at gtkdialog.c line 1375
  • #33 cc_sharing_panel_run_dialog
    at cc-sharing-panel.c line 209
  • #34 cc_sharing_panel_main_list_box_row_activated
    at cc-sharing-panel.c line 234
  • #35 g_cclosure_marshal_VOID__OBJECTv
    at gmarshal.c line 1312
  • #36 _g_closure_invoke_va
    at gclosure.c line 831
  • #37 g_signal_emit_valist
    at gsignal.c line 3215
  • #38 g_signal_emit
    at gsignal.c line 3363
  • #39 gtk_list_box_select_and_activate
    at gtklistbox.c line 1120
  • #40 gtk_list_box_button_release_event
    at gtklistbox.c line 1337
  • #41 _gtk_marshal_BOOLEAN__BOXEDv
    at gtkmarshalers.c line 130
  • #42 _g_closure_invoke_va
    at gclosure.c line 831
  • #43 g_signal_emit_valist
    at gsignal.c line 3215
  • #44 g_signal_emit
    at gsignal.c line 3363
  • #45 gtk_widget_event_internal
    at gtkwidget.c line 7229
  • #46 gtk_widget_event
    at gtkwidget.c line 6891
  • #47 propagate_event_up
    at gtkmain.c line 2406
  • #48 propagate_event
    at gtkmain.c line 2514
  • #49 gtk_main_do_event
    at gtkmain.c line 1735
  • #50 gdk_event_source_dispatch
    at gdkeventsource.c line 364
  • #51 g_main_dispatch
    at gmain.c line 3064
  • #52 g_main_context_dispatch
    at gmain.c line 3663
  • #53 g_main_context_iterate
    at gmain.c line 3734
  • #54 g_main_context_iteration
    at gmain.c line 3795
  • #55 g_application_run
    at gapplication.c line 2114
  • #56 main
    at main.c line 49

Comment 5 Bastien Nocera 2014-07-21 17:14:23 UTC
Created attachment 281330 [details] [review]
sharing: Fix crash in media preferences

When XDG user dirs are badly setup, g_get_user_special_dir() will return
NULL, causing us to crash. Use g_strcmp0() instead.
Comment 6 Bastien Nocera 2014-07-21 17:14:30 UTC
Created attachment 281331 [details] [review]
sharing: Avoid truncated folders list in media sharing

When XDG user dirs are badly setup, and the folders list contains items
such as @VIDEOS@ or @MUSIC@, g_get_user_special_dir() returns NULL and
we would insert NULL into the string array. That would cause the code
reading it to assume the end of the array was reached.

Go through a temporary array instead to build it.
Comment 7 Rui Matos 2014-07-22 08:52:15 UTC
Review of attachment 281331 [details] [review]:

Right
Comment 8 Rui Matos 2014-07-22 08:52:32 UTC
Review of attachment 281330 [details] [review]:

looks fine, *sigh*
Comment 9 Bastien Nocera 2014-07-24 10:40:44 UTC
Attachment 281330 [details] pushed as 056784e - sharing: Fix crash in media preferences
Attachment 281331 [details] pushed as 22c4db5 - sharing: Avoid truncated folders list in media sharing