! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
xfce-mcs-manager segfaults when .config is a file not a directory
Status:
CLOSED: FIXED
Product:
Xfce-mcs
Component:
General

Comments

Description huggie 2005-06-25 09:14:46 CEST
This is actually in the 4.2.2 version but there's no 4.2.2 version tag in bugzilla.

Reproducible: Always
Steps to Reproduce:
1. mv .config .config-old
2. killall xfce-mcs-manager
3. xfce-mcs-manager

Actual Results:  
Error creating directory '/home/huggie/.config/xfce4/mcs_settings': Not a directory
Error creating directory '/home/huggie/.config/xfce4/mcs_settings': Not a directory

** (xfce-mcs-manager:13347): CRITICAL **: Couldn't create file (null)


GDB shows:
0x4002e3e5 in mcs_manager_save_channel_to_file ()
   from /usr/lib/libxfce4mcs-manager.so.2

Backtrace is:#0  0x4002e3e5 in mcs_manager_save_channel_to_file ()
   from /usr/lib/libxfce4mcs-manager.so.2
#1  0x40cd8c86 in mcs_plugin_init ()
   from /usr/lib/xfce4/mcs-plugins/xfcalendar_plugin.so
#2  0x40cd8911 in mcs_plugin_init ()
   from /usr/lib/xfce4/mcs-plugins/xfcalendar_plugin.so
#3  0x0804a705 in mcs_plugin_check_version ()
#4  0x0804a8ef in mcs_plugin_check_version ()
#5  0x0804a922 in mcs_plugin_check_version ()
#6  0x0804ac8c in main ()




Expected Results:  
Died gracefully without segfaulting ideally with a nicer message like (move your
.config out the way) :)
Comment 1 Benedikt Meurer editbugs 2005-06-25 10:21:50 CEST
Ok, this one is tricky, as it affects more or less ever MCS plugin. The
XfceResource module will return NULL if the given file could not be found or the
path to the file could not be created, which is the case here, because ~/.config
is a file.

In order to fix this problem, we'll need to make all MCS plugins aware of this fact.
Comment 2 Benedikt Meurer editbugs 2005-06-25 10:22:10 CEST
Ups, change to `general'.
Comment 3 Benedikt Meurer editbugs 2005-06-25 10:48:35 CEST
BTW libxfce4util will give an warning about this, telling you whats wrong:

(xfce-mcs-manager:26301): libxfce4util-WARNING **: Invalid XDG_CONFIG_HOME
directory `/usr/home/bmeurer/.config', program may behave incorrectly.
Comment 4 Benedikt Meurer editbugs 2005-06-25 11:22:45 CEST
Ok, should be fixed now.

Bug #1033

Reported by:
huggie
Reported on: 2005-06-25
Last modified on: 2009-07-15

People

Assignee:
Xfce Bug Triage
CC List:
0 users

Version

Attachments

Additional information