Bug 311167 - KMix crashes when moving stream between devices
Summary: KMix crashes when moving stream between devices
Status: RESOLVED FIXED
Alias: None
Product: kmix
Classification: Applications
Component: Backend: Pulseaudio (show other bugs)
Version: 4.3
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Colin Guthrie
URL:
Keywords:
: 313197 315999 316980 317030 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-12-05 01:13 UTC by Eugene Shalygin
Modified: 2013-03-31 17:00 UTC (History)
20 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.10.2


Attachments
Patch to fix the crash (1.04 KB, patch)
2012-12-20 23:06 UTC, Eugene Shalygin
Details
New crash information added by DrKonqi (4.68 KB, text/plain)
2013-02-09 18:20 UTC, Stephan Diestelhorst
Details
New crash information added by DrKonqi (4.23 KB, text/plain)
2013-02-12 07:41 UTC, kaito.linux
Details
New crash information added by DrKonqi (5.07 KB, text/plain)
2013-02-18 02:36 UTC, Alex Lowe
Details
New crash information added by DrKonqi (3.86 KB, text/plain)
2013-02-26 13:10 UTC, Artem Vorotnikov
Details
New crash information added by DrKonqi (6.39 KB, text/plain)
2013-03-03 13:12 UTC, Frank Sagurna
Details
another fix for the crash (992 bytes, patch)
2013-03-03 15:38 UTC, Eugene Shalygin
Details
New crash information added by DrKonqi (6.87 KB, text/plain)
2013-03-12 19:38 UTC, Matthew Walker
Details
New crash information added by DrKonqi (4.98 KB, text/plain)
2013-03-24 20:35 UTC, rudepeople
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Shalygin 2012-12-05 01:13:55 UTC
Application: kmix (4.3)
KDE Platform Version: 4.9.90 (Compiled from sources)
Qt Version: 4.8.3
Operating System: Linux 3.6.9 x86_64
Distribution: "NAME=Gentoo"

-- Information about the crash:
KMix 4.3
PluseAudio backend
- What I was doing when the application crashed:
I was trying to move sound stream from one device to another. KMix crashes every time. Stream does not move

The crash can be reproduced every time.

-- Backtrace:
Application: KMix (kdeinit4), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f46fdd71780 (LWP 5244))]

Thread 2 (Thread 0x7f46d9c4a700 (LWP 5345)):
#0  0x00007f46fc6450b5 in pthread_mutex_lock () from /lib64/libpthread.so.0
#1  0x00007f46f8148d21 in g_mutex_lock () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f46f810cc1b in g_main_context_query () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f46f810d279 in g_main_context_iterate.isra.23 () from /usr/lib64/libglib-2.0.so.0
#4  0x00007f46f810d424 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#5  0x00007f46fc9ff656 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#6  0x00007f46fc9d0d0f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#7  0x00007f46fc9d0f98 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#8  0x00007f46fc8d5580 in QThread::exec() () from /usr/lib64/qt4/libQtCore.so.4
#9  0x00007f46fc9b1caf in QInotifyFileSystemWatcherEngine::run() () from /usr/lib64/qt4/libQtCore.so.4
#10 0x00007f46fc8d852c in QThreadPrivate::start(void*) () from /usr/lib64/qt4/libQtCore.so.4
#11 0x00007f46fc642f3b in start_thread () from /lib64/libpthread.so.0
#12 0x00007f46fb3f508d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f46fdd71780 (LWP 5244)):
[KCrash Handler]
#5  0x00007f46fbc10255 in QETWidget::translateMouseEvent(_XEvent const*) () from /usr/lib64/qt4/libQtGui.so.4
#6  0x00007f46fbc0f101 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#7  0x00007f46fbc34b52 in x11EventSourceDispatch(_GSource*, int (*)(void*), void*) () from /usr/lib64/qt4/libQtGui.so.4
#8  0x00007f46f810d035 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#9  0x00007f46f810d368 in g_main_context_iterate.isra.23 () from /usr/lib64/libglib-2.0.so.0
#10 0x00007f46f810d424 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#11 0x00007f46fc9ff636 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#12 0x00007f46fbc347de in QGuiEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtGui.so.4
#13 0x00007f46fc9d0d0f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#14 0x00007f46fc9d0f98 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#15 0x00007f46fc9d5ae8 in QCoreApplication::exec() () from /usr/lib64/qt4/libQtCore.so.4
#16 0x00007f46e79254ba in kdemain () from /usr/lib64/libkdeinit4_kmix.so
#17 0x0000000000408956 in launch(int, char const*, char const*, char const*, int, char const*, bool, char const*, bool, char const*) ()
#18 0x00000000004097bb in handle_launcher_request(int, char const*) [clone .isra.13] ()
#19 0x0000000000409dfb in handle_requests(int) ()
#20 0x0000000000405b7f in main ()

Possible duplicates by query: bug 311157, bug 311123, bug 309663, bug 309351, bug 307631.

Reported using DrKonqi
Comment 1 Christian Esken 2012-12-06 00:13:44 UTC
Changing Component to Pulseaudio.
(Cannot currently test this myself, as Ubuntu 12.10 refuses to detect more than one soundcard.)
Comment 2 Eugene Shalygin 2012-12-06 13:05:09 UTC
It carshes only when performing moving from full mixer window. Moves from popup window go without crashes. However, when new stream starts, it does not appear in the popup window. Idiscovered that it should only after restarting KMix with streams already playing
Comment 3 Eugene Shalygin 2012-12-06 13:14:22 UTC
Hm.. Debug build crashes in both cases: from popup window and from full also.

This is from popup:


Application: KMix (kmix), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fb83ad647c0 (LWP 12990))]

Thread 2 (Thread 0x7fb81652a700 (LWP 12991)):
#0  0x00007fb8363c516d in poll () from /lib64/libc.so.6
#1  0x00007fb8370fd304 in g_main_context_iterate.isra.23 () from /usr/lib64/libglib-2.0.so.0
#2  0x00007fb8370fd424 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007fb83810b9f6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#4  0x00007fb8380dcd9f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#5  0x00007fb8380dd028 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#6  0x00007fb837fe1680 in QThread::exec() () from /usr/lib64/qt4/libQtCore.so.4
#7  0x00007fb8380bdd6f in QInotifyFileSystemWatcherEngine::run() () from /usr/lib64/qt4/libQtCore.so.4
#8  0x00007fb837fe462c in QThreadPrivate::start(void*) () from /usr/lib64/qt4/libQtCore.so.4
#9  0x00007fb837d4ef3b in start_thread () from /lib64/libpthread.so.0
#10 0x00007fb8363ce08d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7fb83ad647c0 (LWP 12990)):
[KCrash Handler]
#5  0x00007fb8380f20f4 in QMetaObject::changeGuard(QObject**, QObject*) () from /usr/lib64/qt4/libQtCore.so.4
#6  0x00007fb8393d4bdd in QMenuPrivate::activateAction(QAction*, QAction::ActionEvent, bool) () from /usr/lib64/qt4/libQtGui.so.4
#7  0x00007fb839d6d280 in KMenu::mouseReleaseEvent(QMouseEvent*) () from /usr/lib64/libkdeui.so.5
#8  0x00007fb83900a1fd in QWidget::event(QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#9  0x00007fb8393d5dbb in QMenu::event(QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#10 0x00007fb838fc09fc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#11 0x00007fb838fc2fb2 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#12 0x00007fb839cb4006 in KApplication::notify(QObject*, QEvent*) () from /usr/lib64/libkdeui.so.5
#13 0x00007fb8380de03e in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/qt4/libQtCore.so.4
#14 0x00007fb838fc188b in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib64/qt4/libQtGui.so.4
#15 0x00007fb83903724c in QETWidget::translateMouseEvent(_XEvent const*) () from /usr/lib64/qt4/libQtGui.so.4
#16 0x00007fb839036121 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#17 0x00007fb83905bbb2 in x11EventSourceDispatch(_GSource*, int (*)(void*), void*) () from /usr/lib64/qt4/libQtGui.so.4
#18 0x00007fb8370fd035 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#19 0x00007fb8370fd368 in g_main_context_iterate.isra.23 () from /usr/lib64/libglib-2.0.so.0
#20 0x00007fb8370fd424 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#21 0x00007fb83810b9f6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#22 0x00007fb83905b83e in QGuiEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtGui.so.4
#23 0x00007fb8380dcd9f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#24 0x00007fb8380dd028 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#25 0x00007fb8380e1b78 in QCoreApplication::exec() () from /usr/lib64/qt4/libQtCore.so.4
#26 0x00007fb83a947336 in kdemain (argc=2, argv=0x7fff4892b158) at /home/eugene/develop/KDE/live/multimedia/KMix/apps/main.cpp:76
#27 0x00000000004009ce in main (argc=2, argv=0x7fff4892b158) at /home/eugene/develop/KDE/live/multimedia/KMix/build/kmix_dummy.cpp:3
Comment 4 Søren Holm 2012-12-09 01:18:40 UTC
I can confirm this, I'm running Kubuntu Ringtail 13.04
Comment 5 Eugene Shalygin 2012-12-20 23:06:41 UTC
Created attachment 75945 [details]
Patch to fix the crash

I do not know does it break something or not, but changing connection type to "Queued" when invoking event listeners in ControlManager seems to fix the crash. I can move now streams  from full window as well as from popup one.
Comment 6 Christian Esken 2013-01-02 18:56:31 UTC
Unfortunately the patch has indeed the potential to completely break KMix. announce() is supposed to guarantee all listeners are executed when it returns. It will be pure luck whether communication still works, fails or crashes KMix.

Probably the complex patch from https://git.reviewboard.kde.org/r/107822/diff/ will help. I am testing that at the moment.
Comment 7 Michael D 2013-02-06 18:39:42 UTC
I am experiecing the same bug, Kubuntu 12.10, KDE 4.10 RC3. It crashes using the popup mixer. No problem moving stream using pavucontrol.
Comment 8 Stephan Diestelhorst 2013-02-09 18:20:05 UTC
Created attachment 77059 [details]
New crash information added by DrKonqi

kmix (4.3) on KDE Platform 4.10.00 using Qt 4.8.2

- What I was doing when the application crashed:

Freshly upgraded to KDE 4.10 stable on Kubuntu 12.04.2 and suddenly Kmix moving playback streams to other sinks crashes KMix reliably.

-- Backtrace (Reduced):
#6  QETWidget::translateMouseEvent (this=0xaf7290, event=<optimized out>) at kernel/qapplication_x11.cpp:4568
#7  0x00007ffff52f3ace in QApplication::x11ProcessEvent (this=0x628130, event=0x7fffffffd740) at kernel/qapplication_x11.cpp:3732
#8  0x00007ffff531d052 in x11EventSourceDispatch (s=0x645a70, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
[...]
#12 0x00007ffff462b89f in QEventDispatcherGlib::processEvents (this=0x603ad0, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#13 0x00007ffff531ccde in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
Comment 9 Stephan Diestelhorst 2013-02-12 01:21:09 UTC
I just reproduced in GDB.

The code is somewhat strange.   In QETWidget::translateMouseEvent(_XEvent const*), rbx points to _XEvent eventually and so somehow there is a NULL pointer sneaking into the _XEvent structure at offset 0x20, which is then dereferenced:

   0x00007ffff52f49f5 <+629>:   mov    0x20(%rbx),%rax
=> 0x00007ffff52f49f9 <+633>:   cmpb   $0x9,0xc(%rax)
   0x00007ffff52f49fd <+637>:   je     0x7ffff52f4a0a <QETWidget::translateMouseEvent(_XEvent const*)+650>

However, earlier, the same dereference seems to work:
   0x00007ffff52f490d <+397>:   mov    0x20(%rbx),%rax
   0x00007ffff52f4911 <+401>:   lea    0xc0(%rsp),%rdx
   0x00007ffff52f4919 <+409>:   mov    %rdx,0x20(%rsp)
   0x00007ffff52f491e <+414>:   cmpb   $0x9,0xc(%rax)

However, the code flow is a bit obscure so I might have missed branches in here.

Regs:
(gdb) info reg
rax            0x0      0                                                                                                  
rbx            0xc1f8c0 12712128                                                                                           
rcx            0x0      0                                                                                                  
rdx            0x7ffff7b2e778   140737349085048                                                                            
rsi            0x1      1                                                                                                  
rdi            0x7fffffffce60   140737488342624                                                                            
rbp            0x7fffffffce60   0x7fffffffce60                                                                             
rsp            0x7fffffffce10   0x7fffffffce10                                                                             
r8             0x0      0                                                                                                  
r9             0x0      0                                                                                                  
r10            0x3a018d00000000 16327253751234560                                                                          
r11            0x0      0                                                                                                  
r12            0x7ffff4953720   140737296807712                                                                            
r13            0x3      3                                                                                                  
r14            0x7fffffffcee0   140737488342752                                                                            
r15            0x1      1                                                                                                  
rip            0x7ffff52f49f9   0x7ffff52f49f9 <QETWidget::translateMouseEvent(_XEvent const*)+633>                        
eflags         0x10202  [ IF RF ]                                                                                          
cs             0x33     51                                                                                                 
ss             0x2b     43                                                                                                 
ds             0x0      0                                                                                                  
es             0x0      0                                                                                                  
fs             0x0      0                                                                                                  
gs             0x0      0

Backtrace:
Program received signal SIGSEGV, Segmentation fault.
QETWidget::translateMouseEvent (this=0xc1f8c0, event=<optimized out>) at kernel/qapplication_x11.cpp:4568
4568    kernel/qapplication_x11.cpp: Datei oder Verzeichnis nicht gefunden.
(gdb) bt
#0  QETWidget::translateMouseEvent (this=0xc1f8c0, event=<optimized out>) at kernel/qapplication_x11.cpp:4568
#1  0x00007ffff52f3ace in QApplication::x11ProcessEvent (this=0x628280, event=0x7fffffffd730)
    at kernel/qapplication_x11.cpp:3732
#2  0x00007ffff531d052 in x11EventSourceDispatch (s=0x640f70, callback=0, user_data=0x0)
    at kernel/qguieventdispatcher_glib.cpp:146
#3  0x00007fffed43ad53 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fffed43b0a0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fffed43b164 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007ffff462b89f in QEventDispatcherGlib::processEvents (this=0x603ad0, flags=...)
    at kernel/qeventdispatcher_glib.cpp:424
#7  0x00007ffff531ccde in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...)
    at kernel/qguieventdispatcher_glib.cpp:204
#8  0x00007ffff45fae42 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#9  0x00007ffff45fb097 in QEventLoop::exec (this=0x7fffffffdad0, flags=...) at kernel/qeventloop.cpp:204
#10 0x00007ffff46003e7 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1187
#11 0x00007ffff7b7a922 in kdemain () from /usr/lib/kde4/libkdeinit/libkdeinit4_kmix.so
#12 0x00007ffff779776d in __libc_start_main (main=0x400630, argc=2, ubp_av=0x7fffffffe058, init=<optimized out>, 
    fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe048) at libc-start.c:226
#13 0x0000000000400661 in _start ()
(gdb) bt
#0  QETWidget::translateMouseEvent (this=0xc1f8c0, event=<optimized out>) at kernel/qapplication_x11.cpp:4568             
#1  0x00007ffff52f3ace in QApplication::x11ProcessEvent (this=0x628280, event=0x7fffffffd730)                              
    at kernel/qapplication_x11.cpp:3732                                                                                    
#2  0x00007ffff531d052 in x11EventSourceDispatch (s=0x640f70, callback=0, user_data=0x0)                                   
    at kernel/qguieventdispatcher_glib.cpp:146                                                                            
#3  0x00007fffed43ad53 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0                          
#4  0x00007fffed43b0a0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0                                               
#5  0x00007fffed43b164 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0                         
#6  0x00007ffff462b89f in QEventDispatcherGlib::processEvents (this=0x603ad0, flags=...)                               
    at kernel/qeventdispatcher_glib.cpp:424                                                                            
#7  0x00007ffff531ccde in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...)                     
    at kernel/qguieventdispatcher_glib.cpp:204                                                                         
#8  0x00007ffff45fae42 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149       
#9  0x00007ffff45fb097 in QEventLoop::exec (this=0x7fffffffdad0, flags=...) at kernel/qeventloop.cpp:204                 
#10 0x00007ffff46003e7 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1187                                    
#11 0x00007ffff7b7a922 in kdemain () from /usr/lib/kde4/libkdeinit/libkdeinit4_kmix.so                                     
#12 0x00007ffff779776d in __libc_start_main (main=0x400630, argc=2, ubp_av=0x7fffffffe058, init=<optimized out>,           
    fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe048) at libc-start.c:226                         
#13 0x0000000000400661 in _start ()
Comment 10 kaito.linux 2013-02-12 07:41:04 UTC
Created attachment 77185 [details]
New crash information added by DrKonqi

kmix (4.3) on KDE Platform 4.10.00 "release 546" using Qt 4.8.4

- What I was doing when the application crashed:
I want to moving a stream to an other Device with Kmix.

It Crash every time.

-- Backtrace (Reduced):
#6  QETWidget::translateMouseEvent (this=this@entry=0x1756c60, event=event@entry=0x7fff68d46e50) at kernel/qapplication_x11.cpp:4478
#7  0x00007fb83b3a1be1 in QApplication::x11ProcessEvent (this=0x123cba0, event=0x7fff68d46e50) at kernel/qapplication_x11.cpp:3650
#8  0x00007fb83b3c7f72 in x11EventSourceDispatch (s=0x128fe00, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
[...]
#12 0x00007fb83c1c8116 in QEventDispatcherGlib::processEvents (this=0x1288830, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#13 0x00007fb83b3c7bee in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
Comment 11 Stephan Diestelhorst 2013-02-15 15:13:34 UTC
(In reply to comment #6)
> Probably the complex patch from
> https://git.reviewboard.kde.org/r/107822/diff/ will help. I am testing that
> at the moment.

Doesn't help for me, still crahes when switching to another source.

(Building:
  kdesrc-build kdemultimedia
  git checkout origin/4.10
  patch -p1 < <patch from reviewboard>
  kdesrc-build --no-src kdemultimedia
 )

Just confirmed that the patch is indeed applied.  Switching dies from:
-open menu (but needs more retries than originally)
-context menu (also switches once without a problem)

Backtrace:
(gdb) bt
#0  QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x6021f0)
    at kernel/qcoreapplication.cpp:1526
#1  0x00007ffff4838473 in sendPostedEvents () at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:236
#2  postEventSourceDispatch (s=<optimized out>) at kernel/qeventdispatcher_glib.cpp:279
#3  0x00007fffed647d53 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fffed6480a0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fffed648164 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007ffff483889f in QEventDispatcherGlib::processEvents (this=0x603ad0, flags=...)
    at kernel/qeventdispatcher_glib.cpp:424
#7  0x00007ffff5529cde in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...)
    at kernel/qguieventdispatcher_glib.cpp:204
#8  0x00007ffff4807e42 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#9  0x00007ffff4808097 in QEventLoop::exec (this=0x7fffffffdad0, flags=...) at kernel/qeventloop.cpp:204
#10 0x00007ffff480d3e7 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1187
#11 0x00007ffff7b78c52 in kdemain (argc=2, argv=0x7fffffffe058)
    at /home/stephan/20-Projects/2013-02_Fix_KMix/kdesrc/kde/kdemultimedia/kmix/apps/main.cpp:76
#12 0x00007ffff779476d in __libc_start_main (main=0x400650 <main(int, char**)>, argc=2, ubp_av=0x7fffffffe058, 
    init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe048) at libc-start.c:226
#13 0x0000000000400681 in _start ()

(gdb) list
1521    in kernel/qcoreapplication.cpp

(gdb) info reg
rax            0x5da    1498
rbx            0xd87230 14185008
rcx            0x1      1
rdx            0x3      3
rsi            0x1      1
rdi            0x602239 6300217
rbp            0x0      0x0
rsp            0x7fffffffd850   0x7fffffffd850
r8             0x0      0
r9             0x0      0
r10            0xf1f4b0 15856816
r11            0xc7f690 13104784
r12            0xd87250 14185040
r13            0x6021f0 6300144
r14            0x0      0
r15            0x60222c 6300204
rip            0x7ffff480d08d   0x7ffff480d08d <QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)+1037>
eflags         0x10286  [ PF SF IF RF ]
cs             0x33     51
ss             0x2b     43
ds             0x0      0
es             0x0      0
fs             0x0      0
gs             0x0      0

(gdb) disas
  ...
   0x00007ffff480cfc1 <+833>:   callq  0x7ffff480e710 <QList<QPostEvent>::detach_helper(int)>
   0x00007ffff480cfc6 <+838>:   mov    0x30(%r13),%rbp
   0x00007ffff480cfca <+842>:   movslq 0xc(%rbp),%rax
   0x00007ffff480cfce <+846>:   mov    %rax,0x10(%rsp)
   0x00007ffff480cfd3 <+851>:   mov    0x0(%rbp),%eax
   0x00007ffff480cfd6 <+854>:   mov    0x40(%r13),%edx
   0x00007ffff480cfda <+858>:   cmp    $0x1,%eax
   0x00007ffff480cfdd <+861>:   mov    %edx,0x1c(%rsp)
   0x00007ffff480cfe1 <+865>:   je     0x7ffff480d23b <QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)+1467>
---Type <return> to continue, or q <return> to quit---
   0x00007ffff480cfe7 <+871>:   mov    0x4(%rbp),%esi
   0x00007ffff480cfea <+874>:   mov    0x8(%rsp),%rdi
   0x00007ffff480cfef <+879>:   callq  0x7ffff480e710 <QList<QPostEvent>::detach_helper(int)>
   0x00007ffff480cff4 <+884>:   mov    0x30(%r13),%rax
   0x00007ffff480cff8 <+888>:   movslq 0x8(%rax),%rdx
   0x00007ffff480cffc <+892>:   lea    0x18(%rax,%rdx,8),%rdi
   0x00007ffff480d001 <+897>:   movslq 0x1c(%rsp),%rax
   0x00007ffff480d006 <+902>:   lea    (%rdi,%rax,8),%rsi
   0x00007ffff480d00a <+906>:   mov    0x10(%rsp),%rax
   0x00007ffff480d00f <+911>:   lea    0x18(%rbp,%rax,8),%r8
   0x00007ffff480d014 <+916>:   sub    %rsi,%r8
   0x00007ffff480d017 <+919>:   shr    $0x3,%r8
   0x00007ffff480d01b <+923>:   test   %r8d,%r8d
   0x00007ffff480d01e <+926>:   jle    0x7ffff480d188 <QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)+1288>
   0x00007ffff480d024 <+932>:   mov    %r8d,%eax
   0x00007ffff480d027 <+935>:   sar    %eax
   0x00007ffff480d029 <+937>:   movslq %eax,%rdx
   0x00007ffff480d02c <+940>:   lea    (%rsi,%rdx,8),%rcx
   0x00007ffff480d030 <+944>:   mov    (%rcx),%rdx
   0x00007ffff480d033 <+947>:   cmp    %ebx,0x10(%rdx)
   0x00007ffff480d036 <+950>:   jl     0x7ffff480d042 <QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)+962>
   0x00007ffff480d038 <+952>:   jmpq   0x7ffff480d227 <QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)+1447>
   0x00007ffff480d03d <+957>:   nopl   (%rax)
   0x00007ffff480d040 <+960>:   mov    %edx,%eax
   0x00007ffff480d042 <+962>:   test   %eax,%eax
   0x00007ffff480d044 <+964>:   je     0x7ffff480d188 <QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)+1288>
   0x00007ffff480d04a <+970>:   mov    %eax,%edx
   0x00007ffff480d04c <+972>:   sar    %edx
   0x00007ffff480d04e <+974>:   movslq %edx,%rcx
   0x00007ffff480d051 <+977>:   lea    (%rsi,%rcx,8),%rcx
   0x00007ffff480d055 <+981>:   mov    (%rcx),%r8
   0x00007ffff480d058 <+984>:   cmp    0x10(%r8),%ebx
   0x00007ffff480d05c <+988>:   jg     0x7ffff480d040 <QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)+960>
   0x00007ffff480d05e <+990>:   not    %edx
   0x00007ffff480d060 <+992>:   lea    0x8(%rcx),%rsi
   0x00007ffff480d064 <+996>:   lea    (%rax,%rdx,1),%r8d
   0x00007ffff480d068 <+1000>:  jmp    0x7ffff480d01b <QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)+923>
   0x00007ffff480d06a <+1002>:  nopw   0x0(%rax,%rax,1)
   0x00007ffff480d070 <+1008>:  test   %esi,%esi
   0x00007ffff480d072 <+1010>:  jle    0x7ffff480cf55 <QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)+725>
   0x00007ffff480d078 <+1016>:  nopl   0x0(%rax,%rax,1)
   0x00007ffff480d080 <+1024>:  andb   $0xfe,0x12(%rbx)
   0x00007ffff480d084 <+1028>:  mov    (%r12),%rbp
   0x00007ffff480d088 <+1032>:  mov    0x30(%rsp),%rdi
=> 0x00007ffff480d08d <+1037>:  mov    0x8(%rbp),%rax
   0x00007ffff480d091 <+1041>:  subl   $0x1,0x24(%rax)
   0x00007ffff480d095 <+1045>:  test   $0x1,%dil
   0x00007ffff480d099 <+1049>:  movq   $0x0,0x8(%r12)
   0x00007ffff480d0a2 <+1058>:  je     0x7ffff480d0cc <QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)+1100>
   0x00007ffff480d0a4 <+1060>:  and    $0xfffffffffffffffe,%rdi
   0x00007ffff480d0a8 <+1064>:  mov    (%rdi),%rdx
   0x00007ffff480d0ab <+1067>:  mov    %rdi,0x30(%rsp)
   0x00007ffff480d0b0 <+1072>:  testb  $0x1,0x4(%rdx)
   0x00007ffff480d0b4 <+1076>:  jne    0x7ffff480d150 <QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)+1232>
   0x00007ffff480d0ba <+1082>:  mov    $0x1,%eax
   0x00007ffff480d0bf <+1087>:  xor    %ecx,%ecx
   0x00007ffff480d0c1 <+1089>:  lock cmpxchg %ecx,(%rdx)
   0x00007ffff480d0c5 <+1093>:  sete   %cl
   0x00007ffff480d0c8 <+1096>:  test   %cl,%cl
   0x00007ffff480d0ca <+1098>:  je     0x7ffff480d140 <QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)+1216>
---Type <return> to continue, or q <return> to quit---
   0x00007ffff480d0cc <+1100>:  mov    0x351a1d(%rip),%rax        # 0x7ffff4b5eaf0
   0x00007ffff480d0d3 <+1107>:  andb   $0xfd,0x12(%rbx)
   0x00007ffff480d0d7 <+1111>:  mov    (%rax),%rdi
   0x00007ffff480d0da <+1114>:  test   %rdi,%rdi
   0x00007ffff480d0dd <+1117>:  je     0x7ffff480d0ea <QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)+1130>
   0x00007ffff480d0df <+1119>:  mov    %rbx,%rdx
   0x00007ffff480d0e2 <+1122>:  mov    %rbp,%rsi
   0x00007ffff480d0e5 <+1125>:  callq  0x7ffff4809280 <QCoreApplication::notifyInternal(QObject*, QEvent*)>
Comment 12 Alex Lowe 2013-02-18 02:36:55 UTC
Created attachment 77391 [details]
New crash information added by DrKonqi

kmix (4.3) on KDE Platform 4.10.00 using Qt 4.8.3

With any stream I have tried, changing output hardware in kmix will cause kmix to crash.

-- Backtrace (Reduced):
#6  QETWidget::translateMouseEvent (this=this@entry=0x1f051b0, event=event@entry=0x7fffee3d3250) at kernel/qapplication_x11.cpp:4573
#7  0x00007f7d3685b44f in QApplication::x11ProcessEvent (this=0x17f9820, event=0x7fffee3d3250) at kernel/qapplication_x11.cpp:3737
#8  0x00007f7d36882fa2 in x11EventSourceDispatch (s=0x1854970, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
[...]
#12 0x00007f7d35bafbf6 in QEventDispatcherGlib::processEvents (this=0x178fad0, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#13 0x00007f7d36882c1e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
Comment 13 Christian Esken 2013-02-22 23:37:50 UTC
Unfortunately my Ubuntu installation fails to recognize more than one soundcard. Thus I cannot move streams and have no chance to reproduce this. So external help would be highly welcome.
Comment 14 Søren Holm 2013-02-22 23:41:12 UTC
I'll be happy to help out my compiling and debugging kmix. My only trouble here is how to kmix only kmix - and where to get the code.
Comment 15 Christian Esken 2013-02-22 23:43:15 UTC
*** Bug 313197 has been marked as a duplicate of this bug. ***
Comment 16 Christian Esken 2013-02-22 23:55:34 UTC
Thanks Søren.
Sourcecode can be get by git, see: https://projects.kde.org/projects/kde/kdemultimedia/kmix/repository
You don't need to compile anything else. Only the development libraries must be installed (e.g. qt, kde, alsa, pulseaudio [1]). Let me know whether you need help.

[1] http://techbase.kde.org/Getting_Started/Build/Distributions
Some info on building (actually not all libs required for KMix, as they are for various KDE parts)
Comment 17 Søren Holm 2013-02-23 01:42:33 UTC
For starters biisecting commes up with this - I'll return when I have more information.

fe10fc1761c10dbbf16ad30d0870acf367945efb is the first bad commit
commit fe10fc1761c10dbbf16ad30d0870acf367945efb
Author: Christian Esken <esken@kde.org>
Date:   Mon Sep 24 23:32:04 2012 +0200

    ControlManager:  Implementation of New Master for DockPopup

:040000 040000 29c054e91d9b512fa1db0c2c1956df625a81e1d7 1eb83a4524e01fcfbac8ad0af9601cec01354c06 M      apps
:040000 040000 c69919337ddd4d46e55e0f15477cc21b60c27485 4a97ce0d83e2c452a6dc0a6b809183c68e9ae95f M      backends
:040000 040000 62a2f0a314922d6e136c620c3cdc241c6291365a 9e52fd2b28ebee6866c7b7eba8b93644465b3f3b M      core
:040000 040000 d9cfd5a32d86075663907a1400cc5da3cd12858f 9b78433f68defdcf43613fef1222b9253daafa49 M      gui
sgh@koontz:~/git/open-source/kmix$ git checkout -f fe10fc1761c10dbbf16ad30d0870acf367945efb
Comment 18 Eugene Shalygin 2013-02-23 01:44:19 UTC
(In reply to comment #13)
> Unfortunately my Ubuntu installation fails to recognize more than one
> soundcard. Thus I cannot move streams and have no chance to reproduce this.
> So external help would be highly welcome.

Christian,
could you, please, tell what is the purpose of 
ControlManager::instance().announce(QString(), ControlChangeType::ControlList, QString("Mixer.moveStream()")) call in 
Mixer::moveStream( const QString id, const QString& destId ) ?

This leads to recreation of widgets, and since it is efficently called from menu hadler, it crashes afterwards. Maybe that call can be removed, or a new type of event (like StreamMoved) can be introduced, which will not lead to rereation of widgets. Both fixes the crash.

If this is not possbile, then my second suggestions is to change connection type in in MDWSlider::showMoveMenu() to Qt::QueuedConnection: we will leave menu handler before deleting widgets. This also fixes the crash
Comment 19 Stephan Diestelhorst 2013-02-26 02:14:33 UTC
(In reply to comment #13)
> Unfortunately my Ubuntu installation fails to recognize more than one
> soundcard. Thus I cannot move streams and have no chance to reproduce this.
> So external help would be highly welcome.

Christian, can you try creating a separate sink in Pulseaudio, for example with:
>$ pacmd load-module module-null-sink sink_name=Testsink
?
Comment 20 Artem Vorotnikov 2013-02-26 13:10:28 UTC
Created attachment 77592 [details]
New crash information added by DrKonqi

kmix (4.3) on KDE Platform 4.10.00 using Qt 4.8.4

KMix crashed while assigning Skype Input to another Mic device.

-- Backtrace (Reduced):
#6  QETWidget::translateMouseEvent (this=0xe18d50, event=<optimized out>) at kernel/qapplication_x11.cpp:4467
#7  0x0000003748656dfa in QApplication::x11ProcessEvent (this=0x744c30, event=0x7fffda8403e0) at kernel/qapplication_x11.cpp:3639
#8  0x000000374867e482 in x11EventSourceDispatch (s=0x74f310, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#9  0x000000335364a813 in g_main_dispatch (context=0x751c00) at gmain.c:2715
#10 g_main_context_dispatch (context=0x751c00) at gmain.c:3219
Comment 21 Frank Sagurna 2013-03-03 13:12:26 UTC
Created attachment 77709 [details]
New crash information added by DrKonqi

kmix (4.3) on KDE Platform 4.10.00 using Qt 4.8.4

- What I was doing when the application crashed:

Moving audio stream to other sink from the panel applet.

-- Backtrace (Reduced):
#6  0x00007f20b0869ccd in operator= (p=0x0, this=0x2c49130) at ../../include/QtCore/../../src/corelib/kernel/qpointer.h:68
#7  QMenuPrivate::activateAction (this=0x2c48e70, action=0x2eba790, action_e=QAction::Trigger, self=<optimized out>) at widgets/qmenu.cpp:1143
#8  0x00007f20b2282520 in KMenu::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/libkdeui.so.5
#9  0x00007f20b0478a89 in QWidget::event (this=0x2cda4d0, event=0x7fffed1104a0) at kernel/qwidget.cpp:8375
#10 0x00007f20b086b48b in QMenu::event (this=0x2cda4d0, e=0x7fffed1104a0) at widgets/qmenu.cpp:2481
Comment 22 Eugene Shalygin 2013-03-03 15:28:13 UTC
You see, Christian, this last backtrace from comment 21, which was obtained with debug symbols for Qt, clearly shows that the problem can be avoided if we do not delete the menu object from the handler. 4.10.1 will be without a fix, as I understand, but could you, please, commit the fix for 4.10.2?
Comment 23 Eugene Shalygin 2013-03-03 15:38:40 UTC
Created attachment 77711 [details]
another fix for the crash

Change connection type in mdwslider.cpp
Comment 24 Thilo-Alexander Ginkel 2013-03-04 20:47:14 UTC
I can confirm that the patch in attachment 77711 [details] solves the issue for me.
Comment 25 Stephan Diestelhorst 2013-03-04 20:58:08 UTC
Also confirming attachment 77711 [details] fixing the issue for me.  If you are on Kubuntu, this is the way to build the package:

sudo apt-get build-dep kmix
apt-get source kmix
cd kmix-4.10.0
wget "http://bugsfiles.kde.org/attachment.cgi?id=77711" -O bugfix.diff
patch -p0 < bugfix.diff
dpkg-buildpackage -rfakeroot -us -uc
sudo dpkg -i ../kmix_4.10.*.deb
Comment 26 Michael D 2013-03-04 21:34:09 UTC
Stephan, thanks very much for the Kubuntu patch instructions. I just did mine and the issue is fixed for me too.
Comment 27 Thomas Kuther 2013-03-05 11:09:59 UTC
The patch from #23 fixes the issue here too (ArchLinux x86_64). Thanks Eugene!
Comment 28 Stephan Diestelhorst 2013-03-05 15:27:16 UTC
Eugene, maybe it would be good if you put this into reviewboard.kde.org and / or onto kde-multimedia@kde.org yourself.  It seems that Christian is busy with other things right now.
Comment 29 Eugene Shalygin 2013-03-05 15:41:08 UTC
Why not? https://git.reviewboard.kde.org/r/109293/
Comment 30 Michael D 2013-03-07 18:51:33 UTC
Even with the patch, kwin crashes often soon after moving a stream to HDMI. (I'm using Catalyst 13.2 beta drivers.) Also, is it "normal" that the kmix pop-up go entirely gray after moving a stream?
Comment 31 Eugene Shalygin 2013-03-07 19:14:45 UTC
Does it crash a similar backtrace?
Comment 32 Stephan Diestelhorst 2013-03-07 19:56:41 UTC
(In reply to comment #30)
> Even with the patch, kwin crashes often soon after moving a stream to HDMI.
> (I'm using Catalyst 13.2 beta drivers.) Also, is it "normal" that the kmix
> pop-up go entirely gray after moving a stream?

Could it be that today's KDE updates overwrote your manually compiled version?  They did for me and I had to rebuild.
Comment 33 Michael D 2013-03-08 07:10:46 UTC
Stephan, that is likely what happened. I'll rebuild and see how it goes.
Comment 34 Matthew Walker 2013-03-12 19:38:27 UTC
Created attachment 77991 [details]
New crash information added by DrKonqi

kmix (4.3) on KDE Platform 4.10.1 using Qt 4.8.4

- What I was doing when the application crashed:

Transfering a stream (clementine) from the machine kmix crashed on from desktop speakers to laptop speakers (connected over ethernet).
This can happen when transferring to any device as far as I can tell. I have had this work, in the livecd I think, but more often than not it just crashes.

-- Backtrace (Reduced):
#6  0x00007f439a018ccd in operator= (p=0x0, this=0x2f984f0) at ../../include/QtCore/../../src/corelib/kernel/qpointer.h:68
#7  QMenuPrivate::activateAction (this=0x2f98230, action=0x300f710, action_e=QAction::Trigger, self=<optimized out>) at widgets/qmenu.cpp:1143
#8  0x00007f439ba1b880 in KMenu::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/libkdeui.so.5
#9  0x00007f4399c27a89 in QWidget::event (this=0x2ee8090, event=0x7fffd43b8740) at kernel/qwidget.cpp:8375
#10 0x00007f439a01a48b in QMenu::event (this=0x2ee8090, e=0x7fffd43b8740) at widgets/qmenu.cpp:2481
Comment 35 Michael Palimaka 2013-03-15 17:17:32 UTC
Given the positive feedback here and on reviewboard, I will commit the patch tomorrow if there are no objections.
Comment 36 Matthew Walker 2013-03-15 20:27:42 UTC
Can also confirm that the patch fixes the issue, haven't had any other problems.
Comment 37 Michael Palimaka 2013-03-17 17:09:05 UTC
Git commit 3ea6fbcad8c205f828f3c626f4d50d4938e9f16a by Michael Palimaka, on behalf of Eugene Shalygin.
Committed on 17/03/2013 at 17:56.
Pushed by palimaka into branch 'master'.

Fix crash when moving stream across devices.

REVIEW: 109293

M  +2    -2    gui/mdwslider.cpp

http://commits.kde.org/kmix/3ea6fbcad8c205f828f3c626f4d50d4938e9f16a
Comment 38 Michael Palimaka 2013-03-17 17:09:20 UTC
Git commit 39f51ac87536459966c87050f66c3913fed654d8 by Michael Palimaka, on behalf of Eugene Shalygin.
Committed on 17/03/2013 at 17:56.
Pushed by palimaka into branch 'KDE/4.10'.

Fix crash when moving stream across devices.

REVIEW: 109293

M  +2    -2    gui/mdwslider.cpp

http://commits.kde.org/kmix/39f51ac87536459966c87050f66c3913fed654d8
Comment 39 Rex Dieter 2013-03-18 17:25:18 UTC
*** Bug 316980 has been marked as a duplicate of this bug. ***
Comment 40 Jekyll Wu 2013-03-19 14:52:35 UTC
*** Bug 317030 has been marked as a duplicate of this bug. ***
Comment 41 Jekyll Wu 2013-03-19 14:52:37 UTC
*** Bug 315999 has been marked as a duplicate of this bug. ***
Comment 42 rudepeople 2013-03-24 20:35:45 UTC
Created attachment 78352 [details]
New crash information added by DrKonqi

kmix (4.3) on KDE Platform 4.10.00 "release 1" using Qt 4.8.4

- What I was doing when the application crashed:
same as noted in general bug, I was trying to move the audio stream (amarok) from the default device to a bluetooth headset. Kmix crashes every time I try to perform this action.

-- Backtrace (Reduced):
#7  0x00007fbd9033aaed in operator= (p=0x0, this=0x26ad880) at ../../src/corelib/kernel/qpointer.h:68
#8  QMenuPrivate::activateAction (this=0x26ad5c0, action=0x27a1b60, action_e=QAction::Trigger, self=true) at widgets/qmenu.cpp:1143
#9  0x00007fbd91d70e70 in KMenu::mouseReleaseEvent (this=0x272ced0, e=0x7ffffe2f8400) at /usr/src/debug/kdelibs-4.10.0/kdeui/widgets/kmenu.cpp:464
#10 0x00007fbd8ff50149 in QWidget::event (this=0x272ced0, event=0x7ffffe2f8400) at kernel/qwidget.cpp:8375
#11 0x00007fbd9033bd7b in QMenu::event (this=0x272ced0, e=0x7ffffe2f8400) at widgets/qmenu.cpp:2481