Bug 292219

Summary: KMix crashed when plugging in USB audio device
Product: [Applications] kmix Reporter: David Clark <veedgo>
Component: generalAssignee: Christian Esken <esken>
Status: RESOLVED WORKSFORME    
Severity: crash CC: 4ernov, anders, danni.coy, dis-1980, edg72, giri, johnoshaugh, matwey.kornilov, mles, psychic, russ, unclemarcus91, veedgo, wnc7prog
Priority: NOR    
Version First Reported In: 3.9   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: New crash information added by DrKonqi
Crash reproduced with LogiLink USB device

Description David Clark 2012-01-22 20:06:28 UTC
Application: kmix (3.9)
KDE Platform Version: 4.7.4 (4.7.4) (Compiled from sources)
Qt Version: 4.8.0
Operating System: Linux 3.1.9-1.fc16.x86_64 x86_64
Distribution (Platform): Fedora RPMs

-- Information about the crash:
- What I was doing when the application crashed: KMix crashed when I hotplugged plugged in my Tascam US-800. qjackctl hasn't been working either and I've been trying various ideas to try to get it to work.

-- Backtrace:
Application: KMix (kmix), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
82	T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
[Current thread is 1 (Thread 0x7fa7e9e46840 (LWP 1572))]

Thread 2 (Thread 0x7fa7d5734700 (LWP 1593)):
#0  0x00000039c04e6af3 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x0000003db6e44fd8 in g_main_context_poll (n_fds=1, fds=0x7fa7d0002470, priority=<optimized out>, timeout=-1, context=0x7fa7d0000a50) at gmain.c:3402
#2  g_main_context_iterate (context=0x7fa7d0000a50, block=<optimized out>, dispatch=1, self=<optimized out>) at gmain.c:3084
#3  0x0000003db6e4549c in g_main_context_iteration (context=0x7fa7d0000a50, may_block=1) at gmain.c:3152
#4  0x0000003db8fa7db6 in QEventDispatcherGlib::processEvents (this=0x7fa7d0000970, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:426
#5  0x0000003db8f78172 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#6  0x0000003db8f783c7 in QEventLoop::exec (this=0x7fa7d5733d10, flags=...) at kernel/qeventloop.cpp:204
#7  0x0000003db8e78b27 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#8  0x0000003db8f57e6f in QInotifyFileSystemWatcherEngine::run (this=0x18cc1d0) at io/qfilesystemwatcher_inotify.cpp:248
#9  0x0000003db8e7bb6b in QThreadPrivate::start (arg=0x18cc1d0) at thread/qthread_unix.cpp:298
#10 0x00000039c0807d90 in start_thread (arg=0x7fa7d5734700) at pthread_create.c:309
#11 0x00000039c04ef48d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 1 (Thread 0x7fa7e9e46840 (LWP 1572)):
[KCrash Handler]
#6  0x0000003dc122d9ce in KMixWindow::recreateGUI (this=0x195abc0, saveConfig=<optimized out>, mixerId=..., forceNewTab=true) at /usr/src/debug/kdemultimedia-4.7.4/kmix/apps/kmix.cpp:581
#7  0x0000003dc122eb56 in KMixWindow::plugged (this=0x195abc0, driverName=<optimized out>, udi=<optimized out>, dev=...) at /usr/src/debug/kdemultimedia-4.7.4/kmix/apps/kmix.cpp:779
#8  0x0000003db8f8ccd1 in QMetaObject::activate (sender=0x1ac6fd0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff55d66be0) at kernel/qobject.cpp:3547
#9  0x0000003dc124dd99 in KMixDeviceManager::plugged (this=<optimized out>, _t1=0x3dc126a0b5 "ALSA", _t2=<optimized out>, _t3=<optimized out>) at /usr/src/debug/kdemultimedia-4.7.4/x86_64-redhat-linux-gnu/kmix/kmixdevicemanager.moc:109
#10 0x0000003dc124e3bd in KMixDeviceManager::pluggedSlot (this=0x1ac6fd0, udi=...) at /usr/src/debug/kdemultimedia-4.7.4/kmix/core/kmixdevicemanager.cpp:134
#11 0x0000003db8f8ccd1 in QMetaObject::activate (sender=0x1ad86b0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff55d66ee0) at kernel/qobject.cpp:3547
#12 0x0000003dbd438a92 in Solid::DeviceNotifier::deviceAdded (this=<optimized out>, _t1=<optimized out>) at /usr/src/debug/kdelibs-4.7.4/x86_64-redhat-linux-gnu/solid/solid/devicenotifier.moc:101
#13 0x0000003dbd4397ac in Solid::DeviceManagerPrivate::_k_deviceAdded (this=0x1ad86b0, udi=...) at /usr/src/debug/kdelibs-4.7.4/solid/solid/devicemanager.cpp:189
#14 0x0000003db8f8ccd1 in QMetaObject::activate (sender=0x1afe080, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff55d670d0) at kernel/qobject.cpp:3547
#15 0x0000003dbd44ce72 in Solid::Ifaces::DeviceManager::deviceAdded (this=<optimized out>, _t1=<optimized out>) at /usr/src/debug/kdelibs-4.7.4/x86_64-redhat-linux-gnu/solid/solid/ifaces/devicemanager.moc:101
#16 0x0000003dbd46d514 in Solid::Backends::UDev::UDevManager::slotDeviceAdded (this=0x1afe080, device=...) at /usr/src/debug/kdelibs-4.7.4/solid/solid/backends/udev/udevmanager.cpp:201
#17 0x0000003db8f8ccd1 in QMetaObject::activate (sender=0x1ad87b0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff55d67260) at kernel/qobject.cpp:3547
#18 0x0000003dbd4755d2 in UdevQt::Client::deviceAdded (this=<optimized out>, _t1=<optimized out>) at /usr/src/debug/kdelibs-4.7.4/x86_64-redhat-linux-gnu/solid/solid/udevqt.moc:146
#19 0x0000003dbd475730 in UdevQt::ClientPrivate::_uq_monitorReadyRead (this=0x1afe8a0, fd=<optimized out>) at /usr/src/debug/kdelibs-4.7.4/solid/solid/backends/shared/udevqtclient.cpp:105
#20 0x0000003db8f8ccd1 in QMetaObject::activate (sender=0x1afea90, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff55d673f0) at kernel/qobject.cpp:3547
#21 0x0000003db8fd981e in QSocketNotifier::activated (this=<optimized out>, _t1=12) at .moc/release-shared/moc_qsocketnotifier.cpp:103
#22 0x0000003db8f9607b in QSocketNotifier::event (this=0x1afea90, e=0x7fff55d67a60) at kernel/qsocketnotifier.cpp:317
#23 0x0000003dba7c9994 in notify_helper (e=0x7fff55d67a60, receiver=0x1afea90, this=0x17fe610) at kernel/qapplication.cpp:4550
#24 QApplicationPrivate::notify_helper (this=0x17fe610, receiver=0x1afea90, e=0x7fff55d67a60) at kernel/qapplication.cpp:4522
#25 0x0000003dba7ce813 in QApplication::notify (this=0x17e6a10, receiver=0x1afea90, e=0x7fff55d67a60) at kernel/qapplication.cpp:4411
#26 0x0000003dbca50766 in KApplication::notify (this=0x17e6a10, receiver=0x1afea90, event=0x7fff55d67a60) at /usr/src/debug/kdelibs-4.7.4/kdeui/kernel/kapplication.cpp:311
#27 0x0000003db8f7903c in QCoreApplication::notifyInternal (this=0x17e6a10, receiver=0x1afea90, event=0x7fff55d67a60) at kernel/qcoreapplication.cpp:876
#28 0x0000003db8fa73a7 in sendEvent (event=0x7fff55d67a60, receiver=<optimized out>) at kernel/qcoreapplication.h:231
#29 socketNotifierSourceDispatch (source=0x1803280) at kernel/qeventdispatcher_glib.cpp:110
#30 0x0000003db6e44acd in g_main_dispatch (context=0x1802b10) at gmain.c:2441
#31 g_main_context_dispatch (context=0x1802b10) at gmain.c:3011
#32 0x0000003db6e452c8 in g_main_context_iterate (context=0x1802b10, block=<optimized out>, dispatch=1, self=<optimized out>) at gmain.c:3089
#33 0x0000003db6e4549c in g_main_context_iteration (context=0x1802b10, may_block=1) at gmain.c:3152
#34 0x0000003db8fa7d4f in QEventDispatcherGlib::processEvents (this=0x17c63f0, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#35 0x0000003dba86c61e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=<optimized out>) at kernel/qguieventdispatcher_glib.cpp:207
#36 0x0000003db8f78172 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#37 0x0000003db8f783c7 in QEventLoop::exec (this=0x7fff55d67ca0, flags=...) at kernel/qeventloop.cpp:204
#38 0x0000003db8f7cdc5 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1148
#39 0x0000003dc12283f2 in kdemain (argc=3, argv=0x7fff55d68228) at /usr/src/debug/kdemultimedia-4.7.4/kmix/apps/main.cpp:73
#40 0x00000039c042169d in __libc_start_main (main=0x400730 <main(int, char**)>, argc=3, ubp_av=0x7fff55d68228, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff55d68218) at libc-start.c:226
#41 0x0000000000400761 in _start ()

This bug may be a duplicate of or related to bug 273758.

Possible duplicates by query: bug 273758.

Reported using DrKonqi
Comment 1 David Clark 2012-02-22 02:30:11 UTC
Created attachment 68995 [details]
New crash information added by DrKonqi

kmix (3.9) on KDE Platform 4.7.4 (4.7.4) using Qt 4.8.0

- What I was doing when the application crashed: I unplugged my Tascam US-800 USB mixer and plugged it back in. When the USB light lit up, the crash occurred.

-- Backtrace (Reduced):
#6  0x000000309782d9ce in KMixWindow::recreateGUI (this=0x8fbc70, saveConfig=<optimized out>, mixerId=..., forceNewTab=true) at /usr/src/debug/kdemultimedia-4.7.4/kmix/apps/kmix.cpp:581
#7  0x000000309782eb56 in KMixWindow::plugged (this=0x8fbc70, driverName=<optimized out>, udi=<optimized out>, dev=...) at /usr/src/debug/kdemultimedia-4.7.4/kmix/apps/kmix.cpp:779
[...]
#9  0x000000309784dd99 in KMixDeviceManager::plugged (this=<optimized out>, _t1=0x309786a0b5 "ALSA", _t2=<optimized out>, _t3=<optimized out>) at /usr/src/debug/kdemultimedia-4.7.4/x86_64-redhat-linux-gnu/kmix/kmixdevicemanager.moc:109
#10 0x000000309784e3bd in KMixDeviceManager::pluggedSlot (this=0xa6a380, udi=...) at /usr/src/debug/kdemultimedia-4.7.4/kmix/core/kmixdevicemanager.cpp:134
[...]
#12 0x0000003094238a92 in Solid::DeviceNotifier::deviceAdded (this=<optimized out>, _t1=<optimized out>) at /usr/src/debug/kdelibs-4.7.4/x86_64-redhat-linux-gnu/solid/solid/devicenotifier.moc:101
Comment 2 Jekyll Wu 2012-03-27 16:13:31 UTC
*** Bug 294120 has been marked as a duplicate of this bug. ***
Comment 3 Christian Esken 2012-03-27 21:56:40 UTC
I am merging all bug reports that have a backtrace that indicates access to a dead/destroyed MixDevice to Bug 290742
I would like to explicitly state that this bug report is different as far as I can see. There is possibly not a reference do a dead MixDevice, but to a dead Mixer. This doesn't make to much sense while plugging but only for unplugging. In any case, I will in future do shared pointer code also to "Mixer" instances, if the solution for MixDevice in Bug 290742 proves reliable.
Comment 4 Danni Coy 2012-05-05 01:29:23 UTC
Getting similar behaviour (I am on Kubuntu 12.04) and I get this behaviour. I have two usb devices. My Native Instruments Komplete Audio 6 does not trigger a crash but my Novation 61SL MkII does. The second is a keyboard but has no audio devices, just midi, this might be the cause of the problem.
Comment 5 Christian Esken 2012-07-03 20:32:34 UTC
*** Bug 287404 has been marked as a duplicate of this bug. ***
Comment 6 Christian Esken 2012-08-04 20:26:14 UTC
*** Bug 287626 has been marked as a duplicate of this bug. ***
Comment 7 Christian Esken 2012-08-04 20:27:50 UTC
*** Bug 303522 has been marked as a duplicate of this bug. ***
Comment 8 Christian Esken 2012-08-04 20:28:11 UTC
*** Bug 303326 has been marked as a duplicate of this bug. ***
Comment 9 Christian Esken 2012-08-04 20:28:39 UTC
*** Bug 301582 has been marked as a duplicate of this bug. ***
Comment 10 Christian Esken 2012-08-04 20:30:06 UTC
*** Bug 304535 has been marked as a duplicate of this bug. ***
Comment 11 Christian Esken 2012-08-23 07:06:43 UTC
Created attachment 73409 [details]
Crash reproduced with LogiLink USB device

Required about 40 plug-unplug operations.
Comment 12 Christian Esken 2012-09-21 16:59:12 UTC
Git commit 35390030a6d1a2f67f990c2ed00223d129154039 by Christian Esken.
Committed on 21/09/2012 at 18:56.
Pushed by esken into branch 'master'.

Fix crash on hotplug of soundcard. Related to 292219, but does not fix it.

M  +0    -4    backends/kmix-backends.cpp
M  +12   -7    core/mixer.cpp
M  +1    -1    core/mixer.h

http://commits.kde.org/kmix/35390030a6d1a2f67f990c2ed00223d129154039
Comment 13 Jekyll Wu 2013-11-06 10:04:14 UTC
*** Bug 324352 has been marked as a duplicate of this bug. ***
Comment 14 Christian Esken 2014-01-05 19:24:58 UTC
Update: I just recognized that the patch from 2012-09-21 might have fixed  Danni Coy's issue.

Current status: Currently I can not reproduce the issue (plugging two devices more than 100 times), but this might be coincidence as I did not yet add proper shared_ptr guarding.
Comment 15 Dennis 2014-06-10 07:36:16 UTC
Crash reproduced with Fiio X3 USB DAC
Comment 16 Christian Esken 2014-08-11 10:23:10 UTC
Dennis, please add stacktrace  / crash information like the old ones attached to this bug report.
Comment 17 Christoph Feck 2014-12-21 00:12:16 UTC
*** Bug 342064 has been marked as a duplicate of this bug. ***
Comment 18 Justin Zobel 2020-12-17 05:21:33 UTC
Thank you for the crash report.

As it has been a while since this was reported, can you please test and confirm if this issue is still occurring or if this bug report can be marked as resolved.

I have set the bug status to "needsinfo" pending your response, please change back to "reported" or "resolved/worksforme" when you respond, thank you.
Comment 19 Bug Janitor Service 2021-01-01 04:34:39 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 20 Bug Janitor Service 2021-01-16 04:34:01 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!