Bug 240394 - crash first time running kmid, after confirming changes to "Configure Kmid"
Summary: crash first time running kmid, after confirming changes to "Configure Kmid"
Status: RESOLVED FIXED
Alias: None
Product: kmid
Classification: Miscellaneous
Component: general (show other bugs)
Version: 2.3.0
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: Unknown
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-01 22:30 UTC by Niels Mayer
Modified: 2010-06-09 20:56 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Niels Mayer 2010-06-01 22:30:28 UTC
Application: kmid (2.3.0)
KDE Platform Version: 4.4.3 (KDE 4.4.3)
Qt Version: 4.6.2
Operating System: Linux 2.6.32.12-115.fc12.x86_64 x86_64
Distribution: "Fedora release 12 (Constantine)"

-- Information about the crash:
First time after installing kmid on a new computer. I set 
"Settings->Configure Kmid->MIDI->Reset Mode" to "Yamaha XG" for my Yamaha db60xg (NEC XR-385) waveblaster card and clicked "Ok" and got the crash. It seems like once this crash happens, you can do the operation over again successfully without crashing. Therefore, this seems to be caused on the fist run/install of the program....

The following output on console from two different crashes.
coggie-81-.../Music/MIDI> kmid
kmid(19241)/kdeui (kdelibs): Attempt to use QAction "show_volume_pitch" with KXMLGUIFactory! 
kmid(19241)/kdeui (kdelibs): Attempt to use QAction "show_position" with KXMLGUIFactory! 
kmid(19241)/kdeui (kdelibs): Attempt to use QAction "show_codecs" with KXMLGUIFactory! 
kmid(19241)/kdeui (kdelibs): Attempt to use QAction "show_rhythm" with KXMLGUIFactory! 
kmid(19241)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
kmid(19241)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
kdeinit4: preparing to launch /usr/lib64/kde4/kio_trash.so
kmid(19241)/kdecore (services) KMimeTypeFactory::parseMagic: Now parsing  "/usr/share/mime/magic"
kmid(19241)/kdecore (services) KMimeTypeFactory::parseMagic: Now parsing  "/home/npm/.local/share/mime/magic"
kmid(19241)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
kDebugStream called after destruction (from void KDirWatchPrivate::removeEntry(KDirWatch*, KDirWatchPrivate::Entry*, KDirWatchPrivate::Entry*) file /builddir/build/BUILD/kdelibs-4.4.3/kio/kio/kdirwatch.cpp line 950)
Cancelled INotify (fd 10, 1) for "/home/npm/.local/share//user-places.xbel"
coggie-82-.../Music/MIDI> kdeinit4: preparing to launch /usr/bin/knotify4
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
knotify(20226) KNotify::event: 1  ref= 0

[1]  + Suspended (signal)            kmid
coggie-82-.../Music/MIDI> kdeinit4: preparing to launch /usr/lib64/libkdeinit4_kwalletd.so
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
kdeinit4: preparing to launch /usr/lib64/kde4/kio_http.so
kdeinit4: preparing to launch /usr/lib64/kde4/kio_http.so
kded(18893)/kdecore (KLibrary) kde4Factory: The library "/usr/lib64/kde4/solid_networkmanager07.so" does not offer a qt_plugin_instance function.



 -- Backtrace:
Application: KMid (kmid), signal: Segmentation fault
82	T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
[Current thread is 1 (Thread 0x7f70b895b840 (LWP 18887))]

Thread 2 (Thread 0x7f70acfba710 (LWP 18896)):
#0  0x00000032a96d5193 in __poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=<value optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f70acfe1665 in drumstick::MidiClient::SequencerInputThread::run (this=0x1b8f9a0) at /usr/src/debug/drumstick-0.3.1/library/src/alsaclient.cpp:1734
#2  0x0000003be7c709a5 in QThreadPrivate::start (arg=0x1b8f9a0) at thread/qthread_unix.cpp:248
#3  0x00000032aa206a3a in start_thread (arg=0x7f70acfba710) at pthread_create.c:297
#4  0x00000032a96de62d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#5  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f70b895b840 (LWP 18887)):
[KCrash Handler]
#5  0x0000003fe1c2a982 in show (this=0x17a0090) at ../../src/gui/kernel/qwidget.h:485
#6  QDialog::exec (this=0x17a0090) at dialogs/qdialog.cpp:537
#7  0x000000000042823a in KMid2::chooseInitialConnection (this=<value optimized out>, items=<value optimized out>) at /usr/src/debug/kmid-2.3.0/src/kmid2.cpp:1007
#8  0x0000000000428489 in KMid2::slotCheckOutput (this=0x18b9bd0) at /usr/src/debug/kmid-2.3.0/src/kmid2.cpp:1035
#9  0x0000000000428a5a in KMid2::connectMidiOutput (this=0x18b9bd0) at /usr/src/debug/kmid-2.3.0/src/kmid2.cpp:1448
#10 0x0000000000428dc4 in KMid2::slotApplySettings (this=0x18b9bd0, name=<value optimized out>) at /usr/src/debug/kmid-2.3.0/src/kmid2.cpp:772
#11 0x000000000042d463 in KMid2::qt_metacall (this=0x18b9bd0, _c=InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffaf4e7680) at /usr/src/debug/kmid-2.3.0/x86_64-redhat-linux-gnu/src/kmid2.moc:189
#12 0x0000003be7d6a2af in QMetaObject::activate (sender=0x2fcb410, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x7fffaf4e7680) at kernel/qobject.cpp:3293
#13 0x000000394b776265 in KConfigDialog::settingsChanged (this=<value optimized out>, _t1=...) at /usr/src/debug/kdelibs-4.4.3/x86_64-redhat-linux-gnu/kdeui/kconfigdialog.moc:116
#14 0x000000394b7777cc in KConfigDialog::KConfigDialogPrivate::_k_settingsChangedSlot (this=0x1c55f00) at /usr/src/debug/kdelibs-4.4.3/kdeui/dialogs/kconfigdialog.cpp:243
#15 0x000000394b777c7d in KConfigDialog::qt_metacall (this=0x2fcb410, _c=InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffaf4e7790)
    at /usr/src/debug/kdelibs-4.4.3/x86_64-redhat-linux-gnu/kdeui/kconfigdialog.moc:98
#16 0x0000003be7d6a2af in QMetaObject::activate (sender=0x1ee1b00, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x0) at kernel/qobject.cpp:3293
#17 0x000000394b779a46 in KConfigDialogManager::updateSettings (this=0x1ee1b00) at /usr/src/debug/kdelibs-4.4.3/kdeui/dialogs/kconfigdialogmanager.cpp:393
#18 0x000000394b77a424 in KConfigDialogManager::qt_metacall (this=0x1ee1b00, _c=InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffaf4e7990)
    at /usr/src/debug/kdelibs-4.4.3/x86_64-redhat-linux-gnu/kdeui/kconfigdialogmanager.moc:85
#19 0x0000003be7d6a2af in QMetaObject::activate (sender=0x2fcb410, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x0) at kernel/qobject.cpp:3293
#20 0x000000394b786b98 in KDialog::slotButtonClicked (this=0x2fcb410, button=4) at /usr/src/debug/kdelibs-4.4.3/kdeui/dialogs/kdialog.cpp:862
#21 0x000000394b788482 in KDialog::qt_metacall (this=0x2fcb410, _c=InvokeMetaMethod, _id=33, _a=0x7fffaf4e7ba0) at /usr/src/debug/kdelibs-4.4.3/x86_64-redhat-linux-gnu/kdeui/kdialog.moc:190
#22 0x000000394b83a320 in KPageDialog::qt_metacall (this=0x2fcb410, _c=InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffaf4e7ba0)
    at /usr/src/debug/kdelibs-4.4.3/x86_64-redhat-linux-gnu/kdeui/kpagedialog.moc:70
#23 0x000000394b777c50 in KConfigDialog::qt_metacall (this=0x2fcb410, _c=InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffaf4e7ba0)
    at /usr/src/debug/kdelibs-4.4.3/x86_64-redhat-linux-gnu/kdeui/kconfigdialog.moc:84
#24 0x0000003be7d6a2af in QMetaObject::activate (sender=0x3013c88, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x7fffaf4e7ba0) at kernel/qobject.cpp:3293
#25 0x0000003be7d6d92e in QSignalMapper::mapped (this=<value optimized out>, _t1=4) at .moc/release-shared/moc_qsignalmapper.cpp:101
#26 0x0000003be7d6d9d0 in QSignalMapper::map (this=0x3013c88, sender=0x3ce2ed0) at kernel/qsignalmapper.cpp:266
#27 0x0000003be7d6eca0 in QSignalMapper::qt_metacall (this=0x3013c88, _c=InvokeMetaMethod, _id=4, _a=0x7fffaf4e7d30) at .moc/release-shared/moc_qsignalmapper.cpp:87
#28 0x0000003be7d6a2af in QMetaObject::activate (sender=0x3ce2ed0, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x7fffaf4e7d30) at kernel/qobject.cpp:3293
#29 0x0000003fe1dde252 in QAbstractButton::clicked (this=<value optimized out>, _t1=false) at .moc/release-shared/moc_qabstractbutton.cpp:206
#30 0x0000003fe1b2eb0b in QAbstractButtonPrivate::emitClicked (this=0x33a3030) at widgets/qabstractbutton.cpp:546
#31 0x0000003fe1b2fd7b in QAbstractButtonPrivate::click (this=0x33a3030) at widgets/qabstractbutton.cpp:539
#32 0x0000003fe1b2ffec in QAbstractButton::mouseReleaseEvent (this=0x3ce2ed0, e=0x7fffaf4e8680) at widgets/qabstractbutton.cpp:1121
#33 0x0000003fe17f5b3a in QWidget::event (this=0x3ce2ed0, event=0x7fffaf4e8680) at kernel/qwidget.cpp:7998
#34 0x0000003fe17aa9dc in QApplicationPrivate::notify_helper (this=0x1755540, receiver=0x3ce2ed0, e=0x7fffaf4e8680) at kernel/qapplication.cpp:4300
#35 0x0000003fe17b127d in QApplication::notify (this=<value optimized out>, receiver=0x3ce2ed0, e=0x7fffaf4e8680) at kernel/qapplication.cpp:3865
#36 0x000000394b806856 in KApplication::notify (this=0x7fffaf4e9370, receiver=0x3ce2ed0, event=0x7fffaf4e8680) at /usr/src/debug/kdelibs-4.4.3/kdeui/kernel/kapplication.cpp:302
#37 0x0000003be7d5774c in QCoreApplication::notifyInternal (this=0x7fffaf4e9370, receiver=0x3ce2ed0, event=0x7fffaf4e8680) at kernel/qcoreapplication.cpp:704
#38 0x0000003fe17b046e in sendEvent (receiver=0x3ce2ed0, event=0x7fffaf4e8680, alienWidget=0x3ce2ed0, nativeWidget=0x2fcb410, buttonDown=<value optimized out>, 
    lastMouseReceiver=<value optimized out>, spontaneous=true) at ../../src/corelib/kernel/qcoreapplication.h:215
#39 QApplicationPrivate::sendMouseEvent (receiver=0x3ce2ed0, event=0x7fffaf4e8680, alienWidget=0x3ce2ed0, nativeWidget=0x2fcb410, buttonDown=<value optimized out>, 
    lastMouseReceiver=<value optimized out>, spontaneous=true) at kernel/qapplication.cpp:2965
#40 0x0000003fe1822405 in QETWidget::translateMouseEvent (this=0x2fcb410, event=<value optimized out>) at kernel/qapplication_x11.cpp:4373
#41 0x0000003fe1821128 in QApplication::x11ProcessEvent (this=<value optimized out>, event=0x7fffaf4e8fa0) at kernel/qapplication_x11.cpp:3506
#42 0x0000003fe1849d82 in x11EventSourceDispatch (s=0x1759290, callback=<value optimized out>, user_data=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:146
#43 0x00000032aae3923e in g_main_dispatch (context=0x1758120) at gmain.c:1960
#44 IA__g_main_context_dispatch (context=0x1758120) at gmain.c:2513
#45 0x00000032aae3cc28 in g_main_context_iterate (context=0x1758120, block=<value optimized out>, dispatch=<value optimized out>, self=<value optimized out>) at gmain.c:2591
#46 0x00000032aae3cd4a in IA__g_main_context_iteration (context=0x1758120, may_block=1) at gmain.c:2654
#47 0x0000003be7d7d0b6 in QEventDispatcherGlib::processEvents (this=0x173ec60, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:414
#48 0x0000003fe1849a4e in QGuiEventDispatcherGlib::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#49 0x0000003be7d56192 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#50 0x0000003be7d5645c in QEventLoop::exec (this=0x7fffaf4e92d0, flags=...) at kernel/qeventloop.cpp:201
#51 0x0000003be7d58749 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981
#52 0x000000000042ff44 in main (argc=<value optimized out>, argv=<value optimized out>) at /usr/src/debug/kmid-2.3.0/src/main.cpp:63

Reported using DrKonqi
Comment 1 Unknown 2010-06-02 08:21:07 UTC
Confirmed. I'm working on this.

I can reproduce this issue, with conditions:
* There is no ~/.kde4/share/config/kmidrc configuration file. Removing this file the crash can be reproduced consistently.
* There is only one MIDI output port available in the system. For instance, if drumstick-vpiano is started before kmid, the crash doesn't happen.
Comment 2 Unknown 2010-06-02 08:42:52 UTC
By the way, this does not depend on the "Reset mode" setting, or any other option in the Configuration dialog. For instance, changing the lyrics font size and pressing OK -> crash.
Comment 3 Niels Mayer 2010-06-02 17:57:20 UTC
w/r/t/ the statement: "There is only one MIDI output port available in the system" ... this is not consistent with what I'm seeing, where I have many available MIDI ports, e.g.: on the machine that produced the crashdumps:

port created: Midi-Through:midi/capture_1
port created: MT4:midi/playback_1
port created: MT4:midi/capture_1
port created: MT4:midi/playback_2
port created: MT4:midi/capture_2
port created: MT4:midi/playback_3
port created: MT4:midi/capture_3
port created: MT4:midi/capture_4
port created: MT4:midi/capture_5
port created: BCD3000:midi/playback_1
port created: BCD3000:midi/capture_1
port created: UM-2:midi/playback_1
port created: UM-2:midi/capture_1
port created: UM-2:midi/playback_2
port created: UM-2:midi/capture_2
port created: QMidiRoute:midi/capture_1
port created: QMidiRoute:midi/playback_2
port created: QMidiRoute:midi/playback_3
port created: QXGEdit:midi/playback_1
port created: QXGEdit:midi/capture_1
port created: QmidiNet:midi/playback_1
port created: QmidiNet:midi/capture_1
port created: QmidiNet:midi/playback_2
port created: QmidiNet:midi/capture_2

And on a different machine that has same behavior:

port created: Midi-Through:midi/capture_1
port created: MT4:midi/playback_1
port created: MT4:midi/capture_1
port created: MT4:midi/playback_2
port created: MT4:midi/capture_2
port created: MT4:midi/playback_3
port created: MT4:midi/capture_3
port created: MT4:midi/capture_4
port created: MT4:midi/capture_5
port created: LPK25:midi/playback_1
port created: LPK25:midi/capture_1
port created: DJ-Console-(WE):midi/playback_1
port created: DJ-Console-(WE):midi/capture_1
port created: ICEnsemble-ICE1724:midi/playback_1
port created: ICEnsemble-ICE1724:midi/capture_1
port created: QmidiNet:midi/playback_1
port created: QmidiNet:midi/capture_1
port created: QmidiNet:midi/playback_2
port created: QmidiNet:midi/capture_2
Comment 4 Unknown 2010-06-03 14:52:46 UTC
I don't recognize your port list format. Maybe you are using jack-midi or something like that? I didn't test kmid using jack midi.

Anyway, to reproduce the crash is not necessary to uninstall and reinstall kmid. It should be enough renaming or deleting the file named 'kmidrc' in ~/.kde4/share/config

About the realtime settings. To perform the test without realtime priority enabled, you only need to edit your /etc/security/limits.conf file, leading the 'rtprio' line with a character '#' (comment), and restarting the session (logout/login).
Comment 5 Unknown 2010-06-03 15:14:25 UTC
SVN commit 1134129 by pedrol:

ALSA backend. Removed a call to ALSAMIDIOutput::reloadDeviceList() from the  MIDI event handling thread, because this method is not thread safe and it is not needed since 2.3.0 anyway. This fixes an ugly crash.
BUG: 240394

 M  +1 -1      CMakeLists.txt  
 M  +2 -4      alsa/alsamidiobject.cpp  
 M  +0 -3      alsa/alsamidioutput.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1134129
Comment 6 Niels Mayer 2010-06-03 16:02:29 UTC
The  list of midi devices is from qjackctl's output... they're all ALSA midi devices. They are not jack midi devices nor do I use Jack midi very much, and certainly not with kmid.