GNOME Bugzilla – Bug 733489
Crashes with SIGSEGV on closing Media Sharing dialogue after adding a folder to share
Last modified: 2014-07-24 10:41:03 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
Can you please get a full backtrace (run "thread apply all bt" at the gdb prompt)?
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.
You should run "thread apply all bt" *after* the crash.
My mind-reading skills aren't what they used to be :J
+ Trace 233850
Thread 1 (Thread 0x7ffff7f6fa40 (LWP 4010))
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.
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.
Review of attachment 281331 [details] [review]: Right
Review of attachment 281330 [details] [review]: looks fine, *sigh*
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