GNOME Bugzilla – Bug 747865
segfault when providing a NULL output to 'settings_set_display'
Last modified: 2015-06-25 21:08:22 UTC
If an input device is not associated with any output devices, the 'settings_set_display' function in 'plugins/common/gsd-device-mapper.c' tries to store an array of NULL strings into gsettings and segfaults. This can happen, for example, if a display-less Wacom tablet (e.g. Intuos) is connected to a multi-head system and is not mapped to a specific output. See: https://bugs.archlinux.org/task/44548 Backtrace: Program received signal SIGSEGV, Segmentation fault. 0x00007ffff4f1df78 in g_bit_lock () from /usr/lib/libglib-2.0.so.0 (gdb) bt
+ Trace 234970
Created attachment 301565 [details] [review] Proposed fix From my understanding of the code, passing NULL into 'settings_set_display' is valid and essentially means "no associated output". The Wacom plugin code that this is based on reset the array back to its default of ['', '', ''] for this no-output case. The attached patch calls 'g_settings_reset' to do this here as well.
*** This bug has been marked as a duplicate of bug 749844 ***