GNOME Bugzilla – Bug 429012
Sound Blaster Live 5.1 - `,' an invalid character for SigmaTel_STAC9708,11
Last modified: 2018-09-05 10:23:20 UTC
gnome-alsamixer 0.9.7 The error was found when running Debian etch - Linux kernel 2.6.18-4-486 with Gnome version 2.14.3. (Sound Card is Creative Sound Blaster Live 5.1) ### On running gnome-alsamixer: [error message] An error occurred while loading or saving configuration information for GNOME ALSA Mixer. Some of your configuration settings may not work properly. [error msg detail] Bad key or directory name: "/apps/gnome-alsamixer/slider_display_names/SigmaTel_STAC9708,11-Master": `,' is an invalid character in key/directory names This detail repeats for each value in gnome-alsamixer eg. display_sliders & slider_display_names -Headphone -Bass -Treble etc. ###
I'm seeing this bug too. I'm using gnome-alsamixer 0.9.7 on Ubuntu Feisty Fawn (7.04). I have a SoundBlaster Audigy card, reported as "Multimedia audio controller: Creative Labs SB Audigy (rev 03)" by lspci. On starting the application from a terminal, the following messages are logged in the console: ** (gnome-alsamixer:10036): WARNING **: gam_toggle_get_state (). No idea what to do for mixer element "Surround Jack Mode"! ** (gnome-alsamixer:10036): WARNING **: gam_toggle_get_state (). No idea what to do for mixer element "Mic Select"! ** (gnome-alsamixer:10036): WARNING **: gam_toggle_get_state (). No idea what to do for mixer element "Mono Output Select"! ** (gnome-alsamixer:10036): WARNING **: gam_toggle_get_state (). No idea what to do for mixer element "Channel Mode"! The error dialog "An error occurred while loading or saving..." as reported above is displayed. Clicking 'Details' shows a 70-line error message, similar to that above. (see attachment for the full story). An attempt to view 'Edit'->'Program Preferences' throws up a shorter list of errors: Bad key or directory name: "/apps/gnome-alsamixer/display_mixers/": Key/directory may not end with a slash (/) Bad key or directory name: "/apps/gnome-alsamixer/display_names/": Key/directory may not end with a slash (/) Bad key or directory name: "/apps/gnome-alsamixer/display_mixers/SigmaTel_STAC9721,23": `,' is an invalid character in key/directory names Bad key or directory name: "/apps/gnome-alsamixer/display_names/SigmaTel_STAC9721,23": `,' is an invalid character in key/directory names It's permissible to create files whose names contain a comma in the shell - why does gnome-alsamixer use a more conservative set? gnome-alsamixer should normalize the string returned by the sound device before attempting to use it to create a directory name.
Created attachment 90072 [details] Full list of errors listed by gnome-alsamixer
It's not actually a directory name on the filesystem: it's a "directory" in gconf. gconf doesn't allow directories to contain commas. (I'm nothing to do with gnome-alsamixer; I just found the bug and came over here to report it. I could fix it if the current maintainer was okay with it, though I have to wonder how live this project is considering it hasn't been touched in two years.)
Hi Thomas - Thanks for taking the time to look into this. Seems to me the right thing to do is to fix the bug, assuming gnome-alsamixer is still present in Gutsy Gibbon (Ubuntu 7.10) and the current release of Debian. I'll check Ubuntu.
Okay, the list of characters a key may not include is to be found here: http://svn.gnome.org/viewvc/gconf/trunk/gconf/gconf.c?view=annotate#2613 " \t\r\n\"$&<>,+=#!()'|{}[]?~`;%\\" and anything non-ASCII, and slash for our purposes. However, there is no way of getting hold of this list and no API to escape or unescape a string. Therefore, options are: 1) add a new function to replace any character outside a restrictive safe range (let's say [A-Za-z0-9-]) with _NN where NN is the hex code; shame we can't use %NN but % is on the blacklist; or 2) let's say we're not going to store slider data in gconf any more (this is actually a better idea all round, because gconf shouldn't be used for this sort of thing). I vote 2), but it's slightly more work.
Actually, on reflection, this is okay for gconf. I don't like using _ for the escape character because it's so commonly used. Oh, how about @ or *? We're allowed those, and I can't think they get used very often. Let's go with *.
Hi Thomas - Sounds good to me. I've just checked Ubuntu Gutsy Gibbon (7.10) and gnome-alsamixer isn't installed by default. Installing it from the repository with "sudo apt-get install gnome-alsamixer" installs 0.9.7, the same as the version in which the original bug was reported.
Created attachment 108155 [details] [review] Here's your fix This seems to work. Anyone want to verify? Could I have permission to check in, if it's good? Are the original maintainers around still?
Hi Thomas - I still have the sound card which caused the problem lying around (the machine in which it was installed has died) so over the next couple of weeks I can set up a test machine using some spare hardware, install Gutsy and apply the patch to test it. However I won't take any action until we hear from any of the original maintainers.
See also https://bugs.launchpad.net/ubuntu/+source/gnome-alsamixer/+bug/106903
Isn't that what gconf_escape_key() is for?
Oh, good grief, I could have sworn I read through the whole API looking for prior art, and yet somehow I missed that. Okay, new patch coming up later today. Sorry.
The last code change in gnome-alsamixer happened more than six years ago (Fri Jul 7 2005) according to http://git.gnome.org/browse/gnome-alsamixer/log/ and emails to the gnome-alsamixer maintainer bounce. Hence I consider this application unmaintained and I might close any remaining open bug reports soon (as part of GNOME Bugzilla Housekeeping).
gnome-alsamixer is not under active development anymore (see bug 796783). Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect reality. Please feel free to reopen this ticket (or rather transfer the project to GNOME Gitlab, as GNOME Bugzilla is deprecated) if anyone takes the responsibility for active development again.