Version: built from v4.0rc1-622-gaeef621 When the delete key is pressed while the magnet view has focus and no magnet(s) are selected, KTorrent calls QList<QModelIndex>::front() on the list of selected rows. This makes an assert fail since the list is empty and KTorrent crashes. Reproducible: Always Steps to Reproduce: 1. Click and empty part of the magnet view to give it focus without selecting a magnet 2. Press the delete key Actual Results: KTorrent crashes Expected Results: Ignored the key press #0 0x00000033464359e9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 #1 0x00000033464370f8 in __GI_abort () at abort.c:90 #2 0x00007f90cc6a0fb3 in bt::QtMessageOutput (type=<optimized out>, msg=0x3314978 "ASSERT: \"!isEmpty()\" in file /usr/include/QtCore/qlist.h, line 282") at ../src/util/log.cpp:310 #3 0x0000003af4470f66 in qt_message_output (msgType=msgType@entry=QtFatalMsg, buf=<optimized out>) at global/qglobal.cpp:2305 #4 0x0000003af4471139 in qt_message(enum QtMsgType, const char *, typedef __va_list_tag __va_list_tag *) (msgType=msgType@entry=QtFatalMsg, msg=msg@entry=0x3af45dda38 "ASSERT: \"%s\" in file %s, line %d", ap=ap@entry=0x7fff42be1f08) at global/qglobal.cpp:2405 #5 0x0000003af4471944 in qFatal (msg=msg@entry=0x3af45dda38 "ASSERT: \"%s\" in file %s, line %d") at global/qglobal.cpp:2588 #6 0x0000003af4471986 in qt_assert (assertion=assertion@entry=0x490848 "!isEmpty()", file=file@entry=0x4907cb "/usr/include/QtCore/qlist.h", line=line@entry=282) at global/qglobal.cpp:2054 #7 0x0000000000445bf5 in QList<QModelIndex>::first (this=this@entry=0x7fff42be2000) at /usr/include/QtCore/qlist.h:282 #8 0x0000000000445c15 in QList<QModelIndex>::front (this=this@entry=0x7fff42be2000) at /usr/include/QtCore/qlist.h:298 #9 0x0000000000449761 in kt::MagnetView::removeMagnetDownload (this=this@entry=0x2944a00) at ../ktorrent/tools/magnetview.cpp:112 #10 0x0000000000449a73 in kt::MagnetView::keyPressEvent (this=0x2944a00, event=0x7fff42be23b0) at ../ktorrent/tools/magnetview.cpp:133 #11 0x0000003af5e18a34 in QWidget::event (this=0x2944a00, event=0x7fff42be23b0) at kernel/qwidget.cpp:8435 #12 0x0000003af5dc957c in QApplicationPrivate::notify_helper (this=this@entry=0xac7b40, receiver=receiver@entry=0x2944a00, e=e@entry=0x7fff42be23b0) at kernel/qapplication.cpp:4565 #13 0x0000003af5dd0db1 in QApplication::notify (this=this@entry=0x7fff42be3a40, receiver=0x2944a00, receiver@entry=0x2944ab0, e=e@entry=0x7fff42be23b0) at kernel/qapplication.cpp:4006 #14 0x0000000000439e2e in kt::App::notify (this=0x7fff42be3a40, receiver=0x2944ab0, event=0x7fff42be23b0) at ../ktorrent/app.cpp:99 #15 0x0000003af457c9dd in QCoreApplication::notifyInternal (this=0x7fff42be3a40, receiver=receiver@entry=0x2944ab0, event=event@entry=0x7fff42be23b0) at kernel/qcoreapplication.cpp:953 #16 0x0000003af5dc7f16 in sendSpontaneousEvent (event=event@entry=0x7fff42be23b0, receiver=receiver@entry=0x2944ab0) at ../../src/corelib/kernel/qcoreapplication.h:234 #17 qt_sendSpontaneousEvent (receiver=receiver@entry=0x2944ab0, event=event@entry=0x7fff42be23b0) at kernel/qapplication.cpp:5563 #18 0x0000003af5e63397 in QKeyMapper::sendKeyEvent (keyWidget=keyWidget@entry=0x2944ab0, grab=grab@entry=false, type=QEvent::KeyPress, code=16777223, modifiers=..., text=..., autorepeat=autorepeat@entry=false, count=1, nativeScanCode=119, nativeVirtualKey=65535, nativeModifiers=16) at kernel/qkeymapper_x11.cpp:1866 #19 0x0000003af5e63739 in QKeyMapperPrivate::translateKeyEvent (this=0xb0f0c0, keyWidget=keyWidget@entry=0x2944ab0, event=event@entry=0x7fff42be2930, grab=grab@entry=false) at kernel/qkeymapper_x11.cpp:1836 #20 0x0000003af5e3f6cf in QApplication::x11ProcessEvent (this=0x7fff42be3a40, event=event@entry=0x7fff42be2930) at kernel/qapplication_x11.cpp:3556 #21 0x0000003af5e65df4 in x11EventSourceDispatch (s=s@entry=0xabb480, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:148 #22 0x0000003cb1047dc6 in g_main_dispatch (context=0xac7e90) at gmain.c:3054 #23 g_main_context_dispatch (context=context@entry=0xac7e90) at gmain.c:3630 #24 0x0000003cb1048118 in g_main_context_iterate (context=context@entry=0xac7e90, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3701 #25 0x0000003cb10481bc in g_main_context_iteration (context=0xac7e90, may_block=1) at gmain.c:3762 #26 0x0000003af45a9945 in QEventDispatcherGlib::processEvents (this=0xa80ba0, flags=...) at kernel/qeventdispatcher_glib.cpp:425 #27 0x0000003af5e65f66 in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:207 #28 0x0000003af457b5af in QEventLoop::processEvents (this=this@entry=0x7fff42be2d10, flags=...) at kernel/qeventloop.cpp:149 #29 0x0000003af457b8a5 in QEventLoop::exec (this=this@entry=0x7fff42be2d10, flags=...) at kernel/qeventloop.cpp:204 #30 0x0000003af4580cc9 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1225 #31 0x0000003af5dc7d3c in QApplication::exec () at kernel/qapplication.cpp:3823 #32 0x000000000042816c in main (argc=3, argv=0x7fff42be3b78) at ../ktorrent/main.cpp:189
Created attachment 87062 [details] [PATCH] Check if selection is empty before removing selected magnets
Dear Bug Submitter, This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond. Thank you for helping us make KDE software even better for everyone!
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!
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!