Hi,

I have been able to reproduce and find the cause of this bug.  The bug
is triggered when the file ".config/user-dirs.dirs" is not present.
Simply move that file away and you'll be able to reproduce this.
Running xdg-user-dirs-update might or might not fix the problem, some
variables might not get set in that case, and if there's one variable
missing, the privacy pane fails.

The bug is actually in the activity-log-manager package.  The file src
/files-widget.vala, lines 264-272, says:

  defined_dirs = new HashMap<string, UserDirectory>(str_hash, str_equal);
  defined_dirs.set(Environment.get_user_special_dir(UserDirectory.DESKTOP), 
UserDirectory.DESKTOP);
  defined_dirs.set(Environment.get_user_special_dir(UserDirectory.DOCUMENTS), 
UserDirectory.DOCUMENTS);
  defined_dirs.set(Environment.get_user_special_dir(UserDirectory.DOWNLOAD), 
UserDirectory.DOWNLOAD);
  defined_dirs.set(Environment.get_user_special_dir(UserDirectory.MUSIC), 
UserDirectory.MUSIC);
  defined_dirs.set(Environment.get_user_special_dir(UserDirectory.PICTURES), 
UserDirectory.PICTURES);
  
defined_dirs.set(Environment.get_user_special_dir(UserDirectory.PUBLIC_SHARE), 
UserDirectory.PUBLIC_SHARE);
  defined_dirs.set(Environment.get_user_special_dir(UserDirectory.TEMPLATES), 
UserDirectory.TEMPLATES);
  defined_dirs.set(Environment.get_user_special_dir(UserDirectory.VIDEOS), 
UserDirectory.VIDEOS);

which gets translated into calls like this one, for example:

        _tmp42_ = self->priv->defined_dirs;
        _tmp43_ = g_get_user_special_dir (G_USER_DIRECTORY_DOWNLOAD);
        gee_abstract_map_set ((GeeAbstractMap*) _tmp42_, _tmp43_, 
GINT_TO_POINTER (G_USER_DIRECTORY_DOWNLOAD));

If the userdir file is not present or the variable not defined in it,
the call to g_get_user_special_dir will return null (documented
behaviour), which will make gee_abstract_map_set fail.

The code needs to be reworked to take into account that these dirs might
not be set.


** Package changed: gnome-control-center (Ubuntu) => activity-log-manager 
(Ubuntu)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1024057

Title:
  gnome control center crashed when attempting to open privacy dialogue

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/activity-log-manager/+bug/1024057/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to