Bug 466164 - KMenuEdit crashes in QWidgetLineControl::internalSetText() with .desktop file that has an equals sign in the Exec key's value
Summary: KMenuEdit crashes in QWidgetLineControl::internalSetText() with .desktop file...
Status: RESOLVED DUPLICATE of bug 465290
Alias: None
Product: kmenuedit
Classification: Applications
Component: general (show other bugs)
Version: 5.27.0
Platform: Compiled Sources Linux
: VHI crash
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: drkonqi
: 466417 466757 468420 469494 473290 473998 478646 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-02-20 20:12 UTC by Bradlee Sargent
Modified: 2023-12-21 01:34 UTC (History)
12 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
New crash information added by DrKonqi (4.25 KB, text/plain)
2023-03-02 20:23 UTC, Matias Barletta
Details
New crash information added by DrKonqi (4.25 KB, text/plain)
2023-03-06 03:54 UTC, Matias Barletta
Details
New crash information added by DrKonqi (3.56 KB, text/plain)
2023-08-07 14:45 UTC, Jeff
Details
New crash information added by DrKonqi (5.46 KB, text/plain)
2023-10-01 21:05 UTC, Lennart Rosam
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bradlee Sargent 2023-02-20 20:12:34 UTC
Application: kmenuedit (5.27.0)
 (Compiled from sources)
Qt Version: 5.15.8
Frameworks Version: 5.103.0
Operating System: Linux 5.17.0-1026-oem x86_64
Windowing System: X11
Distribution: KDE neon 5.27
DrKonqi: 5.27.0 [KCrashBackend]

-- Information about the crash:
I entered the following into a submenu of kmenuedit:
name: Emacs
command:
emacsclient -c --socket-name=brademacs ~/org &

After saving it and exiting the menu editor, I tried clicking on the item to edit it and it fails.

The crash can be reproduced every time.

-- Backtrace:
Application: KDE Menu Editor (kmenuedit), signal: Segmentation fault

[KCrash Handler]
#4  0x00007f6522e6c324 in QWidgetLineControl::internalSetText(QString const&, int, bool) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#5  0x000055dd2aa8f387 in ?? ()
#6  0x00007f6522109108 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x000055dd2aa960ce in ?? ()
#8  0x00007f65221090d4 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007f6523010b32 in QTreeWidget::currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#10 0x00007f6522109108 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007f652207a6c7 in QItemSelectionModel::currentChanged(QModelIndex const&, QModelIndex const&) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#12 0x00007f652207e17d in QItemSelectionModel::setCurrentIndex(QModelIndex const&, QFlags<QItemSelectionModel::SelectionFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#13 0x00007f6522f9314e in QAbstractItemView::mousePressEvent(QMouseEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#14 0x00007f6522d5797e in QWidget::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#15 0x00007f6522e05d42 in QFrame::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#16 0x00007f65220d0dda in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#17 0x00007f6522d14782 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#18 0x00007f6522d1c3d4 in QApplication::notify(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#19 0x00007f65220d107a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#20 0x00007f6522d1aeb7 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#21 0x00007f6522d71210 in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#22 0x00007f6522d744a5 in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#23 0x00007f6522d14793 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#24 0x00007f65220d107a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#25 0x00007f6522607a77 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#26 0x00007f65225dba5c in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#27 0x00007f651d470dee in ?? () from /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#28 0x00007f6520697d3b in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#29 0x00007f65206ec6c8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#30 0x00007f65206953e3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#31 0x00007f652212aad8 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#32 0x00007f65220cf99b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#33 0x00007f65220d7f34 in QCoreApplication::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#34 0x000055dd2aa89956 in ?? ()
#35 0x00007f65219ead90 in __libc_start_call_main (main=main@entry=0x55dd2aa88a90, argc=argc@entry=1, argv=argv@entry=0x7ffd78758328) at ../sysdeps/nptl/libc_start_call_main.h:58
#36 0x00007f65219eae40 in __libc_start_main_impl (main=0x55dd2aa88a90, argc=1, argv=0x7ffd78758328, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffd78758318) at ../csu/libc-start.c:392
#37 0x000055dd2aa8a265 in ?? ()
[Inferior 1 (process 1925280) detached]

The reporter indicates this bug may be a duplicate of or related to bug 412587, bug 359588, bug 417097.

Reported using DrKonqi
Comment 1 Bug Janitor Service 2023-03-01 21:19:18 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kmenuedit/-/merge_requests/16
Comment 2 Matias Barletta 2023-03-02 20:23:36 UTC
Created attachment 156933 [details]
New crash information added by DrKonqi

kmenuedit (5.27.2) using Qt 5.15.8

Just editing a Favorite menu (dbeaver) causes the crash.

-- Backtrace (Reduced):
#4  0x00007fe06e0c4324 in QWidgetLineControl::internalSetText(QString const&, int, bool) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
[...]
#9  0x00007fe06e268b32 in QTreeWidget::currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
[...]
#11 0x00007fe06d2656c7 in QItemSelectionModel::currentChanged(QModelIndex const&, QModelIndex const&) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#12 0x00007fe06d26917d in QItemSelectionModel::setCurrentIndex(QModelIndex const&, QFlags<QItemSelectionModel::SelectionFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#13 0x00007fe06e1eb14e in QAbstractItemView::mousePressEvent(QMouseEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
Comment 3 Matias Barletta 2023-03-06 03:54:02 UTC
Created attachment 157028 [details]
New crash information added by DrKonqi

kmenuedit (5.27.2) using Qt 5.15.8

Editing Menu, selecting the offending menu item, then crash

-- Backtrace (Reduced):
#4  0x00007f1d1c0c4324 in QWidgetLineControl::internalSetText(QString const&, int, bool) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
[...]
#9  0x00007f1d1c268b32 in QTreeWidget::currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
[...]
#11 0x00007f1d1b2656c7 in QItemSelectionModel::currentChanged(QModelIndex const&, QModelIndex const&) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#12 0x00007f1d1b26917d in QItemSelectionModel::setCurrentIndex(QModelIndex const&, QFlags<QItemSelectionModel::SelectionFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#13 0x00007f1d1c1eb14e in QAbstractItemView::mousePressEvent(QMouseEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
Comment 4 Nate Graham 2023-03-28 18:21:07 UTC
*** Bug 466417 has been marked as a duplicate of this bug. ***
Comment 5 Nate Graham 2023-05-15 19:52:55 UTC
*** Bug 468420 has been marked as a duplicate of this bug. ***
Comment 6 Nate Graham 2023-05-15 19:52:59 UTC
*** Bug 469494 has been marked as a duplicate of this bug. ***
Comment 7 Jeff 2023-08-07 14:45:26 UTC
Created attachment 160798 [details]
New crash information added by DrKonqi

kmenuedit (5.27.7) using Qt 5.15.10

This occurs after entering a Chromium app/extension shortcut in KDE MenuEditor

-- Backtrace (Reduced):
#4  0x00007f6d866b7134 in QWidgetLineControl::internalSetText(QString const&, int, bool) () at /usr/lib/libQt5Widgets.so.5
[...]
#9  0x00007f6d8685b64c in QTreeWidget::currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*) () at /usr/lib/libQt5Widgets.so.5
[...]
#11 0x00007f6d85868f4f in QItemSelectionModel::currentChanged(QModelIndex const&, QModelIndex const&) () at /usr/lib/libQt5Core.so.5
#12 0x00007f6d85865203 in QItemSelectionModel::setCurrentIndex(QModelIndex const&, QFlags<QItemSelectionModel::SelectionFlag>) () at /usr/lib/libQt5Core.so.5
#13 0x00007f6d867de0e7 in QAbstractItemView::mousePressEvent(QMouseEvent*) () at /usr/lib/libQt5Widgets.so.5
Comment 8 Lennart Rosam 2023-10-01 21:05:21 UTC
Created attachment 162013 [details]
New crash information added by DrKonqi

kmenuedit (5.27.8) using Qt 5.15.10

I tried editing the Menu entry for 1Password. Here's the  1password.desktop file that caused the crash for me:

[Desktop Entry]
Name=1Password
Exec=/opt/1Password/1password --ozone-platform-hint=auto %U
Terminal=false
Type=Application
Icon=1password
StartupWMClass=1Password
Comment=Password manager and secure wallet
MimeType=x-scheme-handler/onepassword;
Categories=Office;

-- Backtrace (Reduced):
#4  0x00007f98add0d9d4 in QWidgetLineControl::internalSetText(QString const&, int, bool) () from /lib64/libQt5Widgets.so.5
#5  0x000055636d72563c in BasicTab::setEntryInfo (this=0x55636ee996b0, entryInfo=0x55636f0d7ea0) at /usr/src/debug/kmenuedit-5.27.8-1.fc38.x86_64/basictab.cpp:382
#6  0x00007f98acee8608 in doActivate<false> (sender=0x55636ee634d0, signal_index=27, argv=0x7ffec390ff80) at kernel/qobject.cpp:3937
[...]
#8  0x000055636d72c378 in TreeView::entrySelected (_t1=<optimized out>, this=0x55636ee634d0) at /usr/src/debug/kmenuedit-5.27.8-1.fc38.x86_64/redhat-linux-build/kmenuedit_autogen/EWIEGA46WW/moc_treeview.cpp:250
#9  TreeView::itemSelected (this=0x55636ee634d0, item=0x55636f115d50) at /usr/src/debug/kmenuedit-5.27.8-1.fc38.x86_64/treeview.cpp:642
Comment 9 Lennart Rosam 2023-10-01 21:16:14 UTC
(In reply to Lennart Rosam from comment #8)
> Created attachment 162013 [details]
> New crash information added by DrKonqi
> 
> kmenuedit (5.27.8) using Qt 5.15.10
> 
> I tried editing the Menu entry for 1Password. Here's the  1password.desktop
> file that caused the crash for me:
> 
> [Desktop Entry]
> Name=1Password
> Exec=/opt/1Password/1password --ozone-platform-hint=auto %U
> Terminal=false
> Type=Application
> Icon=1password
> StartupWMClass=1Password
> Comment=Password manager and secure wallet
> MimeType=x-scheme-handler/onepassword;
> Categories=Office;
> 
> -- Backtrace (Reduced):
> #4  0x00007f98add0d9d4 in QWidgetLineControl::internalSetText(QString
> const&, int, bool) () from /lib64/libQt5Widgets.so.5
> #5  0x000055636d72563c in BasicTab::setEntryInfo (this=0x55636ee996b0,
> entryInfo=0x55636f0d7ea0) at
> /usr/src/debug/kmenuedit-5.27.8-1.fc38.x86_64/basictab.cpp:382
> #6  0x00007f98acee8608 in doActivate<false> (sender=0x55636ee634d0,
> signal_index=27, argv=0x7ffec390ff80) at kernel/qobject.cpp:3937
> [...]
> #8  0x000055636d72c378 in TreeView::entrySelected (_t1=<optimized out>,
> this=0x55636ee634d0) at
> /usr/src/debug/kmenuedit-5.27.8-1.fc38.x86_64/redhat-linux-build/
> kmenuedit_autogen/EWIEGA46WW/moc_treeview.cpp:250
> #9  TreeView::itemSelected (this=0x55636ee634d0, item=0x55636f115d50) at
> /usr/src/debug/kmenuedit-5.27.8-1.fc38.x86_64/treeview.cpp:642

Update: Turns out, the desktop file I originally posted (from /usr/share/applications) was not the culprit. I edited the shortcut before and a file was created under ~/.local/share/applications. Removing the file fixes the crash. Here's the content of the file:

[Desktop Entry]
Categories=Office;
Comment=Password manager and secure wallet
Exec='/opt/1Password/1password --ozone-platform-hint=auto'
Icon=1password
MimeType=x-scheme-handler/onepassword;
Name=1Password
NoDisplay=false
Path=
StartupNotify=true
StartupWMClass=1Password
Terminal=false
TerminalOptions=
Type=Application
X-KDE-SubstituteUID=false
X-KDE-Username=

So to reproduce, put the file contents from comment #8 into /usr/share/applications/1password.desktop and the contents of the file above into ~/.local/share/applications/1password.desktop. Then try to edit the 1Password application under "Office".
Comment 10 Nate Graham 2023-12-13 15:32:30 UTC
*** Bug 465290 has been marked as a duplicate of this bug. ***
Comment 11 Nate Graham 2023-12-13 15:33:41 UTC

*** This bug has been marked as a duplicate of bug 465290 ***
Comment 12 Nate Graham 2023-12-20 19:52:22 UTC
*** Bug 466417 has been marked as a duplicate of this bug. ***
Comment 13 Nate Graham 2023-12-20 19:52:26 UTC
*** Bug 466757 has been marked as a duplicate of this bug. ***
Comment 14 Nate Graham 2023-12-20 19:52:31 UTC
*** Bug 468420 has been marked as a duplicate of this bug. ***
Comment 15 Nate Graham 2023-12-20 19:52:37 UTC
*** Bug 469494 has been marked as a duplicate of this bug. ***
Comment 16 Nate Graham 2023-12-20 19:52:41 UTC
*** Bug 473290 has been marked as a duplicate of this bug. ***
Comment 17 Nate Graham 2023-12-20 19:52:47 UTC
*** Bug 473998 has been marked as a duplicate of this bug. ***
Comment 18 Nate Graham 2023-12-21 00:39:56 UTC
*** Bug 478646 has been marked as a duplicate of this bug. ***