Thanks for your report!
Well, "the user" normally has that variable set. ;) But it's still a
valid bug.
I pushed a fix to the repo, so it will be fixed in Ubuntu 23.04.
** Changed in: gnome-control-center (Ubuntu)
Status: New => Fix Committed
** Changed in: gnome-control-center (Ubuntu)
Assignee: (unassigned) => Gunnar Hjalmarsson (gunnarhj)
--
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to gnome-control-center in Ubuntu.
https://bugs.launchpad.net/bugs/2008770
Title:
Sound: seg fault if env variable not set (v41.7)
Status in gnome-control-center package in Ubuntu:
Fix Committed
Bug description:
On Ubuntu 22.04, gnome-control-center (41.7) crashes with a segmentation
fault if $XDG_CURRENT_DESKTOP is not set, upon entering the Sound menu.
This is due to the passing of a NULL pointer into strstr which results in
undefined behavior.
For the user it gets worse, as entering Sound instantly crashes the
application and subsequent launches will keep starting in Sound and
just keep crashing. The application is then not usable, and it's not
directly clear how to reset it as to not start in Sound.
In this case, it is partly my fault since I don't use a GNOME desktop
environment resulting in this env variable not being set.
panels/sound/cc-sound-panel.c:305
if (strstr (g_getenv("XDG_CURRENT_DESKTOP"), "ubuntu") != NULL) {
Which seem to originate from
debian/patches/ubuntu/sound-Allow-volume-to-be-set-above-100.patch
-> gnome-control-center_41.7-0ubuntu0.22.04.6.debian.tar.xz
Fixed by adding `alias XDG_CURRENT_DESKTOP=test` in .bashrc.
System:
Sway (Ubuntu's default DE is also installed)
Ubuntu 22.04 (updated 2023-02-28)
Linux 5.15.0-60-generic #66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023
x86_64 x86_64 x86_64 GNU/Linux
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnome-control-center/+bug/2008770/+subscriptions
--
Mailing list: https://launchpad.net/~desktop-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help : https://help.launchpad.net/ListHelp