Bug 449238

Summary: Dolphin crashes when I try to drag a column in details view mode
Product: [Applications] dolphin Reporter: Patrick Silva <bugseforuns>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: kfm-devel, nate, nicolas.fella, uhhadd, zayed.alsaidi
Priority: NOR Keywords: drkonqi, regression
Version: unspecified   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: New crash information added by DrKonqi

Description Patrick Silva 2022-01-27 11:26:59 UTC
Application: dolphin (22.03.70)

Qt Version: 5.15.3
Frameworks Version: 5.91.0
Operating System: Linux 5.11.0-40-generic x86_64
Windowing System: Wayland
Distribution: KDE neon Unstable Edition
DrKonqi: 5.24.80 [CoredumpBackend]

-- Information about the crash:
- What I was doing when the application crashed:
open Dolphin, set details view mode (ctrl+3), drag any column except 'Name' horizontaly.

The crash can be reproduced every time.

-- Backtrace:
Application: Dolphin (dolphin), signal: Segmentation fault
Content of s_kcrashErrorMessage: std::unique_ptr<char []> = {get() = 0x0}
[New LWP 16015]
[New LWP 16022]
[New LWP 16023]
[New LWP 16025]
[New LWP 16024]
[New LWP 16026]
[New LWP 16019]
[New LWP 16018]
[New LWP 16017]
[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=sig@entry=11) at ../sysdeps/unix/sysv/linux/raise.c:50
[Current thread is 1 (Thread 0x7f479b5c1600 (LWP 16015))]
__preamble__

[Current thread is 1 (Thread 0x7f479b5c1600 (LWP 16015))]

Thread 9 (Thread 0x7f479aaea700 (LWP 16017)):
#0  futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55dbc11e60b4) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x55dbc11e6060, cond=0x55dbc11e6088) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x55dbc11e6088, mutex=0x55dbc11e6060) at pthread_cond_wait.c:647
#3  0x00007f47a03ab6db in QWaitConditionPrivate::wait (deadline=..., this=0x55dbc11e6060) at thread/qwaitcondition_unix.cpp:146
#4  QWaitCondition::wait (this=this@entry=0x55dbc11e94c0, mutex=mutex@entry=0x55dbc11e94b8, deadline=...) at thread/qwaitcondition_unix.cpp:225
#5  0x00007f479dead9bd in QtWaylandClient::EventThread::waitForReading (this=0x55dbc11e9480) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qdeadlinetimer.h:68
#6  QtWaylandClient::EventThread::run (this=0x55dbc11e9480) at qwaylanddisplay.cpp:206
#7  0x00007f47a03a5543 in QThreadPrivate::start (arg=0x55dbc11e9480) at thread/qthread_unix.cpp:331
#8  0x00007f479eb6a609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#9  0x00007f47a0025293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 8 (Thread 0x7f479a2e9700 (LWP 16018)):
#0  0x00007f47a0018aff in __GI___poll (fds=fds@entry=0x7f479a2e8be0, nfds=nfds@entry=2, timeout=timeout@entry=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f479deada16 in poll (__timeout=-1, __nfds=2, __fds=0x7f479a2e8be0) at /usr/include/x86_64-linux-gnu/bits/poll2.h:46
#2  QtWaylandClient::EventThread::run (this=0x55dbc11e7d30) at qwaylanddisplay.cpp:208
#3  0x00007f47a03a5543 in QThreadPrivate::start (arg=0x55dbc11e7d30) at thread/qthread_unix.cpp:331
#4  0x00007f479eb6a609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#5  0x00007f47a0025293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 7 (Thread 0x7f4791ae8700 (LWP 16019)):
#0  0x00007f47a0018aff in __GI___poll (fds=0x7f478c005240, nfds=3, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f479e0f536e in g_main_context_poll (priority=<optimized out>, n_fds=3, fds=0x7f478c005240, timeout=<optimized out>, context=0x7f478c000c20) at ../../../glib/gmain.c:4346
#2  g_main_context_iterate (context=context@entry=0x7f478c000c20, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../../../glib/gmain.c:4042
#3  0x00007f479e0f54a3 in g_main_context_iteration (context=0x7f478c000c20, may_block=may_block@entry=1) at ../../../glib/gmain.c:4108
#4  0x00007f47a05e69d2 in QEventDispatcherGlib::processEvents (this=0x7f478c000b60, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#5  0x00007f47a058ac7b in QEventLoop::exec (this=this@entry=0x7f4791ae7bb0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:141
#6  0x00007f47a03a4362 in QThread::exec (this=this@entry=0x7f47a16c2d80 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#7  0x00007f47a163ef4b in QDBusConnectionManager::run (this=0x7f47a16c2d80 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at qdbusconnection.cpp:179
#8  0x00007f47a03a5543 in QThreadPrivate::start (arg=0x7f47a16c2d80 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:331
#9  0x00007f479eb6a609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#10 0x00007f47a0025293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 6 (Thread 0x7f477bfff700 (LWP 16026)):
#0  0x00007f47a0018aff in __GI___poll (fds=0x7f4770004e60, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f479e0f536e in g_main_context_poll (priority=<optimized out>, n_fds=1, fds=0x7f4770004e60, timeout=<optimized out>, context=0x7f4770000c20) at ../../../glib/gmain.c:4346
#2  g_main_context_iterate (context=context@entry=0x7f4770000c20, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../../../glib/gmain.c:4042
#3  0x00007f479e0f54a3 in g_main_context_iteration (context=0x7f4770000c20, may_block=may_block@entry=1) at ../../../glib/gmain.c:4108
#4  0x00007f47a05e69d2 in QEventDispatcherGlib::processEvents (this=0x7f4770000b60, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#5  0x00007f47a058ac7b in QEventLoop::exec (this=this@entry=0x7f477bffebe0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:141
#6  0x00007f47a03a4362 in QThread::exec (this=<optimized out>) at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#7  0x00007f47a03a5543 in QThreadPrivate::start (arg=0x55dbc19759a0) at thread/qthread_unix.cpp:331
#8  0x00007f479eb6a609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#9  0x00007f47a0025293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 5 (Thread 0x7f47912e7700 (LWP 16024)):
#0  futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55dbc143ff38) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x55dbc143fee8, cond=0x55dbc143ff10) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x55dbc143ff10, mutex=0x55dbc143fee8) at pthread_cond_wait.c:647
#3  0x00007f4793074b1b in cnd_wait (mtx=0x55dbc143fee8, cond=0x55dbc143ff10) at ../include/c11/threads_posix.h:155
#4  util_queue_thread_func (input=input@entry=0x55dbc13b91c0) at ../src/util/u_queue.c:294
#5  0x00007f479307471b in impl_thrd_routine (p=<optimized out>) at ../include/c11/threads_posix.h:87
#6  0x00007f479eb6a609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#7  0x00007f47a0025293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 4 (Thread 0x7f4790ae6700 (LWP 16025)):
#0  futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55dbc143ff38) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x55dbc143fee8, cond=0x55dbc143ff10) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x55dbc143ff10, mutex=0x55dbc143fee8) at pthread_cond_wait.c:647
#3  0x00007f4793074b1b in cnd_wait (mtx=0x55dbc143fee8, cond=0x55dbc143ff10) at ../include/c11/threads_posix.h:155
#4  util_queue_thread_func (input=input@entry=0x55dbc1359680) at ../src/util/u_queue.c:294
#5  0x00007f479307471b in impl_thrd_routine (p=<optimized out>) at ../include/c11/threads_posix.h:87
#6  0x00007f479eb6a609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#7  0x00007f47a0025293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 3 (Thread 0x7f4792506700 (LWP 16023)):
#0  futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55dbc143ff38) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x55dbc143fee8, cond=0x55dbc143ff10) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x55dbc143ff10, mutex=0x55dbc143fee8) at pthread_cond_wait.c:647
#3  0x00007f4793074b1b in cnd_wait (mtx=0x55dbc143fee8, cond=0x55dbc143ff10) at ../include/c11/threads_posix.h:155
#4  util_queue_thread_func (input=input@entry=0x55dbc148b550) at ../src/util/u_queue.c:294
#5  0x00007f479307471b in impl_thrd_routine (p=<optimized out>) at ../include/c11/threads_posix.h:87
#6  0x00007f479eb6a609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#7  0x00007f47a0025293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7f4792d07700 (LWP 16022)):
#0  futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55dbc143ff38) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x55dbc143fee8, cond=0x55dbc143ff10) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x55dbc143ff10, mutex=0x55dbc143fee8) at pthread_cond_wait.c:647
#3  0x00007f4793074b1b in cnd_wait (mtx=0x55dbc143fee8, cond=0x55dbc143ff10) at ../include/c11/threads_posix.h:155
#4  util_queue_thread_func (input=input@entry=0x55dbc14a0bc0) at ../src/util/u_queue.c:294
#5  0x00007f479307471b in impl_thrd_routine (p=<optimized out>) at ../include/c11/threads_posix.h:87
#6  0x00007f479eb6a609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#7  0x00007f47a0025293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7f479b5c1600 (LWP 16015)):
[KCrash Handler]
#3  0x00007f47a1095bae in QWidget::testAttribute_helper (this=this@entry=0x0, attribute=attribute@entry=Qt::WA_RightToLeft) at kernel/qwidget.cpp:11131
#4  0x00007f47a1095be2 in QWidget::testAttribute (attribute=Qt::WA_RightToLeft, this=0x0) at ../../include/QtWidgets/../../src/widgets/kernel/qwidget.h:884
#5  QWidget::layoutDirection (this=this@entry=0x0) at kernel/qwidget.cpp:4715
#6  0x00007f47a27be097 in KItemListHeaderWidget::paintRole (this=this@entry=0x55dbc1b141c0, painter=painter@entry=0x7ffdd171d208, role=..., rect=..., orderIndex=orderIndex@entry=16, widget=widget@entry=0x0) at ./src/kitemviews/private/kitemlistheaderwidget.cpp:423
#7  0x00007f47a27c05bc in KItemListHeaderWidget::createRolePixmap (this=this@entry=0x55dbc1b141c0, roleIndex=roleIndex@entry=16) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qrect.h:269
#8  0x00007f47a27c0b09 in KItemListHeaderWidget::mouseMoveEvent (this=0x55dbc1b141c0, event=0x7ffdd171d800) at ./src/kitemviews/private/kitemlistheaderwidget.cpp:283
#9  0x00007f47a137e7b3 in QGraphicsItem::sceneEvent (this=0x55dbc1b141d0, event=0x7ffdd171d800) at graphicsview/qgraphicsitem.cpp:6922
#10 0x00007f47a13a00d7 in QGraphicsScenePrivate::sendMouseEvent (this=this@entry=0x55dbc1b32b60, mouseEvent=mouseEvent@entry=0x7ffdd171d800) at graphicsview/qgraphicsscene.cpp:1335
#11 0x00007f47a13a515a in QGraphicsScene::mouseMoveEvent (this=<optimized out>, mouseEvent=0x7ffdd171d800) at graphicsview/qgraphicsscene.cpp:4097
#12 0x00007f47a13b21d1 in QGraphicsScene::event (this=0x55dbc1b32aa0, event=0x7ffdd171d800) at graphicsview/qgraphicsscene.cpp:3429
#13 0x00007f47a1069dc3 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x55dbc1b32aa0, e=0x7ffdd171d800) at kernel/qapplication.cpp:3632
#14 0x00007f47a1072bb8 in QApplication::notify(QObject*, QEvent*) () at kernel/qapplication.cpp:3156
#15 0x00007f47a058c17a in QCoreApplication::notifyInternal2 (receiver=0x55dbc1b32aa0, event=0x7ffdd171d800) at ../../include/QtCore/5.15.3/QtCore/private/../../../../../src/corelib/thread/qthread_p.h:332
#16 0x00007f47a13cdcf2 in QGraphicsViewPrivate::mouseMoveEventHandler (this=0x55dbc1b33320, event=0x7ffdd171de40) at /usr/include/c++/9/bits/atomic_base.h:413
#17 0x00007f47a10accf6 in QWidget::event (this=this@entry=0x55dbc1b32b20, event=event@entry=0x7ffdd171de40) at kernel/qwidget.cpp:8664
#18 0x00007f47a115d3e2 in QFrame::event (this=0x55dbc1b32b20, e=0x7ffdd171de40) at widgets/qframe.cpp:550
#19 0x00007f47a13d0801 in QGraphicsView::viewportEvent (this=0x55dbc1b32b20, event=0x7ffdd171de40) at graphicsview/qgraphicsview.cpp:3014
#20 0x00007f47a058bee3 in QCoreApplicationPrivate::sendThroughObjectEventFilters (event=<optimized out>, receiver=<optimized out>) at kernel/qcoreapplication.cpp:1190
#21 QCoreApplicationPrivate::sendThroughObjectEventFilters (receiver=receiver@entry=0x55dbc1b4aee0, event=event@entry=0x7ffdd171de40) at kernel/qcoreapplication.cpp:1179
#22 0x00007f47a1069db2 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x55dbc1b4aee0, e=0x7ffdd171de40) at kernel/qapplication.cpp:3626
#23 0x00007f47a1072e77 in QApplication::notify(QObject*, QEvent*) () at kernel/qapplication.cpp:3076
#24 0x00007f47a058c17a in QCoreApplication::notifyInternal2 (receiver=0x55dbc1b4aee0, event=0x7ffdd171de40) at ../../include/QtCore/5.15.3/QtCore/private/../../../../../src/corelib/thread/qthread_p.h:332
#25 0x00007f47a10720a7 in QApplicationPrivate::sendMouseEvent (receiver=0x55dbc1b4aee0, event=0x7ffdd171de40, alienWidget=0x55dbc1b4aee0, nativeWidget=0x55dbc1277ff0, buttonDown=<optimized out>, lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false) at kernel/qapplication.cpp:2614
#26 0x00007f47a10c7ed4 in QWidgetWindow::handleMouseEvent(QMouseEvent*) () at /usr/include/c++/9/bits/atomic_base.h:413
#27 0x00007f47a10cb1f4 in QWidgetWindow::event (this=0x55dbc1505730, event=0x7ffdd171e2c0) at kernel/qwidgetwindow.cpp:300
#28 0x00007f47a1069dc3 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x55dbc1505730, e=0x7ffdd171e2c0) at kernel/qapplication.cpp:3632
#29 0x00007f47a1072bb8 in QApplication::notify(QObject*, QEvent*) () at kernel/qapplication.cpp:3156
#30 0x00007f47a058c17a in QCoreApplication::notifyInternal2 (receiver=0x55dbc1505730, event=0x7ffdd171e2c0) at ../../include/QtCore/5.15.3/QtCore/private/../../../../../src/corelib/thread/qthread_p.h:332
#31 0x00007f47a09724d8 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at kernel/qguiapplication.cpp:2282
#32 0x00007f47a0973b45 in QGuiApplicationPrivate::processWindowSystemEvent (e=0x7f4784009d60) at kernel/qguiapplication.cpp:2002
#33 0x00007f47a094b7ac in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at kernel/qwindowsysteminterface.cpp:1169
#34 0x00007f479deecd44 in userEventSourceDispatch(_GSource*, int (*)(void*), void*) () from /lib/x86_64-linux-gnu/libQt5WaylandClient.so.5
#35 0x00007f479e0f517d in g_main_dispatch (context=0x55dbc11ecab0) at ../../../glib/gmain.c:3309
#36 g_main_context_dispatch (context=context@entry=0x55dbc11ecab0) at ../../../glib/gmain.c:3974
#37 0x00007f479e0f5400 in g_main_context_iterate (context=context@entry=0x55dbc11ecab0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../../../glib/gmain.c:4047
#38 0x00007f479e0f54a3 in g_main_context_iteration (context=0x55dbc11ecab0, may_block=may_block@entry=1) at ../../../glib/gmain.c:4108
#39 0x00007f47a05e69d2 in QEventDispatcherGlib::processEvents (this=0x55dbc11e6f80, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#40 0x00007f47a058ac7b in QEventLoop::exec (this=this@entry=0x7ffdd171e660, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:141
#41 0x00007f47a0592e24 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#42 0x000055dbc09d5613 in main (argc=<optimized out>, argv=<optimized out>) at ./src/main.cpp:240

Possible duplicates by query: bug 400555, bug 386242, bug 330871, bug 329107, bug 328977.

Reported using DrKonqi
Comment 1 Zayed Al-Saidi 2022-02-09 14:17:03 UTC
Created attachment 146491 [details]
New crash information added by DrKonqi

dolphin (22.03.70) using Qt 5.15.3

- What I was doing when the application crashed:
This happen when I drag "Size" column or "Modified" column to the left or to the right.

-- Backtrace (Reduced):
#3  0x00007fbf4e00ebae in QWidget::testAttribute_helper (this=0x0, attribute=attribute@entry=Qt::WA_RightToLeft) at kernel/qwidget.cpp:11131
#4  0x00007fbf4e00ebe2 in QWidget::testAttribute (attribute=Qt::WA_RightToLeft, this=<optimized out>) at ../../include/QtWidgets/../../src/widgets/kernel/qwidget.h:884
#5  QWidget::layoutDirection (this=<optimized out>) at kernel/qwidget.cpp:4715
#6  0x00007fbf4f73c077 in KItemListHeaderWidget::paintRole(QPainter*, QByteArray const&, QRectF const&, int, QWidget*) const () from /lib/x86_64-linux-gnu/libdolphinprivate.so.5
#7  0x00007fbf4f73e59c in KItemListHeaderWidget::createRolePixmap(int) const () from /lib/x86_64-linux-gnu/libdolphinprivate.so.5
Comment 2 Nicolas Fella 2022-02-12 13:39:58 UTC
This seems to be caused by https://invent.kde.org/system/dolphin/-/merge_requests/328

Janet, could you please have a look?
Comment 3 Bug Janitor Service 2022-03-03 15:58:43 UTC
A possibly relevant merge request was started @ https://invent.kde.org/system/dolphin/-/merge_requests/354
Comment 4 Janet Blackquill 2022-03-03 16:11:03 UTC
Git commit e8dc49e4b24f5805d0664fcf842ab7b94af4a013 by Jan Blackquill, on behalf of Janet Blackquill.
Committed on 03/03/2022 at 16:02.
Pushed by cblack into branch 'master'.

KItemListHeaderWidget: don't crash if widget == nullptr

M  +4    -2    src/kitemviews/private/kitemlistheaderwidget.cpp

https://invent.kde.org/system/dolphin/commit/e8dc49e4b24f5805d0664fcf842ab7b94af4a013