Bug 466242 - kmenuedit crash
Summary: kmenuedit crash
Status: RESOLVED FIXED
Alias: None
Product: kmenuedit
Classification: Applications
Component: general (show other bugs)
Version: 5.26.90
Platform: Debian testing Linux
: NOR crash
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-22 14:49 UTC by Kenny Hui
Modified: 2023-02-27 23:37 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.27.2
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kenny Hui 2023-02-22 14:49:52 UTC
SUMMARY
Following a specific steps would cause kmenuedit to crash.

STEPS TO REPRODUCE
1. Cut an item
2. Paste that item anywhere
3. Drag that item to the root, (So not in any submenu)
4. Cut that item again
5. Witness crash

OBSERVED RESULT
kmenuedit crashed.

EXPECTED RESULT
It would cut that item

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Debian GNU/Linux
KDE Plasma Version: 5.26.90
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
Backtrace:
#0  0x00007ffff7c57f5d in KService::storageId (this=<optimized out>) at ./src/services/kservice.cpp:874
#1  0x000055555557d7a0 in MenuEntryInfo::setInUse (this=this@entry=0x5555558b04d0, inUse=inUse@entry=false)
    at /usr/include/x86_64-linux-gnu/qt5/QtCore/qshareddata.h:160
#2  0x0000555555582c46 in TreeView::del (this=this@entry=0x55555578b530, item=item@entry=0x5555558a52d0, deleteInfo=deleteInfo@entry=false)
    at ./treeview.cpp:1602
#3  0x0000555555583118 in TreeView::copy (this=this@entry=0x55555578b530, cutting=cutting@entry=true) at ./treeview.cpp:1217
#4  0x00005555555831de in TreeView::cut (this=0x55555578b530) at ./treeview.cpp:1169
#5  0x00007ffff64e8f4f in QtPrivate::QSlotObjectBase::call (a=0x7fffffffcfb0, r=0x55555578b530, this=0x555555790b10)
    at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#6  doActivate<false> (sender=0x55555574a850, signal_index=4, argv=0x7fffffffcfb0) at kernel/qobject.cpp:3923
#7  0x00007ffff64e21ef in QMetaObject::activate (sender=sender@entry=0x55555574a850, m=m@entry=0x7ffff7677d00 <QAction::staticMetaObject>, 
    local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7fffffffcfb0) at kernel/qobject.cpp:3983
#8  0x00007ffff715c782 in QAction::triggered (this=this@entry=0x55555574a850, _t1=<optimized out>) at .moc/moc_qaction.cpp:376
#9  0x00007ffff715f3ab in QAction::activate (this=0x55555574a850, event=<optimized out>) at kernel/qaction.cpp:1161
#10 0x00007ffff7256e8a in QAbstractButtonPrivate::click (this=0x5555557a1fc0) at widgets/qabstractbutton.cpp:398
#11 0x00007ffff7256fd7 in QAbstractButton::mouseReleaseEvent (this=0x55555582fc30, e=0x7fffffffd530) at widgets/qabstractbutton.cpp:1044
#12 0x00007ffff734faaa in QToolButton::mouseReleaseEvent (this=<optimized out>, e=<optimized out>) at widgets/qtoolbutton.cpp:622
#13 0x00007ffff71a4db8 in QWidget::event (this=0x55555582fc30, event=0x7fffffffd530) at kernel/qwidget.cpp:9044
#14 0x00007ffff7162fae in QApplicationPrivate::notify_helper (this=this@entry=0x5555555b74c0, receiver=receiver@entry=0x55555582fc30, 
    e=e@entry=0x7fffffffd530) at kernel/qapplication.cpp:3640
#15 0x00007ffff716b552 in QApplication::notify (this=<optimized out>, receiver=0x55555582fc30, e=<optimized out>) at kernel/qapplication.cpp:3084
#16 0x00007ffff64b16f8 in QCoreApplication::notifyInternal2 (receiver=0x55555582fc30, event=0x7fffffffd530) at kernel/qcoreapplication.cpp:1064

#17 0x00007ffff716965e in QApplicationPrivate::sendMouseEvent (receiver=receiver@entry=0x55555582fc30, event=event@entry=0x7fffffffd530, 
    alienWidget=<optimized out>, nativeWidget=0x55555570cbc0, buttonDown=buttonDown@entry=0x7ffff76a69f0 <qt_button_down>, lastMouseReceiver=..., 
    spontaneous=true, onlyDispatchEnterLeave=false) at kernel/qapplication.cpp:2622
#18 0x00007ffff71bdbd8 in QWidgetWindow::handleMouseEvent (this=0x5555558cdfc0, event=0x7fffffffd7e0) at kernel/qwidgetwindow.cpp:683
#19 0x00007ffff71c0f60 in QWidgetWindow::event (this=0x5555558cdfc0, event=0x7fffffffd7e0) at kernel/qwidgetwindow.cpp:300
#20 0x00007ffff7162fae in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x5555558cdfc0, e=0x7fffffffd7e0) at kernel/qapplication.cpp:3640
#21 0x00007ffff64b16f8 in QCoreApplication::notifyInternal2 (receiver=0x5555558cdfc0, event=0x7fffffffd7e0) at kernel/qcoreapplication.cpp:1064
#22 0x00007ffff693d3ed in QGuiApplicationPrivate::processMouseEvent (e=0x7fffe8006b00) at kernel/qguiapplication.cpp:2278
#23 0x00007ffff6911cac in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at kernel/qwindowsysteminterface.cpp:1169
#24 0x00007ffff48c24b0 in userEventSourceDispatch(_GSource*, int (*)(void*), void*) () from /lib/x86_64-linux-gnu/libQt5WaylandClient.so.5
#25 0x00007ffff4a657a9 in g_main_dispatch (context=0x5555555dd780) at ../../../glib/gmain.c:3454
#26 g_main_context_dispatch (context=0x5555555dd780) at ../../../glib/gmain.c:4172
#27 0x00007ffff4a65a38 in g_main_context_iterate (context=context@entry=0x5555555dd780, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
    at ../../../glib/gmain.c:4248
#28 0x00007ffff4a65acc in g_main_context_iteration (context=0x5555555dd780, may_block=1) at ../../../glib/gmain.c:4313
#29 0x00007ffff6509836 in QEventDispatcherGlib::processEvents (this=0x5555555e1280, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#30 0x00007ffff64b017b in QEventLoop::exec (this=this@entry=0x7fffffffdb10, flags=..., flags@entry=...)
    at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#31 0x00007ffff64b82d6 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#32 0x00007ffff6930e8c in QGuiApplication::exec () at kernel/qguiapplication.cpp:1863
#33 0x00007ffff7162f25 in QApplication::exec () at kernel/qapplication.cpp:2832
#34 0x000055555556b6b3 in main (argc=<optimized out>, argv=<optimized out>) at ./main.cpp:93

*Reproducible on KDE Neon 5.27.0
Comment 1 Nate Graham 2023-02-22 19:33:03 UTC
Can reproduce.
Comment 2 Bug Janitor Service 2023-02-26 01:37:43 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kmenuedit/-/merge_requests/13
Comment 3 Nate Graham 2023-02-27 23:24:27 UTC
Git commit 7ca6a65b465f202c63aefb590d60c4d8e0b5007a by Nate Graham, on behalf of Nikita Karpei.
Committed on 27/02/2023 at 23:12.
Pushed by ngraham into branch 'master'.

Fix crash when cutting an item that was dragged to the root

M  +5    -0    treeview.cpp

https://invent.kde.org/plasma/kmenuedit/commit/7ca6a65b465f202c63aefb590d60c4d8e0b5007a
Comment 4 Nate Graham 2023-02-27 23:37:14 UTC
Git commit 8a3a31f43662e41717916d7a3c0ebe2c3629992b by Nate Graham, on behalf of Nikita Karpei.
Committed on 27/02/2023 at 23:25.
Pushed by ngraham into branch 'Plasma/5.27'.

Fix crash when cutting an item that was dragged to the root


(cherry picked from commit 7ca6a65b465f202c63aefb590d60c4d8e0b5007a)

M  +5    -0    treeview.cpp

https://invent.kde.org/plasma/kmenuedit/commit/8a3a31f43662e41717916d7a3c0ebe2c3629992b