Bug 264835 - tabs in kmix are removed after login, and cannot be readded
Summary: tabs in kmix are removed after login, and cannot be readded
Status: CLOSED FIXED
Alias: None
Product: kmix
Classification: Applications
Component: Backend: Pulseaudio (show other bugs)
Version: 1
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Colin Guthrie
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-30 12:05 UTC by H.H.
Modified: 2012-10-08 22:33 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
kmix first start with no existing config files (959.79 KB, text/plain)
2011-02-15 11:52 UTC, p92
Details
kmix second start with existing config files (247.08 KB, text/plain)
2011-02-15 11:53 UTC, p92
Details
for reference alsamixer output (36.31 KB, image/png)
2011-02-15 12:00 UTC, p92
Details

Note You need to log in before you can comment on or make changes to this bug.
Description H.H. 2011-01-30 12:05:14 UTC
Version:           0.9 (using KDE 4.6.0) 
OS:                Linux

since kde-4.6 often, after login, some tabs in kmix (used with pulseaudio) are gone. and I cannot re-add them, there is an error message like "cannot be added because the view-profile is not valid". this happens also with a fresh configuration (deleted all kmix config files ../share/apps/kmix and ../share/config/kmixrc and kmixctrlrc in my home)

Reproducible: Sometimes




OS: Linux (x86_64) release 2.6.34-12-desktop
Compiler: gcc
Comment 1 p92 2011-02-15 11:51:22 UTC
I can confirm that with kmix 0.8 on kde 4.6.0

kmix    4:4.6.0-0ubuntu1~maverick1~ppa1     volume control and mixer

I join konsole output from starting and stopping kmix with debugging activated. Sequence is :
- remove all kmix config files from config and apps subdir of .kde
- first start and record kmix output (all tabs are defined)
- quit kmix
- second start of kmix and record of kmix output (in and out devices tabs are missing)

- try to add an output sound device tab 
- try to add an input sound device tab

These last 2 actions result in the following output :
kmix(22516) KMixDockWidget::contextMenuAboutToShow: ---> md= MixDevice(0x199b510) dockMuteAction= KToggleAction(0x199b440, name = "dock_mute") isMuted= false
kmix(22516) KMixDockWidget::contextMenuAboutToShow: ---> md= MixDevice(0x199b510) dockMuteAction= KToggleAction(0x199b440, name = "dock_mute") isMuted= false
kmix(22516) KMixDockWidget::activate: Activate at  QPoint(0,0)
kmix(22516) KMixDockWidget::activate: Use default KStatusNotifierItem behavior
kmix(22516) KMixDockWidget::activateMenuOrWindow: activateMenuOrWindow:  true , QPoint(0,0)

kmix(22516) KMixWindow::newView: Enter
kmix(22516) DialogAddView::apply: We should now create a new view  "playback"  for mixer  "PulseAudio::Périphériques_de_lecture:1"
kmix(22516) KMixWindow::newView: >>> mixer =  "PulseAudio::Périphériques_de_lecture:1"  ->  Mixer(0x19959f0)
kmix(22516) GUIProfile::loadProfileFromXMLfiles: Ignore file  "profiles/PulseAudio.Périphériques_de_lecture.1.playback.xml"  (does not exist)
kmix(22516) GUIProfile::loadProfileFromXMLfiles: Ignore file  "profiles/PulseAudio.playback.xml"  (does not exist)
kmix(22516) KMixWindow::errorPopup: "Cannot add view - GUIProfile is invalid." 
kmix(22516) KMixWindow::newView: Exit

kmix(22516) KMixWindow::newView: Enter
kmix(22516) DialogAddView::apply: We should now create a new view  "capture"  for mixer  "PulseAudio::Périphériques_de_capture:1"
kmix(22516) KMixWindow::newView: >>> mixer =  "PulseAudio::Périphériques_de_capture:1"  ->  Mixer(0x19d68a0)
kmix(22516) GUIProfile::loadProfileFromXMLfiles: Ignore file  "profiles/PulseAudio.Périphériques_de_capture.1.capture.xml"  (does not exist)
kmix(22516) GUIProfile::loadProfileFromXMLfiles: Ignore file  "profiles/PulseAudio.capture.xml"  (does not exist)
kmix(22516) KMixWindow::errorPopup: "Cannot add view - GUIProfile is invalid." 
kmix(22516) KMixWindow::newView: Exit


kmix first start and restart will be added as attachements.
Comment 2 p92 2011-02-15 11:52:32 UTC
Created attachment 57274 [details]
kmix first start with no existing config files
Comment 3 p92 2011-02-15 11:53:15 UTC
Created attachment 57275 [details]
kmix second start with existing config files
Comment 4 p92 2011-02-15 11:59:43 UTC
I also add that I use a french locale 
$ locale
LANG=fr_FR.UTF-8
LANGUAGE=
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC="fr_FR.UTF-8"
LC_TIME="fr_FR.UTF-8"
LC_COLLATE="fr_FR.UTF-8"
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES="fr_FR.UTF-8"
LC_PAPER="fr_FR.UTF-8"
LC_NAME="fr_FR.UTF-8"
LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT="fr_FR.UTF-8"
LC_IDENTIFICATION="fr_FR.UTF-8"
LC_ALL=
Comment 5 p92 2011-02-15 12:00:34 UTC
Created attachment 57276 [details]
for reference alsamixer output
Comment 6 H.H. 2011-03-04 16:38:25 UTC
I found some forum discussion about this:

https://bbs.archlinux.org/viewtopic.php?id=113014=new

they say it maybe has to do with locales?
Comment 7 Christian Esken 2011-03-11 00:56:43 UTC
Pulseaudio specific => change component
Comment 8 Christian Esken 2011-03-11 01:00:20 UTC
BTW: Confirmed by me (cesken)
Comment 9 Daimonion 2011-03-12 09:01:20 UTC
*** This bug has been confirmed by popular vote. ***
Comment 10 Nuno Silva 2011-03-24 00:09:36 UTC
Hello.
I can also confirm this bug. kmix -> About reports:
KMix 3.8 / KDE 4.6.1 (in kubuntu 11.04 beta)

If I start kmix with:
LANG=C kmix
It always works.

After deleting kmix's files from ~/.kde, while using my locale (pt_PT), it works the first time only.

Even without deleting kmix's files from .kde, "LANG=C kmix" always works.
If someone wants more details just ask.
Comment 11 Beat Wolf 2011-04-02 21:27:58 UTC
adding myself as CC. Using french locale here, starting kmix with this command:
LANG=en kmix --keepvisibility
work, i hope this gets fixed for 4.6.2!
Comment 12 H.H. 2011-04-02 23:25:52 UTC
I can also confirm, that changing the language to english solves the problem.
Comment 13 Colin Guthrie 2011-04-03 12:27:30 UTC
Can people please check if this is solved by my patches/changes available here:
http://colin.guthr.ie/git/kdemultimedia-trunk/log/

I'll be committing these upstream very soon (probably today)
Comment 14 Colin Guthrie 2011-04-03 13:47:36 UTC
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.

CCBUG: 265317
CCBUG: 237239
CCBUG: 264835

 M  +6 -0      apps/kmix.cpp  
 M  +5 -0      gui/viewbase.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1226943
Comment 15 Colin Guthrie 2011-04-03 13:47:38 UTC
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.

CCBUG: 265317
CCBUG: 237239
CCBUG: 264835

 M  +28 -23    mixer_pulse.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1226944
Comment 16 Colin Guthrie 2011-04-03 13:47:40 UTC
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.

CCBUG: 265317
CCBUG: 237239
CCBUG: 264835

 M  +3 -4      core/mixdevice.cpp  
 M  +7 -7      gui/viewbase.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1226945
Comment 17 Colin Guthrie 2011-04-03 13:47:43 UTC
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.

CCBUG: 265317
CCBUG: 237239
CCBUG: 264835

 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
Comment 18 Colin Guthrie 2011-04-03 13:47:45 UTC
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.

CCBUG: 265317
CCBUG: 237239
CCBUG: 264835

 M  +5 -1      mdwslider.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1226947
Comment 19 Colin Guthrie 2011-04-03 13:47:46 UTC
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.

CCBUG: 265317
CCBUG: 237239
CCBUG: 264835

 M  +0 -36     viewbase.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1226948
Comment 20 Colin Guthrie 2011-04-03 13:47:48 UTC
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.

CCBUG: 265317
CCBUG: 237239
CCBUG: 264835

 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
Comment 21 Colin Guthrie 2011-04-03 13:58:00 UTC
SVN commit 1226958 by cguthrie:

kmix: Various (mostly PulseAudio related) fixes from trunk.

Merges r1225537 through r1226957.

CCBUG: 237239
CCBUG: 265317
CCBUG: 264835

 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  
 U             gui/viewbase.h  
 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
Comment 22 Colin Guthrie 2011-04-03 14:08:48 UTC
Can people please check the latest 4.6 svn branch to see if that fixes things for them? Many thanks :)
Comment 23 Beat Wolf 2011-04-07 16:38:56 UTC
currently i can't build kde svn. I just upgraded to kde 4.6.2 where the bug is still present. But i guess the new code will only be live in 4.6.3. I will report back then if nobody answered before about the svn code.
Comment 24 Christian Esken 2011-12-30 19:07:10 UTC
Beat Wolf has not reported back, but I can confirm that it is OK for me.