Bug 511057 - Trying to drag the Side Padding column header crashes dolphin
Summary: Trying to drag the Side Padding column header crashes dolphin
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: view-engine: details mode (other bugs)
Version First Reported In: 25.08.2
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-25 00:16 UTC by Carlos
Modified: 2025-11-27 11:09 UTC (History)
4 users (show)

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


Attachments
gdb log file with backtrace (67.53 KB, text/plain)
2025-10-25 00:16 UTC, Carlos
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos 2025-10-25 00:16:19 UTC
Created attachment 186115 [details]
gdb log file with backtrace

SUMMARY

Dolphin crashes when trying to click and drag the Side Padding column header.

STEPS TO REPRODUCE
1. Make sure "Side Padding" is enabled (right click any column -> check "Side Padding".
2. Hover the mouse over the left or right side padding header
3. Click and hold the left mouse button
4. Move the mouse while holding the left button

OBSERVED RESULT

dolphin will crash

EXPECTED RESULT

no effect (trying to drag from the Side Padding header should do nothing)

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
KDE Plasma Version: 6.4.5
KDE Frameworks Version: 6.19.0
Qt Version: 6.10.0

ADDITIONAL INFORMATION

Running on Wayland.

backtrace attached as gdb.txt file.

From the gdb stop triggered by SIGSEGV:

QArrayDataPointer<char>::ref (this=0x7fffffffb9b0) at /usr/include/qt6/QtCore/qarraydatapointer.h:451
451         void ref() noexcept { if (d) d->ref(); }
(gdb) p d
$1 = (QArrayDataPointer<char>::Data *) 0x111

d is not null but is also not valid.
Comment 1 Nicolas Fella 2025-10-27 20:06:50 UTC
#0  QArrayDataPointer<char>::ref (this=0x7fffffffb9b0) at /usr/include/qt6/QtCore/qarraydatapointer.h:451
#1  QArrayDataPointer<char>::QArrayDataPointer (this=0x7fffffffb9b0, other=...) at /usr/include/qt6/QtCore/qarraydatapointer.h:40
#2  QByteArray::QByteArray (this=<optimized out>, a=..., this=<optimized out>, a=...) at /usr/include/qt6/QtCore/qbytearray.h:636
#3  KItemListHeaderWidget::createRolePixmap (this=this@entry=0x55555612aa40, roleIndex=roleIndex@entry=-1) at /usr/src/debug/dolphin/dolphin-25.08.2/src/kitemviews/private/kitemlistheaderwidget.cpp:580
#4  0x00007ffff7ed0eb3 in KItemListHeaderWidget::mouseMoveEvent (this=0x55555612aa40, event=0x7fffffffbef0) at /usr/src/debug/dolphin/dolphin-25.08.2/src/kitemviews/private/kitemlistheaderwidget.cpp:372
#5  0x00007ffff692fa69 in QGraphicsItem::sceneEvent(QEvent*) () from /usr/lib/libQt6Widgets.so.6
#6  0x00007ffff6954349 in ?? () from /usr/lib/libQt6Widgets.so.6
#7  0x00007ffff695d52b in QGraphicsScene::mouseMoveEvent(QGraphicsSceneMouseEvent*) () from /usr/lib/libQt6Widgets.so.6
#8  0x00007ffff6959e8b in QGraphicsScene::event(QEvent*) () from /usr/lib/libQt6Widgets.so.6
#9  0x00007ffff65020a0 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt6Widgets.so.6
#10 0x00007ffff536a6c8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt6Core.so.6
#11 0x00007ffff698f684 in QGraphicsViewPrivate::mouseMoveEventHandler(QMouseEvent*) () from /usr/lib/libQt6Widgets.so.6
#12 0x00007ffff655d677 in QWidget::event(QEvent*) () from /usr/lib/libQt6Widgets.so.6
#13 0x00007ffff65cc576 in QFrame::event(QEvent*) () from /usr/lib/libQt6Widgets.so.6
#14 0x00007ffff53681ea in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /usr/lib/libQt6Core.so.6
#15 0x00007ffff6502090 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt6Widgets.so.6
#16 0x00007ffff6503ce2 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt6Widgets.so.6
#17 0x00007ffff536a6c8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt6Core.so.6
#18 0x00007ffff64f8028 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () from /usr/lib/libQt6Widgets.so.6
#19 0x00007ffff6578086 in ?? () from /usr/lib/libQt6Widgets.so.6
#20 0x00007ffff6578d1b in ?? () from /usr/lib/libQt6Widgets.so.6
#21 0x00007ffff65020a0 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt6Widgets.so.6
#22 0x00007ffff536a6c8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt6Core.so.6
#23 0x00007ffff5ba8498 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /usr/lib/libQt6Gui.so.6
#24 0x00007ffff5c2cf2c in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt6Gui.so.6
#25 0x00007ffff5c2d108 in QWindowSystemInterface::flushWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt6Gui.so.6
#26 0x00007ffff53c4554 in QObject::event(QEvent*) () from /usr/lib/libQt6Core.so.6
#27 0x00007ffff65020a0 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt6Widgets.so.6
#28 0x00007ffff536a6c8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt6Core.so.6
#29 0x00007ffff536aab2 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQt6Core.so.6
#30 0x00007ffff564db18 in ?? () from /usr/lib/libQt6Core.so.6
#31 0x00007ffff1f5cf4d in ?? () from /usr/lib/libglib-2.0.so.0
#32 0x00007ffff1f5e617 in ?? () from /usr/lib/libglib-2.0.so.0
#33 0x00007ffff1f5e825 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#34 0x00007ffff564a9d2 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt6Core.so.6
#35 0x00007ffff5375a86 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt6Core.so.6
#36 0x00007ffff536f171 in QCoreApplication::exec() () from /usr/lib/libQt6Core.so.6
#37 0x00005555555a3dc0 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/dolphin/dolphin-25.08.2/src/main.cpp:272
Comment 2 TraceyC 2025-10-28 22:16:13 UTC
I'm not able to reproduce this crash in Dolphin built from git-master
Comment 3 Carlos 2025-11-26 23:54:07 UTC
(In reply to TraceyC from comment #2)
> I'm not able to reproduce this crash in Dolphin built from git-master

Weird, the code that causes the issue is exactly the same. I tried a fix and it worked, I think I may try to send a patch.
Comment 4 Bug Janitor Service 2025-11-27 00:36:38 UTC
A possibly relevant merge request was started @ https://invent.kde.org/system/dolphin/-/merge_requests/1115
Comment 5 Méven 2025-11-27 11:09:34 UTC
Git commit acb6493da09f6df31897b266341978fcc7fddce5 by Méven Car, on behalf of Carlos Aurelio.
Committed on 27/11/2025 at 11:09.
Pushed by meven into branch 'master'.

kitemviews: Prevent crash when dragging details side padding header

Calling createRolePixmap() while roleIndex is < 0 (which is the case for
the header side padding) would cause access to a negative index of a
vector, so exit the function before so and do nothing.

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

https://invent.kde.org/system/dolphin/-/commit/acb6493da09f6df31897b266341978fcc7fddce5