Bug 439877 - Dolphin crashes when right-clicking on file or folder to summon the contextual menu
Summary: Dolphin crashes when right-clicking on file or folder to summon the contextua...
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Neon Linux
: NOR crash
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords: drkonqi
: 439651 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-07-15 09:33 UTC by Paul Brown
Modified: 2021-07-19 01:52 UTC (History)
4 users (show)

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


Attachments
New crash information added by DrKonqi (22.68 KB, text/plain)
2021-07-15 19:30 UTC, José Alberto González
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Brown 2021-07-15 09:33:10 UTC
Application: dolphin (21.11.70)

Qt Version: 5.15.3
Frameworks Version: 5.85.0
Operating System: Linux 5.8.0-59-generic x86_64
Windowing System: X11
Distribution: KDE neon Unstable Edition
DrKonqi: 5.22.80 [CoredumpBackend]

-- Information about the crash:
- What I was doing when the application crashed:

Open Dolphin, right click on a file to summon the contextual menu. After a second or less, Dolphin crahses evert time.

The crash can be reproduced every time.

-- Backtrace:
Application: Dolphin (dolphin), signal: Segmentation fault

[New LWP 1547]
[New LWP 1404]
[New LWP 1409]
[New LWP 1410]
[New LWP 1411]
[New LWP 1412]
[New LWP 1401]
[New LWP 1413]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/bin/dolphin'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  __GI_raise (sig=<optimized out>) at ../sysdeps/unix/sysv/linux/raise.c:50
[Current thread is 1 (Thread 0x7f979fbc3700 (LWP 1547))]
[Current thread is 1 (Thread 0x7f979fbc3700 (LWP 1547))]

Thread 8 (Thread 0x7fd7c4856700 (LWP 1413)):
#0  0x00007fd7dfc23aff in __GI___poll (fds=0x7fd7a4005240, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fd7ddbf836e in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fd7ddbf84a3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fd7e01f0fb2 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007fd7e019525b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fd7dffaec22 in QThread::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fd7dffafdbc in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007fd7de676609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#8  0x00007fd7dfc30293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 7 (Thread 0x7fd7db1ed600 (LWP 1401)):
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007fd7dffb2061 in QSemaphore::acquire(int) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#2  0x00007fd7e01cd6e2 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#3  0x00007fd7e01c6c03 in QObject::destroyed(QObject*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007fd7e01cb9d5 in QObject::~QObject() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fd7e2184ede in KBookmarkManager::~KBookmarkManager() () from /lib/x86_64-linux-gnu/libKF5Bookmarks.so.5
#6  0x00007fd7e218501d in KBookmarkManager::~KBookmarkManager() () from /lib/x86_64-linux-gnu/libKF5Bookmarks.so.5
#7  0x00007fd7e218482e in ?? () from /lib/x86_64-linux-gnu/libKF5Bookmarks.so.5
#8  0x00007fd7dfb57a27 in __run_exit_handlers (status=1, listp=0x7fd7dfcf9718 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at exit.c:108
#9  0x00007fd7dfb57be0 in __GI_exit (status=<optimized out>) at exit.c:139
#10 0x00007fd7da892d97 in ?? () from /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#11 0x00007fd7da8c5e77 in ?? () from /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#12 0x00007fd7ddbf817d in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#13 0x00007fd7ddbf8400 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#14 0x00007fd7ddbf84a3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#15 0x00007fd7e01f0fb2 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#16 0x00007fd7e019525b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#17 0x00007fd7e0dfea88 in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#18 0x00007fd7e0dfebb3 in QMenu::exec(QPoint const&, QAction*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#19 0x000055a96c9b4af9 in DolphinContextMenu::openItemContextMenu (this=this@entry=0x55a96e9c30f0) at ./src/dolphincontextmenu.cpp:298
#20 0x000055a96c9b5148 in DolphinContextMenu::open (this=this@entry=0x55a96e9c30f0) at ./src/dolphincontextmenu.cpp:112
#21 0x000055a96c9aa67d in DolphinMainWindow::openContextMenu (this=0x55a96d969de0, pos=..., item=..., url=..., customActions=...) at /usr/include/c++/9/bits/atomic_base.h:413
#22 0x00007fd7e01cd77e in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#23 0x00007fd7e2315488 in DolphinView::requestContextMenu (this=this@entry=0x55a96e2f47d0, _t1=..., _t2=..., _t3=..., _t4=...) at ./obj-x86_64-linux-gnu/src/dolphinprivate_autogen/DWW7M6GQBY/moc_dolphinview.cpp:1098
#24 0x00007fd7e2390988 in DolphinView::slotItemContextMenuRequested (this=0x55a96e2f47d0, index=<optimized out>, pos=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qpoint.h:124
#25 0x00007fd7e01cd77e in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#26 0x00007fd7e2313bba in KItemListController::itemContextMenuRequested (this=this@entry=0x55a96dc40ef0, _t1=<optimized out>, _t2=...) at ./obj-x86_64-linux-gnu/src/dolphinprivate_autogen/Z3MQH7AOBD/moc_kitemlistcontroller.cpp:506
#27 0x00007fd7e234cedf in KItemListController::onPress (this=this@entry=0x55a96dc40ef0, screenPos=..., pos=..., modifiers=modifiers@entry=..., buttons=..., buttons@entry=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qpoint.h:133
#28 0x00007fd7e234df05 in KItemListController::mousePressEvent (transform=..., event=0x7ffeac5214f0, this=0x55a96dc40ef0) at ./src/kitemviews/kitemlistcontroller.cpp:555
#29 KItemListController::mousePressEvent (this=0x55a96dc40ef0, event=0x7ffeac5214f0, transform=...) at ./src/kitemviews/kitemlistcontroller.cpp:538
#30 0x00007fd7e23500f7 in KItemListController::processEvent (this=this@entry=0x55a96dc40ef0, event=event@entry=0x7ffeac5214f0, transform=...) at ./src/kitemviews/kitemlistcontroller.cpp:1108
#31 0x00007fd7e235fdd6 in KItemListView::event (this=0x55a96e364ff0, event=0x7ffeac5214f0) at ./src/kitemviews/kitemlistview.cpp:949
#32 0x00007fd7e0c72dc3 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#33 0x00007fd7e0c7bbb8 in QApplication::notify(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#34 0x00007fd7e019675a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#35 0x00007fd7e0fa88a3 in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#36 0x00007fd7e0fa8ce7 in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#37 0x00007fd7e0fb10aa in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#38 0x00007fd7e0fb12ef in QGraphicsScene::mousePressEvent(QGraphicsSceneMouseEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#39 0x00007fd7e0fbaf5a in QGraphicsScene::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#40 0x00007fd7e0c72dc3 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#41 0x00007fd7e0c7bbb8 in QApplication::notify(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#42 0x00007fd7e019675a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#43 0x00007fd7e0fd834b in QGraphicsView::mousePressEvent(QMouseEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#44 0x00007fd7e0cb5d11 in QWidget::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#45 0x00007fd7e0d66092 in QFrame::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#46 0x00007fd7e0fd9411 in QGraphicsView::viewportEvent(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#47 0x00007fd7e01964c3 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#48 0x00007fd7e0c72db2 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#49 0x00007fd7e0c7be77 in QApplication::notify(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#50 0x00007fd7e019675a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#51 0x00007fd7e0c7b0a7 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#52 0x00007fd7e0cd0f44 in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#53 0x00007fd7e0cd4264 in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#54 0x00007fd7e0c72dc3 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#55 0x00007fd7e0c7bbb8 in QApplication::notify(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#56 0x00007fd7e019675a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#57 0x00007fd7e057c4e8 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#58 0x00007fd7e057db55 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#59 0x00007fd7e05557ac in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#60 0x00007fd7da8c5e7e in ?? () from /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#61 0x00007fd7ddbf817d in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#62 0x00007fd7ddbf8400 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#63 0x00007fd7ddbf84a3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#64 0x00007fd7e01f0fb2 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#65 0x00007fd7e019525b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#66 0x00007fd7e019d414 in QCoreApplication::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#67 0x000055a96c995f36 in main (argc=<optimized out>, argv=<optimized out>) at ./src/main.cpp:227

Thread 6 (Thread 0x7fd7c5057700 (LWP 1412)):
#0  futex_abstimed_wait_cancelable (private=<optimized out>, abstime=0x7fd7c5056b50, clockid=<optimized out>, expected=0, futex_word=0x55a96dc56190) at ../sysdeps/nptl/futex-internal.h:320
#1  __pthread_cond_wait_common (abstime=0x7fd7c5056b50, clockid=<optimized out>, mutex=0x55a96dc56140, cond=0x55a96dc56168) at pthread_cond_wait.c:520
#2  __pthread_cond_timedwait (cond=0x55a96dc56168, mutex=0x55a96dc56140, abstime=0x7fd7c5056b50) at pthread_cond_wait.c:656
#3  0x00007fd7dffb5eb8 in QWaitCondition::wait(QMutex*, QDeadlineTimer) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007fd7dffb33c1 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fd7dffafdbc in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fd7de676609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#7  0x00007fd7dfc30293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 5 (Thread 0x7fd7c5858700 (LWP 1411)):
#0  futex_abstimed_wait_cancelable (private=<optimized out>, abstime=0x7fd7c5857b50, clockid=<optimized out>, expected=0, futex_word=0x55a96dc55a60) at ../sysdeps/nptl/futex-internal.h:320
#1  __pthread_cond_wait_common (abstime=0x7fd7c5857b50, clockid=<optimized out>, mutex=0x55a96dc55a10, cond=0x55a96dc55a38) at pthread_cond_wait.c:520
#2  __pthread_cond_timedwait (cond=0x55a96dc55a38, mutex=0x55a96dc55a10, abstime=0x7fd7c5857b50) at pthread_cond_wait.c:656
#3  0x00007fd7dffb5eb8 in QWaitCondition::wait(QMutex*, QDeadlineTimer) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007fd7dffb33c1 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fd7dffafdbc in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fd7de676609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#7  0x00007fd7dfc30293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 4 (Thread 0x7fd7c6059700 (LWP 1410)):
#0  futex_abstimed_wait_cancelable (private=<optimized out>, abstime=0x7fd7c6058b50, clockid=<optimized out>, expected=0, futex_word=0x55a96dcf6770) at ../sysdeps/nptl/futex-internal.h:320
#1  __pthread_cond_wait_common (abstime=0x7fd7c6058b50, clockid=<optimized out>, mutex=0x55a96dcf6720, cond=0x55a96dcf6748) at pthread_cond_wait.c:520
#2  __pthread_cond_timedwait (cond=0x55a96dcf6748, mutex=0x55a96dcf6720, abstime=0x7fd7c6058b50) at pthread_cond_wait.c:656
#3  0x00007fd7dffb5eb8 in QWaitCondition::wait(QMutex*, QDeadlineTimer) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007fd7dffb33c1 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fd7dffafdbc in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fd7de676609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#7  0x00007fd7dfc30293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 3 (Thread 0x7fd7c685a700 (LWP 1409)):
#0  futex_abstimed_wait_cancelable (private=<optimized out>, abstime=0x7fd7c6859b50, clockid=<optimized out>, expected=0, futex_word=0x55a96dda24e0) at ../sysdeps/nptl/futex-internal.h:320
#1  __pthread_cond_wait_common (abstime=0x7fd7c6859b50, clockid=<optimized out>, mutex=0x55a96dda2490, cond=0x55a96dda24b8) at pthread_cond_wait.c:520
#2  __pthread_cond_timedwait (cond=0x55a96dda24b8, mutex=0x55a96dda2490, abstime=0x7fd7c6859b50) at pthread_cond_wait.c:656
#3  0x00007fd7dffb5eb8 in QWaitCondition::wait(QMutex*, QDeadlineTimer) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007fd7dffb33c1 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fd7dffafdbc in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fd7de676609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#7  0x00007fd7dfc30293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7fd7d9584700 (LWP 1404)):
#0  0x00007fd7dfc23aff in __GI___poll (fds=0x7fd7cc015100, nfds=4, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fd7ddbf836e in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fd7ddbf84a3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fd7e01f0fb2 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007fd7e019525b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fd7dffaec22 in QThread::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fd7e1246f4b in ?? () from /lib/x86_64-linux-gnu/libQt5DBus.so.5
#7  0x00007fd7dffafdbc in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007fd7de676609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#9  0x00007fd7dfc30293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7f979fbc3700 (LWP 1547)):
[KCrash Handler]
#3  std::__atomic_base<int>::load (__m=std::memory_order_relaxed, this=<optimized out>) at /usr/include/c++/9/bits/atomic_base.h:413
#4  QAtomicOps<int>::loadRelaxed<int> (_q_value=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qatomic_cxx11.h:239
#5  QBasicAtomicInteger<int>::loadRelaxed (this=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qbasicatomic.h:107
#6  QtPrivate::RefCount::ref (this=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qrefcount.h:55
#7  QString::QString (other=..., this=0x7f979fbc2bc0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:1094
#8  QStringBuilder<QString, QString>::operator QString (this=<synthetic pointer>, this=<synthetic pointer>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qstringbuilder.h:147
#9  FileItemLinkingPluginActionLoader::run (this=0x55a96ea0d3c0) at ./activities/fileitemplugin/FileItemLinkingPluginActionLoader.cpp:77
#10 0x00007fd7dffafdbc in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007fd7de676609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#12 0x00007fd7dfc30293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Possible duplicates by query: bug 436988, bug 407271, bug 406343, bug 401552, bug 395128.

Reported using DrKonqi
Comment 1 Jordan 2021-07-15 17:00:17 UTC
This is happening for me as well, specifically once I mouse-over the Activities option. Does your context menu stay open at all without moving the mouse?
Comment 2 Harald Sitter 2021-07-15 17:05:05 UTC
Git commit 07d54af0b6e3f074a9e679db506fc538f52cc410 by Harald Sitter.
Committed on 15/07/2021 at 14:01.
Pushed by sitter into branch 'release/21.08'.

don't auto deduce QStringBuilder

see 'auto QString(Builder) considered VERY HARMFUL' thread on kde-devel
https://markmail.org/message/mbrp5ypyhcfk7zjn

What happens is that the type of str ends up being QStringBuilder
instead of QString. The QStringBuilder is destroyed after the semicolon,
and all access to "str" produces undefined behavior.

Never use auto for QString concatenation!

M  +1    -1    activities/fileitemplugin/FileItemLinkingPluginActionLoader.cpp

https://invent.kde.org/network/kio-extras/commit/07d54af0b6e3f074a9e679db506fc538f52cc410
Comment 3 José Alberto González 2021-07-15 19:30:58 UTC
Created attachment 140092 [details]
New crash information added by DrKonqi

dolphin (21.07.80) using Qt 5.15.3

- What I was doing when the application crashed: dolphin crashed when  I do a right click over an image  or folder, ever and ever

-- Backtrace (Reduced):
#4  std::__atomic_base<int>::load (__m=std::memory_order_relaxed, this=<optimized out>) at /usr/include/c++/9/bits/atomic_base.h:413
#5  QAtomicOps<int>::loadRelaxed<int> (_q_value=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qatomic_cxx11.h:239
#6  QBasicAtomicInteger<int>::loadRelaxed (this=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qbasicatomic.h:107
[...]
#8  QString::QString (other=..., this=0x7fe3efce6bc0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:1094
#9  QStringBuilder<QString, QString>::operator QString (this=<synthetic pointer>, this=<synthetic pointer>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qstringbuilder.h:147
Comment 4 Paul Brown 2021-07-15 20:10:00 UTC
(In reply to Harald Sitter from comment #2)
> Git commit 07d54af0b6e3f074a9e679db506fc538f52cc410 by Harald Sitter.
> Committed on 15/07/2021 at 14:01.
> Pushed by sitter into branch 'release/21.08'.
> 
> don't auto deduce QStringBuilder
> 
> see 'auto QString(Builder) considered VERY HARMFUL' thread on kde-devel
> https://markmail.org/message/mbrp5ypyhcfk7zjn
> 
> What happens is that the type of str ends up being QStringBuilder
> instead of QString. The QStringBuilder is destroyed after the semicolon,
> and all access to "str" produces undefined behavior.
> 
> Never use auto for QString concatenation!
> 
> M  +1    -1   
> activities/fileitemplugin/FileItemLinkingPluginActionLoader.cpp
> 
> https://invent.kde.org/network/kio-extras/commit/
> 07d54af0b6e3f074a9e679db506fc538f52cc410

Thanks, Harald!
Comment 5 Tony 2021-07-19 01:52:27 UTC
*** Bug 439651 has been marked as a duplicate of this bug. ***