Version: unspecified (using KDE 4.6.0)
First observed in "Breaking the Tower" ( http://www.mojang.com/notch/ld12/breaking/ ) - a java game with no soundtrack but frequent short-lived sound events. The kmix playback tab contains "ALSA plug-in [java]:
ALSA playback" which is constantly flickering. Every so often an extra copy of this stream appears in the playback list; only the lowermost copy flickers and the others stay constant. The extra copies remain even after the stream has stopped playing and the originating java process has gone away.
If I run kmix in the console I see the message
"kmix(16151): MixDevice::setId(" "stream: " ") . Invalid key - it might not contain spaces"
when the extra stream appears.
I do not see these extra duplicate streams in pavucontrol and they do not reappear immediately when restarting kmix, but they do persist when restarting pulseaudio and keeping kmix open.
Originally saw this in Fedora 13 with:
Created attachment 56829 [details]
kmix profile file from paplay stress text.
Java behaves better in F15/KDE 4.6, but I found another way to reproduce:
'while true; do paplay /usr/share/sounds/KDE-Sys-Log-Out.ogg; done' with kmix on the console. Eventually the message quoted above will appear, and opening the kde mixer I see two copies of the stream in the playback tab.
Note that only in kde 4.6 does kmix have the profile xml files so I'm fairly sure that this isn't related to bug #264292. That said, I've attached the profile file from the reproducer in this comment in the hopes that it's useful.
I notice that at least one of the streams has spaces despite them being filtered out in kmix. It seems to contain a lot of unique stream names given that I'm spamming the same program over and over again, but maybe that's normal?
confirmed on Arch Linux, KDE 4.6.1
FWIW there are several bug reports about this. It's all the same root cause. The profiles in KMix don't really fit with PA and need to be disabled when PA is in use.
I've not had time to look at that yet but will try to do so soon.
I've probably fixed this in my tree, but waiting for Christian to review them before committing.
If you are keen you can grab my patches from here: http://colin.guthr.ie/git/kdemultimedia-trunk/log/
compiled your git repo, will test and report back :-)
this bug seems fixed with the patches from your git repo.
Haven’t seen this happen for 3 days now :-)
Awesome! Thanks for testing :) As I do PA development I tend to restart and fiddle with things too much for a proper burn in!
I'll get them pushed out tomorrow.
SVN commit 1226943 by cguthrie:
kmix: Do not allow 'channel configuration' with PulseAudio.
When the mixer is 'dynamic', configuring the channels is problematic and leads to some strange problems.
This is step one on masking that functionality when used with PA.
M +6 -0 apps/kmix.cpp
M +5 -0 gui/viewbase.cpp
WebSVN link: http://websvn.kde.org/?view=rev&revision=1226943
SVN commit 1226944 by cguthrie:
kmix: Various UTF8 encoding fixes.
This ensures that data that can be UTF8 is treated as such.
Another important fix is the use of QString::number() in the stream names.
Using the number is not great in the first place but the mixer ids need
to be unique. The downside of this is that you cannot split the
channels of a stream and expect it to be restored again (it will be
restored after a reboot but only when the stream indexes match up).
Some better plan is needed here.
That said, this should help restore problems with profiles encountered
with locales that need UTF8 encoding which should also hopefully
help the memory leak that results from this.
However, profile support will still be disabled with PulseAudio backend
anyway, so it shouldn't matter much.
M +28 -23 mixer_pulse.cpp
WebSVN link: http://websvn.kde.org/?view=rev&revision=1226944
SVN commit 1226945 by cguthrie:
kmix: Avoid the use of QString.sprintf().
This is generally discouraged and also doesn't deal gracefully with UTF8
encoded data (due to explicityly calling toAscii()) so use the
more modern QString().arg(..) construct and leave the data encoding
as is. This may result in writing some UTF8 data into the config files
but this should be handled gracefully.
M +3 -4 core/mixdevice.cpp
M +7 -7 gui/viewbase.cpp
WebSVN link: http://websvn.kde.org/?view=rev&revision=1226945
SVN commit 1226946 by cguthrie:
kmix: Do not save/load mixer profiles for dynamic mixers (e.g. PulseAudio)
These mixer profiles are just 'odd' when it comes to PA, especially the streams (as opposed to devices).
When used under plain ALSA mixer profiles make sense to hide the unecessary complexity
of ALSA from most users, but PA already hides that complexity and building a filter
system on top of that makes little sense and leads to strange bugs/configurations.
M +22 -4 apps/kmix.cpp
M +5 -1 gui/guiprofile.cpp
M +13 -2 gui/viewbase.cpp
WebSVN link: http://websvn.kde.org/?view=rev&revision=1226946
SVN commit 1226947 by cguthrie:
kmix: As we no longer allow editing of GUI Profiles for dynamic mixers, be sure to kill the 'Hide' context menu item too.
M +5 -1 mdwslider.cpp
WebSVN link: http://websvn.kde.org/?view=rev&revision=1226947
SVN commit 1226948 by cguthrie:
kmix: Kill off GUI Profile tweaks for dynamic mixers.
Now that dynamic mixers *always* use the fallback profile, we know that we don't have to
do any special fixups to display totally new devices/streams as we can be confident
the fallback GUI Profile will show them.
M +0 -36 viewbase.cpp
WebSVN link: http://websvn.kde.org/?view=rev&revision=1226948
SVN commit 1226949 by cguthrie:
kmix: Generify an earlier fix to not show close/new tab buttons with PulseAudio.
This just removes the specific PulseAudio check and relies on the 'dynamic' mixers
In theory the same logic could apply to OSSv4 but I doubt anyone will bother.
Also remove the option to Launch pavucontrol. There is no check to see if it is
installed and all the functionality of pavucontrol is now available in kmix
or Speaker Setup which is already linked to in the menu.
M +9 -18 apps/kmix.cpp
M +0 -1 apps/kmix.h
M +0 -1 kmixui.rc
WebSVN link: http://websvn.kde.org/?view=rev&revision=1226949
SVN commit 1226958 by cguthrie:
kmix: Various (mostly PulseAudio related) fixes from trunk.
Merges r1225537 through r1226957.
M +37 -22 apps/kmix.cpp
M +0 -1 apps/kmix.h
M +2 -2 backends/mixer_backend.cpp
M +57 -32 backends/mixer_pulse.cpp
M +7 -9 core/mixdevice.cpp
M +2 -13 core/mixdevice.h
M +1 -1 core/mixer.cpp
M +1 -1 core/mixer.h
M +5 -1 gui/guiprofile.cpp
M +11 -7 gui/mdwslider.cpp
M +30 -48 gui/viewbase.cpp
M +7 -7 gui/viewdockareapopup.cpp
M +0 -3 gui/viewdockareapopup.h
M +1 -1 gui/viewsliders.cpp
M +0 -1 kmixui.rc
WebSVN link: http://websvn.kde.org/?view=rev&revision=1226958
OK, I think this can now be closed :)
Fingers crossed it'll not reoccur.