Bug 179763 - Crash in KShortcutsEditor (probably related to conflicting shortcuts)
Summary: Crash in KShortcutsEditor (probably related to conflicting shortcuts)
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: kdeui (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
: 192031 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-01-05 23:08 UTC by David Nadlinger
Modified: 2010-10-13 17:24 UTC (History)
4 users (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 David Nadlinger 2009-01-05 23:08:36 UTC
Version:           SVN trunk (r905610) (using Devel)
Compiler:          gcc version 4.3.2 (Ubuntu 4.3.2-1ubuntu11) 
OS:                Linux
Installed from:    Compiled sources

In the default key mapping of the SVN version of Kile, there are some ambiguous actions.

I opened the shortcuts editor and selected the one of the conflicting shortcuts (Kate Part/Invoke Code Completion). When I selected the second one (Kile/LaTeX Command), the first one was not properly deselected (the name was still rendered bold). A click on the first entry resulted in a crash (backtrace below).

This is 100% reproducible.

Although two conflicting shortcuts are no valid state, the application probably should not crash. There is a comment in kshortcutseditor.h reading »KShortcutsEditor expects that the list of existing shortcuts is already free of conflicts. If it is not, nothing will crash, but your users won't like the resulting behavior.«

---

The backtrace (the questionable line in kshortcutseditordelegate.cpp Q_ASSERTs oldItem, which is set to KShortcutsEditorPrivate::itemFromIndex(view, idx)):

Thread 2 (Thread 0xb360ab90 (LWP 11040)):
#0  0xb7f39430 in __kernel_vsyscall ()
#1  0xb5f0ac01 in select () from /lib/tls/i686/cmov/libc.so.6
#2  0xb6a69fd3 in QProcessManager::run (this=0x91503b0) at io/qprocess_unix.cpp:301
#3  0xb69967cd in QThreadPrivate::start (arg=0x91503b0) at thread/qthread_unix.cpp:185
#4  0xb690f50f in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#5  0xb5f127ee in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 1 (Thread 0xb56f66c0 (LWP 11037)):
[KCrash Handler]
#6  0xb7f39430 in __kernel_vsyscall ()
#7  0xb5e5c880 in raise () from /lib/tls/i686/cmov/libc.so.6
#8  0xb5e5e248 in abort () from /lib/tls/i686/cmov/libc.so.6
#9  0xb698ca3b in qt_message_output (msgType=QtFatalMsg, buf=0xbfc35b20 "ASSERT: \"oldItem\" in file /media/build/src/KDE/kdelibs/kdeui/dialogs/kshortcutseditordelegate.cpp, line 155")
    at global/qglobal.cpp:2102
#10 0xb698cabf in qFatal (msg=0xb6ad9d18 "ASSERT: \"%s\" in file %s, line %d") at global/qglobal.cpp:2303
#11 0xb698cef3 in qt_assert (assertion=0xb710e320 "oldItem", file=0xb710e2d8 "/media/build/src/KDE/kdelibs/kdeui/dialogs/kshortcutseditordelegate.cpp", line=155) at global/qglobal.cpp:1872
#12 0xb6f3f721 in KShortcutsEditorDelegate::itemActivated (this=0x9dc4728, index={r = -1077707660, c = 2, p = 0xbfc37d7c, m = 0x912d424})
    at /media/build/src/KDE/kdelibs/kdeui/dialogs/kshortcutseditordelegate.cpp:155
#13 0xb6f4ad70 in KShortcutsEditorDelegate::qt_metacall (this=0x9dc4728, _c=QMetaObject::InvokeMetaMethod, _id=2, _a=0xbfc37d7c) at /media/build/build/KDE/kdelibs/kdeui/kshortcutsdialog_p.moc:84
#14 0xb6a9b1d0 in QMetaObject::activate (sender=0x98def20, from_signal_index=32, to_signal_index=32, argv=0xbfc37d7c) at kernel/qobject.cpp:3028
#15 0xb6a9b65d in QMetaObject::activate (sender=0x98def20, m=0xb68f4ea4, local_signal_index=1, argv=0xbfc37d7c) at kernel/qobject.cpp:3101
#16 0xb66fbf20 in QAbstractItemView::clicked (this=0x98def20, _t1=@0x97c2a50) at .moc/debug-shared/moc_qabstractitemview.cpp:316
#17 0xb6701532 in QAbstractItemView::mouseReleaseEvent (this=0x98def20, event=0xbfc38748) at itemviews/qabstractitemview.cpp:1612
#18 0xb673c6c6 in QTreeView::mouseReleaseEvent (this=0x98def20, event=0xbfc38748) at itemviews/qtreeview.cpp:1772
#19 0xb62620ea in QWidget::event (this=0x98def20, event=0xbfc38748) at kernel/qwidget.cpp:7163
#20 0xb65ce9fe in QFrame::event (this=0x98def20, e=0xbfc38748) at widgets/qframe.cpp:651
#21 0xb6663ef9 in QAbstractScrollArea::viewportEvent (this=0x98def20, e=0xbfc38748) at widgets/qabstractscrollarea.cpp:943
#22 0xb67050c0 in QAbstractItemView::viewportEvent (this=0x98def20, event=0xbfc38748) at itemviews/qabstractitemview.cpp:1429
#23 0xb673f8b9 in QTreeView::viewportEvent (this=0x98def20, event=0xbfc38748) at itemviews/qtreeview.cpp:1265
#24 0xb66669e6 in QAbstractScrollAreaPrivate::viewportEvent (this=0x9db6fd8, event=0xbfc38748) at widgets/qabstractscrollarea_p.h:96
#25 0xb6666a14 in QAbstractScrollAreaFilter::eventFilter (this=0x9d746a0, o=0x98defb8, e=0xbfc38748) at widgets/qabstractscrollarea_p.h:107
#26 0xb6a84d1c in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=0x91450f0, receiver=0x98defb8, event=0xbfc38748) at kernel/qcoreapplication.cpp:694
#27 0xb62067a2 in QApplicationPrivate::notify_helper (this=0x91450f0, receiver=0x98defb8, e=0xbfc38748) at kernel/qapplication.cpp:3799
#28 0xb6207295 in QApplication::notify (this=0xbfc3a200, receiver=0x98defb8, e=0xbfc38748) at kernel/qapplication.cpp:3528
#29 0xb6fa91a1 in KApplication::notify (this=0xbfc3a200, receiver=0x98defb8, event=0xbfc38748) at /media/build/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:307
#30 0xb6a8693f in QCoreApplication::notifyInternal (this=0xbfc3a200, receiver=0x98defb8, event=0xbfc38748) at kernel/qcoreapplication.cpp:583
#31 0xb62125ff in QCoreApplication::sendSpontaneousEvent (receiver=0x98defb8, event=0xbfc38748) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:212
#32 0xb620b156 in QApplicationPrivate::sendMouseEvent (receiver=0x98defb8, event=0xbfc38748, alienWidget=0x98defb8, nativeWidget=0xbfc38fc8, buttonDown=0xb69079c0, lastMouseReceiver=@0xb69079c4)
    at kernel/qapplication.cpp:2793
#33 0xb6281bcb in QETWidget::translateMouseEvent (this=0xbfc38fc8, event=0xbfc38cec) at kernel/qapplication_x11.cpp:4044
#34 0xb6282ab9 in QApplication::x11ProcessEvent (this=0xbfc3a200, event=0xbfc38cec) at kernel/qapplication_x11.cpp:3040
#35 0xb62ad1f0 in x11EventSourceDispatch (s=0x9148018, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:142
#36 0xb59bc6f8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#37 0xb59bfda3 in ?? () from /usr/lib/libglib-2.0.so.0
#38 0xb59bff61 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#39 0xb6ab472a in QEventDispatcherGlib::processEvents (this=0x91451c0, flags={i = -1077703004}) at kernel/qeventdispatcher_glib.cpp:319
#40 0xb62ac9e8 in QGuiEventDispatcherGlib::processEvents (this=0x91451c0, flags={i = -1077702956}) at kernel/qguieventdispatcher_glib.cpp:198
#41 0xb6a8396c in QEventLoop::processEvents (this=0xbfc38f48, flags={i = -1077702892}) at kernel/qeventloop.cpp:143
#42 0xb6a83ba9 in QEventLoop::exec (this=0xbfc38f48, flags={i = -1077702828}) at kernel/qeventloop.cpp:190
#43 0xb66ae515 in QDialog::exec (this=0xbfc38fc8) at dialogs/qdialog.cpp:447
#44 0xb6f4afc7 in KShortcutsDialog::configure (this=0xbfc38fc8, saveSettings=false) at /media/build/src/KDE/kdelibs/kdeui/dialogs/kshortcutsdialog.cpp:150
#45 0x0810e0f2 in Kile::configureKeys (this=0xbfc3a200) at /media/build/src/kile/src/kile.cpp:2566
#46 0x08137c6b in Kile::qt_metacall (this=0xbfc3a200, _c=QMetaObject::InvokeMetaMethod, _id=39, _a=0xbfc3914c) at /media/build/build/kile/src/kile.moc:265
#47 0xb6a9b1d0 in QMetaObject::activate (sender=0x997e420, from_signal_index=5, to_signal_index=6, argv=0xbfc3914c) at kernel/qobject.cpp:3028
#48 0xb6a9b3e8 in QMetaObject::activate (sender=0x997e420, m=0xb68e9cf8, from_local_signal_index=1, to_local_signal_index=2, argv=0xbfc3914c) at kernel/qobject.cpp:3121
#49 0xb61fec96 in QAction::triggered (this=0x997e420, _t1=false) at .moc/debug-shared/moc_qaction.cpp:216
#50 0xb6200844 in QAction::activate (this=0x997e420, event=QAction::Trigger) at kernel/qaction.cpp:1125
#51 0xb6619cc1 in QMenuPrivate::activateAction (this=0x9a46338, action=0x997e420, action_e=QAction::Trigger, self=true) at widgets/qmenu.cpp:1002
#52 0xb661b7a5 in QMenu::mouseReleaseEvent (this=0x9a46178, e=0xbfc398f8) at widgets/qmenu.cpp:2169
#53 0xb7089dc6 in KMenu::mouseReleaseEvent (this=0x9a46178, e=0xbfc398f8) at /media/build/src/KDE/kdelibs/kdeui/widgets/kmenu.cpp:454
#54 0xb62620ea in QWidget::event (this=0x9a46178, event=0xbfc398f8) at kernel/qwidget.cpp:7163
#55 0xb66198ac in QMenu::event (this=0x9a46178, e=0xbfc398f8) at widgets/qmenu.cpp:2265
#56 0xb62067c5 in QApplicationPrivate::notify_helper (this=0x91450f0, receiver=0x9a46178, e=0xbfc398f8) at kernel/qapplication.cpp:3803
#57 0xb6207295 in QApplication::notify (this=0xbfc3a200, receiver=0x9a46178, e=0xbfc398f8) at kernel/qapplication.cpp:3528
#58 0xb6fa91a1 in KApplication::notify (this=0xbfc3a200, receiver=0x9a46178, event=0xbfc398f8) at /media/build/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:307
#59 0xb6a8693f in QCoreApplication::notifyInternal (this=0xbfc3a200, receiver=0x9a46178, event=0xbfc398f8) at kernel/qcoreapplication.cpp:583
#60 0xb62125ff in QCoreApplication::sendSpontaneousEvent (receiver=0x9a46178, event=0xbfc398f8) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:212
#61 0xb620b156 in QApplicationPrivate::sendMouseEvent (receiver=0x9a46178, event=0xbfc398f8, alienWidget=0x0, nativeWidget=0x9a46178, buttonDown=0xb69079c0, lastMouseReceiver=@0xb69079c4)
    at kernel/qapplication.cpp:2793
#62 0xb62818b5 in QETWidget::translateMouseEvent (this=0x9a46178, event=0xbfc39e9c) at kernel/qapplication_x11.cpp:3978
#63 0xb6282ab9 in QApplication::x11ProcessEvent (this=0xbfc3a200, event=0xbfc39e9c) at kernel/qapplication_x11.cpp:3040
#64 0xb62ad1f0 in x11EventSourceDispatch (s=0x9148018, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:142
#65 0xb59bc6f8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#66 0xb59bfda3 in ?? () from /usr/lib/libglib-2.0.so.0
#67 0xb59bff61 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#68 0xb6ab472a in QEventDispatcherGlib::processEvents (this=0x91451c0, flags={i = -1077698476}) at kernel/qeventdispatcher_glib.cpp:319
#69 0xb62ac9e8 in QGuiEventDispatcherGlib::processEvents (this=0x91451c0, flags={i = -1077698428}) at kernel/qguieventdispatcher_glib.cpp:198
#70 0xb6a8396c in QEventLoop::processEvents (this=0xbfc3a100, flags={i = -1077698364}) at kernel/qeventloop.cpp:143
#71 0xb6a83ba9 in QEventLoop::exec (this=0xbfc3a100, flags={i = -1077698296}) at kernel/qeventloop.cpp:190
#72 0xb6a8713b in QCoreApplication::exec () at kernel/qcoreapplication.cpp:845
#73 0xb62064de in QApplication::exec () at kernel/qapplication.cpp:3331
#74 0x08143bbd in main (argc=1, argv=0xbfc3a764) at /media/build/src/kile/src/main.cpp:115
Comment 1 Dario Andres 2009-05-25 19:44:19 UTC
I think I fixed this recently by commit : http://websvn.kde.org/?view=rev&revision=970308

Could you please update your build and try again ? 
Thanks
Comment 2 David Nadlinger 2009-05-26 09:32:11 UTC
Unfortunately, there is no easy way for me to test this any longer, since there are no ambiguous shortcuts in Kile any longer. But if you think you fixed the bug, go ahead and close this report, since this was not quite a common use case for KShortcutsEditor.
Comment 3 Thomas Braun 2009-05-26 11:48:13 UTC
@David:
You can got to revision 969725 of the kile trunk reprository and then try to reproduce the bug. In this revision the smart newline (SHIFT + Return) is still ambigious with the one from katepart). This is then fixed in 969726.
Comment 4 Thomas Braun 2009-05-26 17:06:49 UTC
*** Bug 192031 has been marked as a duplicate of this bug. ***
Comment 5 Christoph Feck 2010-10-13 17:24:45 UTC
Assuming Dario's commit fixed it.