Bug 505586

Summary: Duplicate "New Folder" dialog crashed while editing
Product: [Applications] dolphin Reporter: ratijas <me>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: REPORTED ---    
Severity: crash CC: dolphin-bugs-null, kdedev
Priority: NOR Keywords: drkonqi, regression
Version First Reported In: 25.04.2   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report: https://crash-reports.kde.org/organizations/kde/issues/198829/events/acf648a53dd54a02b6d84363a902b82e/
Attachments: New crash information added by DrKonqi

Description ratijas 2025-06-14 09:29:59 UTC
Application: dolphin (25.04.2)

ApplicationNotResponding [ANR]: false
Qt Version: 6.9.1
Frameworks Version: 6.14.0
Operating System: Linux 6.15.2-arch1-1 x86_64
Windowing System: X11
Distribution: "Arch Linux"
DrKonqi: 6.3.5 [CoredumpBackend]

-- Information about the crash:
Over sftp connection operations may be slow and queued. While copying a large file over sftp, I tried to create a folder on the same connection. The "New Folder" dialog did not open immediately, so I pressed shortcut again. A minute later two dialogs opened simultaneously. I closed one of them (the top-most, i.e. which appeared last), started typing in the second/remaining one, and Dolphin immediately crashed.

Sounds like those New Folder dialogs are not supposed to exist simultaneously. In other words, no two in-flight dialogs should be created.

The crash can be reproduced sometimes.

-- Backtrace (Reduced):
#5  QLineEdit::text (this=0x55b76bb24eb0) at /usr/src/debug/qt6-base/qtbase/src/widgets/widgets/qlineedit.cpp:289
#6  0x00007f67a90c0468 in KNewFileMenuPrivate::_k_delayedSlotTextChanged (this=0x55b76b234120) at /usr/src/debug/kio/kio-6.14.0/src/filewidgets/knewfilemenu.cpp:1152
#7  0x00007f67a69d37ef in QtPrivate::QSlotObjectBase::call (this=0x55b76e9f21a0, r=0x55b76b33e710, a=0x7fff649c1030, this=<optimized out>, r=<optimized out>, a=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobjectdefs_impl.h:461
#8  doActivate<false> (sender=<optimized out>, signal_index=<optimized out>, argv=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:4146
[...]
#10 QLineEdit::textChanged (this=<optimized out>, _t1=<optimized out>) at /usr/src/debug/qt6-base/build/src/widgets/Widgets_autogen/include/moc_qlineedit.cpp:333


Reported using DrKonqi
Comment 1 ratijas 2025-06-14 09:30:00 UTC
Created attachment 182262 [details]
New crash information added by DrKonqi

DrKonqi auto-attaching complete backtrace.
Comment 2 ratijas 2025-06-14 10:16:41 UTC
Apparently, there already was an attempt to fix it:

- https://invent.kde.org/system/dolphin/-/merge_requests/747#note_903955
- https://invent.kde.org/frameworks/kio/-/commit/ac2fa30d7b905fe7770ab03b1c249650633c851e

But the solution is highly async (connection based), stores boolean flags instead of the actual resources (dialog, job handles/QPointers), and hard-overrides them without checking (e.g. sets `d->m_isCreateDirectoryRunning = true;` without checking maybe it was already running / set to true).
Comment 3 TraceyC 2025-06-17 19:36:24 UTC
Searchable backtrace


Thread 1 (Thread 0x7f679f796a80 (LWP 3171)):
[KCrash Handler]
#5  QLineEdit::text (this=0x55b76bb24eb0) at /usr/src/debug/qt6-base/qtbase/src/widgets/widgets/qlineedit.cpp:289
#6  0x00007f67a90c0468 in KNewFileMenuPrivate::_k_delayedSlotTextChanged (this=0x55b76b234120) at /usr/src/debug/kio/kio-6.14.0/src/filewidgets/knewfilemenu.cpp:1152
#7  0x00007f67a69d37ef in QtPrivate::QSlotObjectBase::call (this=0x55b76e9f21a0, r=0x55b76b33e710, a=0x7fff649c1030, this=<optimized out>, r=<optimized out>, a=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobjectdefs_impl.h:461
#8  doActivate<false> (sender=<optimized out>, signal_index=<optimized out>, argv=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:4146
#9  0x00007f67a7cb8980 in QMetaObject::activate<void, QString> (sender=<optimized out>, mo=<optimized out>, local_signal_index=0, ret=0x0, sender=<optimized out>, mo=<optimized out>, local_signal_index=<optimized out>, ret=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobjectdefs.h:306
#10 QLineEdit::textChanged (this=<optimized out>, _t1=<optimized out>) at /usr/src/debug/qt6-base/build/src/widgets/Widgets_autogen/include/moc_qlineedit.cpp:333
#11 0x00007f67a69d37ef in QtPrivate::QSlotObjectBase::call (this=0x55b76ad8e960, r=0x55b76e71b970, a=0x7fff649c1180, this=<optimized out>, r=<optimized out>, a=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobjectdefs_impl.h:461
#12 doActivate<false> (sender=<optimized out>, signal_index=<optimized out>, argv=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:4146
#13 0x00007f67a7cc84f5 in QMetaObject::activate<void, QString> (sender=0x55b76c0e0f50, mo=<optimized out>, local_signal_index=3, ret=0x0, sender=<optimized out>, mo=<optimized out>, local_signal_index=<optimized out>, ret=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobjectdefs.h:306
#14 QWidgetLineControl::textChanged (this=0x55b76c0e0f50, _t1=...) at /usr/src/debug/qt6-base/build/src/widgets/Widgets_autogen/include/moc_qwidgetlinecontrol_p.cpp:210
#15 QWidgetLineControl::finishChange (this=0x55b76c0e0f50, validateFromState=<optimized out>, update=<optimized out>, edited=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/widgets/widgets/qwidgetlinecontrol.cpp:715
#16 0x00007f67a7ccad7a in QWidgetLineControl::processKeyEvent (this=0x55b76c0e0f50, event=0x7fff649c1840) at /usr/src/debug/qt6-base/qtbase/src/widgets/widgets/qwidgetlinecontrol.cpp:1917
#17 0x00007f67a7cb510f in QLineEdit::keyPressEvent (this=<optimized out>, event=0x7fff649c1840) at /usr/src/debug/qt6-base/qtbase/src/widgets/widgets/qlineedit.cpp:1761
#18 0x00007f67a7b5b27a in QWidget::event (this=0x55b76e71b970, event=0x7fff649c1840) at /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qwidget.cpp:9020
#19 0x00007f67a7b01c70 in QApplicationPrivate::notify_helper (this=this@entry=0x55b76ad4e3e0, receiver=receiver@entry=0x55b76e71b970, e=e@entry=0x7fff649c1840) at /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qapplication.cpp:3303
#20 0x00007f67a7b05f03 in QApplication::notify (this=<optimized out>, receiver=<optimized out>, e=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qapplication.cpp:2721
#21 0x00007f67a6968118 in QCoreApplication::notifyInternal2 (receiver=0x55b76e71b970, event=0x7fff649c1840) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1106
#22 0x00007f67a696814a in QCoreApplication::forwardEvent (receiver=<optimized out>, event=<optimized out>, originatingEvent=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1121
#23 0x00007f67a7b782cb in QWidgetWindow::handleGestureEvent (this=<optimized out>, e=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qwidgetwindow.cpp:1185
#24 QWidgetWindow::event (this=<optimized out>, event=0x7fff649c1840) at /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qwidgetwindow.cpp:363
#25 0x00007f67a7b01c70 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x55b76e9e1840, e=0x7fff649c1840) at /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qapplication.cpp:3303
#26 0x00007f67a6968118 in QCoreApplication::notifyInternal2 (receiver=0x55b76e9e1840, event=0x7fff649c1840) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1106
#27 0x00007f67a696816d in QCoreApplication::sendSpontaneousEvent (receiver=<optimized out>, event=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1560
#28 0x00007f67a719cee0 in QGuiApplicationPrivate::processKeyEvent (e=0x7f6790014d90) at /usr/src/debug/qt6-base/qtbase/src/gui/kernel/qguiapplication.cpp:2615
#29 0x00007f67a72248f4 in QWindowSystemInterface::sendWindowSystemEvents (flags=flags@entry=...) at /usr/src/debug/qt6-base/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:1113
#30 0x00007f679edb30c7 in xcbSourceDispatch (source=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/plugins/platforms/xcb/qxcbeventdispatcher.cpp:57
#31 0x00007f67a405b87d in g_main_dispatch (context=0x7f6798000f00) at ../glib/glib/gmain.c:3398
#32 0x00007f67a405ccd7 in g_main_context_dispatch_unlocked (context=0x7f6798000f00) at ../glib/glib/gmain.c:4249
#33 g_main_context_iterate_unlocked (context=context@entry=0x7f6798000f00, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4314
#34 0x00007f67a405cee5 in g_main_context_iteration (context=0x7f6798000f00, may_block=1) at ../glib/glib/gmain.c:4379
#35 0x00007f67a6c3c5e2 in QEventDispatcherGlib::processEvents (this=0x55b76ade30e0, flags=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:399
#36 0x00007f67a69744b6 in QEventLoop::processEvents (this=0x7fff649c1bb0, flags=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventloop.cpp:104
#37 QEventLoop::exec (this=0x7fff649c1bb0, flags=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventloop.cpp:186
#38 0x00007f67a696c7c1 in QCoreApplication::exec () at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1449
#39 0x00007f67a7afc6aa in QApplication::exec () at /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qapplication.cpp:2570
#40 0x000055b74d9e4d51 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/dolphin/dolphin-25.04.2/src/main.cpp:273
Comment 4 TraceyC 2025-06-17 19:41:56 UTC
This looks like a regression of bug 433347, or related