After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 429012 - Sound Blaster Live 5.1 - `,' an invalid character for SigmaTel_STAC9708,11
Sound Blaster Live 5.1 - `,' an invalid character for SigmaTel_STAC9708,11
Status: RESOLVED WONTFIX
Product: gnome-alsamixer
Classification: Other
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Thomas Thurman
Derrick J Houy
gnome[unmaintained]
Depends on:
Blocks:
 
 
Reported: 2007-04-12 14:37 UTC by n0rge
Modified: 2018-09-05 10:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Full list of errors listed by gnome-alsamixer (10.43 KB, text/plain)
2007-06-16 13:37 UTC, Ben Klaasen
  Details
Here's your fix (6.30 KB, patch)
2008-03-28 02:24 UTC, Thomas Thurman
rejected Details | Review

Description n0rge 2007-04-12 14:37:02 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.

###
Comment 1 Ben Klaasen 2007-06-16 13:36:28 UTC
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.
Comment 2 Ben Klaasen 2007-06-16 13:37:54 UTC
Created attachment 90072 [details]
Full list of errors listed by gnome-alsamixer
Comment 3 Thomas Thurman 2008-03-22 19:43:33 UTC
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.)
Comment 4 Ben Klaasen 2008-03-26 17:36:13 UTC
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.
Comment 5 Thomas Thurman 2008-03-27 01:26:45 UTC
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.
Comment 6 Thomas Thurman 2008-03-27 01:46:44 UTC
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 *.
Comment 7 Ben Klaasen 2008-03-27 21:49:37 UTC
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.
Comment 8 Thomas Thurman 2008-03-28 02:24:29 UTC
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?
Comment 9 Ben Klaasen 2008-03-28 14:10:21 UTC
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.
Comment 11 Bastien Nocera 2008-03-31 09:40:20 UTC
Isn't that what gconf_escape_key() is for?
Comment 12 Thomas Thurman 2008-03-31 11:53:12 UTC
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.
Comment 13 André Klapper 2012-03-16 12:55:47 UTC
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).
Comment 14 André Klapper 2018-09-05 10:23:20 UTC
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.