Bug 481401 - On a slow network location, Dolphin allows two "new folder" modals then crashes
Summary: On a slow network location, Dolphin allows two "new folder" modals then crashes
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 23.08.5
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords: drkonqi
: 460459 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-02-16 09:01 UTC by Keigh Rim
Modified: 2024-05-17 23:17 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 24.08


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Keigh Rim 2024-02-16 09:01:00 UTC
Application: dolphin (23.08.5)

Qt Version: 5.15.12
Frameworks Version: 5.115.0
Operating System: Linux 6.7.4-arch1-1 x86_64
Windowing System: X11
Distribution: "Arch Linux"
DrKonqi: 5.27.10 [KCrashBackend]

-- Information about the crash:
Reproduce context: 
While on a network location (smb, gdrive, etc) and experiencing delayed UI responses due to any sort of network response time issues, sometime when I hit C+S+N to create a new folder, then the modal window does not immediately pops up. In such cases, between that delay, if I hit the same key, Dolphin actually allows me to open two modal window. 

Crashing point: 

Once two modals are open, interacting with the "below" modal window always crasehs the Dolphin window. 

Expected behavior: 

When I hit the new folder shortcut the first time, Dolphin should immediately block additional user interactions, even the modal window is not ready due to various reasons.

The crash can be reproduced every time.

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

[KCrash Handler]
#4  0x0000774fc1706b60 in QDialogButtonBox::button(QDialogButtonBox::StandardButton) const () at /usr/lib/libQt5Widgets.so.5
#5  0x0000774fc29d15a9 in ??? () at /usr/lib/libKF5KIOFileWidgets.so.5
#6  0x0000774fc08d0e27 in ??? () at /usr/lib/libQt5Core.so.5
#7  0x0000774fc16b30e7 in QLineEdit::textChanged(QString const&) () at /usr/lib/libQt5Widgets.so.5
#8  0x0000774fc08d0fe3 in ??? () at /usr/lib/libQt5Core.so.5
#9  0x0000774fc16bea4a in QWidgetLineControl::textChanged(QString const&) () at /usr/lib/libQt5Widgets.so.5
#10 0x0000774fc16b7bb2 in QWidgetLineControl::finishChange(int, bool, bool) () at /usr/lib/libQt5Widgets.so.5
#11 0x0000774fc16c3160 in QWidgetLineControl::processKeyEvent(QKeyEvent*) () at /usr/lib/libQt5Widgets.so.5
#12 0x0000774fc16b56b4 in QLineEdit::keyPressEvent(QKeyEvent*) () at /usr/lib/libQt5Widgets.so.5
#13 0x0000774fc15aee2d in QWidget::event(QEvent*) () at /usr/lib/libQt5Widgets.so.5
#14 0x0000774fc15788ff in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#15 0x0000774fc157d918 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#16 0x0000774fc089bef8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#17 0x0000774fc15cec4b in ??? () at /usr/lib/libQt5Widgets.so.5
#18 0x0000774fc15788ff in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#19 0x0000774fc089bef8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#20 0x0000774fc0d455a0 in QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*) () at /usr/lib/libQt5Gui.so.5
#21 0x0000774fbaec3965 in ??? () at /usr/lib/qt/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so
#22 0x0000774fc08d0e27 in ??? () at /usr/lib/libQt5Core.so.5
#23 0x0000774fc1c48ad4 in QDBusPendingCallWatcher::finished(QDBusPendingCallWatcher*) () at /usr/lib/libQt5DBus.so.5
#24 0x0000774fc08c3964 in QObject::event(QEvent*) () at /usr/lib/libQt5Core.so.5
#25 0x0000774fc15788ff in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#26 0x0000774fc089bef8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#27 0x0000774fc08a0e5b in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/libQt5Core.so.5
#28 0x0000774fc08e6ec8 in ??? () at /usr/lib/libQt5Core.so.5
#29 0x0000774fbe90df69 in ??? () at /usr/lib/libglib-2.0.so.0
#30 0x0000774fbe96c3a7 in ??? () at /usr/lib/libglib-2.0.so.0
#31 0x0000774fbe90c162 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#32 0x0000774fc08ead0c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#33 0x0000774fc089ac04 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#34 0x0000774fc089c0a3 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#35 0x00005bdaf5fb2db8 in ??? ()
#36 0x0000774fc0043cd0 in ??? () at /usr/lib/libc.so.6
#37 0x0000774fc0043d8a in __libc_start_main () at /usr/lib/libc.so.6
#38 0x00005bdaf5fb3575 in ??? ()
[Inferior 1 (process 8600) detached]

Reported using DrKonqi
Comment 1 Keigh Rim 2024-02-16 09:03:44 UTC
I restored the default shortcut (F10) and was able to reproduce a crash, so custom key combination shouldn't be relevant.
Comment 2 Keigh Rim 2024-02-16 09:08:58 UTC
Possibly a duplicate to https://bugs.kde.org/show_bug.cgi?id=460459, but can't be sure as the context provided in #460459 is quite limited.
Comment 3 Akseli Lahtinen 2024-02-20 08:57:47 UTC
Meanwhile I can reproduce opening multiple windows slowly, I can't reproduce the crash on Plasma 6.

Operating System: Fedora Linux 39
KDE Plasma Version: 6.0.80
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.0
Kernel Version: 6.7.4-200.fc39.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 15.5 GiB of RAM
Graphics Processor: AMD Radeon RX 6600
Comment 4 Akseli Lahtinen 2024-02-20 08:59:10 UTC
Do you have spell check enabled?
Comment 5 Akseli Lahtinen 2024-02-20 09:00:01 UTC
*** Bug 460459 has been marked as a duplicate of this bug. ***
Comment 6 Keigh Rim 2024-02-20 16:13:06 UTC
re:comment 7 

I'm a little confused. By "spell check", do you mean [system settings] > [regional settings] > [spell check] > [Automatic spell checking enabled by default] ? If so the box is unchecked. 

Anyway, I should have been a bit more clear on what my _interacting with the "below" modal window_ was. 

- I can safely close the "below" modal by hitting the "close" GUI button or escape key stroke. 
- I can also safely put focus in the text field by mouse click. 
- But as soon as I start typing anything in the text field, Dolphin crashes. 
- Also when I click "ok" GUI button without touching the content of the text field, Dolphin crashes. 

Glad to hear that it wasn't reproducible on P6. I'm extremely excited to try P6 when it's out next week!
Comment 7 Akseli Lahtinen 2024-02-20 23:56:54 UTC
> I'm a little confused. By "spell check", do you mean [system settings] > [regional settings] > [spell check] > [Automatic spell checking enabled by default] ? If so the box is unchecked. 

Yes, it was a cause of bug earlier within Dolphin so I wanted to make sure that wasn't it, since it should be fixed in Plasma 6.

> - But as soon as I start typing anything in the text field, Dolphin crashes. 
> - Also when I click "ok" GUI button without touching the content of the text field, Dolphin crashes. 

Good to know, I will try again to reproduce this and follow these exact steps. :)
Comment 8 Keigh Rim 2024-03-08 11:23:07 UTC
Finally got Plasma6 yesterday, and although it feels much more polished and beautiful, I can confirm this exact behavior/issue still exists.
Comment 9 Akseli Lahtinen 2024-03-11 12:11:01 UTC
Managed to reproduce the bug.

1. Open any network drive
2. Press ctrl+shift+n twice while its loading
3. Two modals pop up
4. The second one cant be typed in, but the other one can
5. Press ok on the first modal
6. When second one gets active, it crashes dolphin

SYSTEM INFO
 
Operating System: Fedora Linux 40
KDE Plasma Version: 6.0.80
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.8.0-0.rc6.49.fc40.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 15.5 GiB of RAM
Graphics Processor: AMD Radeon RX 6600

Dolphin version: dolphin 24.04.70

BACKTRACE

Core was generated by `/home/akseli/Repositories/kde/usr/bin/dolphin'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=11, no_tid=no_tid@entry=0)
    at pthread_kill.c:44
Downloading source file /usr/src/debug/glibc-2.39-2.fc40.x86_64/nptl/pthread_kill.c
44            return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0;                       
[Current thread is 1 (Thread 0x7f1a0efa8b00 (LWP 14670))]
(gdb) bt
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=11, no_tid=no_tid@entry=0)
    at pthread_kill.c:44
#1  0x00007f1a13eab1f3 in __pthread_kill_internal (signo=11, threadid=<optimized out>) at pthread_kill.c:78
#2  0x00007f1a13e5365e in __GI_raise (sig=11) at ../sysdeps/posix/raise.c:26
#3  0x00007f1a18ad6f2c in KCrash::defaultCrashHandler (sig=11)
    at /home/akseli/Repositories/kde/src/kcrash/src/kcrash.cpp:586
#4  0x00007f1a13e53710 in <signal handler called> () at /lib64/libc.so.6
#5  0x00007f1a1592d67d in QArrayDataPointer<char16_t>::QArrayDataPointer
    (this=<optimized out>, other=<optimized out>)
    at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/corelib/tools/qarraydatapointer.h:38
#6  QString::QString (this=<optimized out>, other=<optimized out>)
    at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/corelib/text/qstring.h:1107
#7  QWidgetLineControl::text (this=0x1c0000004c0)
    at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/widgets/widgets/qwidgetlinecontrol_p.h:210
#8  0x00007f1a15927b9d in QLineEdit::text (this=<optimized out>)
    at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/widgets/widgets/qlineedit.cpp:288
#9  0x00007f1a1852aa59 in KNewFileMenuPrivate::_k_delayedSlotTextChanged (this=0x2767ca0)
    at /home/akseli/Repositories/kde/src/kio/src/filewidgets/knewfilemenu.cpp:1121
#10 0x00007f1a1852cc59 in operator() (__closure=0x301b540)
    at /home/akseli/Repositories/kde/src/kio/src/filewidgets/knewfilemenu.cpp:1443
#11 0x00007f1a18532294 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, KNewFileMenuPrivate::showNewDirNameDlg(const QString&)::<lambda()> >::call(struct {...} &, void **)
    (f=..., arg=0x7ffc36b95270) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:137
#12 0x00007f1a18531acb in QtPrivate::Functor<KNewFileMenuPrivate::showNewDirNameDlg(const QString&)::<lambda()>, 0>::call<QtPrivate::List<>, void>(struct {...} &, void *, void **) (f=..., arg=0x7ffc36b95270)
    at /usr/include/qt6/QtCore/qobjectdefs_impl.h:339
#13 0x00007f1a1853105a in QtPrivate::QCallableObject<KNewFileMenuPrivate::showNewDirNameDlg(const QString&)::<lambda()>, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *)
    (which=1, this_=0x301b530, r=0x2716270, a=0x7ffc36b95270, ret=0x0)
    at /usr/include/qt6/QtCore/qobjectdefs_impl.h:522
#14 0x00007f1a145f2684 in QtPrivate::QSlotObjectBase::call
    (this=0x301b530, r=<optimized out>, a=0x7ffc36b95270)
    at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/corelib/kernel/qobjectdefs_impl.h:433
#15 doActivate<false> (sender=0x2d86400, signal_index=7, argv=0x7ffc36b95270)
--Type <RET> for more, q to quit, c to continue without paging--c
    at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/corelib/kernel/qobject.cpp:4039
#16 0x00007f1a145e8fd7 in QMetaObject::activate
    (sender=<optimized out>, m=m@entry=0x7f1a15d4c620, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7ffc36b95270) at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/corelib/kernel/qobject.cpp:4099
#17 0x00007f1a15925e59 in QLineEdit::textChanged (this=<optimized out>, _t1=<optimized out>)
    at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/redhat-linux-build/src/widgets/Widgets_autogen/include/moc_qlineedit.cpp:697
#18 0x00007f1a145f2a24 in doActivate<false> (sender=0x2d28010, signal_index=6, argv=0x7ffc36b95380)
    at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/corelib/kernel/qobject.cpp:4051
#19 0x00007f1a145e8fd7 in QMetaObject::activate
    (sender=sender@entry=0x2d28010, m=m@entry=0x7f1a15d4cc80 <QWidgetLineControl::staticMetaObject>, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x7ffc36b95380)
    at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/corelib/kernel/qobject.cpp:4099
#20 0x00007f1a159308ac in QWidgetLineControl::textChanged (this=this@entry=0x2d28010, _t1=...)
    at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/redhat-linux-build/src/widgets/Widgets_autogen/include/moc_qwidgetlinecontrol_p.cpp:361
#21 0x00007f1a15933af7 in QWidgetLineControl::finishChange
    (this=0x2d28010, validateFromState=0, update=update@entry=false, edited=edited@entry=true)
    at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/widgets/widgets/qwidgetlinecontrol.cpp:713
#22 0x00007f1a1593594a in QWidgetLineControl::insert (this=<optimized out>, newText=<optimized out>)
    at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/widgets/widgets/qwidgetlinecontrol.cpp:232
#23 0x00007f1a15936d7a in QWidgetLineControl::processKeyEvent
    (this=0x2d28010, event=event@entry=0x7ffc36b95990)
    at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/corelib/tools/qarraydata.h:53
#24 0x00007f1a15925dcf in QLineEdit::keyPressEvent (this=<optimized out>, event=0x7ffc36b95990)
    at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/widgets/widgets/qlineedit.cpp:1757
#25 0x00007f1a157e5b08 in QWidget::event (this=0x2d86400, event=0x7ffc36b95990)
    at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/widgets/kernel/qwidget.cpp:8992
#26 0x00007f1a15787f68 in QApplicationPrivate::notify_helper
    (this=this@entry=0x21db450, receiver=receiver@entry=0x2d86400, e=e@entry=0x7ffc36b95990)
    at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/widgets/kernel/qapplication.cpp:3296
#27 0x00007f1a15792ebc in QApplication::notify
    (this=0x7ffc36b95e80, receiver=<optimized out>, e=<optimized out>)
    at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/widgets/kernel/qapplication.cpp:2723
#28 0x00007f1a1458f218 in QCoreApplication::notifyInternal2 (receiver=0x2d86400, event=0x7ffc36b95990)
    at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/corelib/kernel/qcoreapplication.cpp:1121
#29 0x00007f1a1458f24a in QCoreApplication::forwardEvent
    (receiver=<optimized out>, event=<optimized out>, originatingEvent=<optimized out>)
    at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/corelib/kernel/qcoreapplication.cpp:1136
#30 0x00007f1a157fb270 in QWidgetWindow::event (this=0x3027470, event=0x7ffc36b95990)
    at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/widgets/kernel/qwidgetwindow.cpp:260
#31 0x00007f1a15787f68 in QApplicationPrivate::notify_helper
    (this=<optimized out>, receiver=0x3027470, e=0x7ffc36b95990)
    at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/widgets/kernel/qapplication.cpp:3296
#32 0x00007f1a1458f218 in QCoreApplication::notifyInternal2 (receiver=0x3027470, event=0x7ffc36b95990)
    at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/corelib/kernel/qcoreapplication.cpp:1121
#33 0x00007f1a1458f43d in QCoreApplication::sendSpontaneousEvent
    (receiver=<optimized out>, event=<optimized out>)
    at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/corelib/kernel/qcoreapplication.cpp:1553
#34 0x00007f1a14de04eb in QGuiApplicationPrivate::processKeyEvent (e=0x3015fa0)
    at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/gui/kernel/qguiapplication.cpp:2451
#35 0x00007f1a14e455fc in QWindowSystemInterface::sendWindowSystemEvents (flags=...)
    at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/gui/kernel/qwindowsysteminterface.cpp:1109
#36 0x00007f1a153408e4 in userEventSourceDispatch (source=<optimized out>)
    at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/gui/platform/unix/qeventdispatcher_glib.cpp:38
#37 0x00007f1a1270f26c in g_main_dispatch (context=0x7f19fc000f00) at ../glib/gmain.c:3344
#38 g_main_context_dispatch_unlocked (context=0x7f19fc000f00) at ../glib/gmain.c:4152
#39 0x00007f1a127702a8 in g_main_context_iterate_unlocked.isra.0
    (context=context@entry=0x7f19fc000f00, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4217
#40 0x00007f1a127106e3 in g_main_context_iteration (context=0x7f19fc000f00, may_block=1)
    at ../glib/gmain.c:4282
#41 0x00007f1a14866de3 in QEventDispatcherGlib::processEvents (this=0x2232760, flags=...)
    at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/corelib/kernel/qeventdispatcher_glib.cpp:393
#42 0x00007f1a1459c053 in QEventLoop::exec (this=this@entry=0x7ffc36b95cd0, flags=..., flags@entry=...)
    at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/corelib/global/qflags.h:34
#43 0x00007f1a14597ffc in QCoreApplication::exec ()
    at /usr/src/debug/qt6-qtbase-6.6.2-1.fc40.x86_64/src/corelib/global/qflags.h:74
#44 0x00000000004408f8 in main (argc=1, argv=0x7ffc36b97238)
    at /home/akseli/Repositories/kde/src/dolphin/src/main.cpp:255
Comment 10 Akseli Lahtinen 2024-03-11 13:04:50 UTC
Exploring this further, the problem seems to be that in network folders, two menus are opened in the first place, even if one should be opened.

In normal folders if user tries to open new folder dialog multiple times, only one is shown.
Comment 11 Bug Janitor Service 2024-03-18 16:13:10 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/1584
Comment 12 Bug Janitor Service 2024-03-25 15:27:13 UTC
A possibly relevant merge request was started @ https://invent.kde.org/system/dolphin/-/merge_requests/747
Comment 13 Felix Ernst 2024-05-11 15:59:06 UTC
Git commit 742566eb69e6bf46e7abb74e9ce9293c4b3ed7e8 by Felix Ernst, on behalf of Akseli Lahtinen.
Committed on 11/05/2024 at 15:59.
Pushed by felixernst into branch 'master'.

Check if namejob is already being run before opening new createDirectory dialog

This is a fix for a bug where in network views (or otherwise slow
systems), pressing `Ctrl+Shift+N` multiple times opens multiple popup
windows and thus causes a crash when any of the popups is interacted
with after closing the topmost one. The problem is not the crash with
popups themselves, but that we're opening multiple popups in the first
place.

In regular views this works fine, since the `nameJob` does not take
long time at all and only one popup opens, immediately blocking the
shortcut.

In network views, the `nameJob` seems to take a while to run, since it
is loading info from network. If user spams `Ctrl+Shift+N` shortcut in
frustration, it starts more `nameJob`s and eventually when those jobs
are done, it opens multiple popups.

This code checks that if we're already running a `namejob`, we're very
likely waiting for the `createDir` popup to appear, so we don't do
anything until there is no more `nameJob` running. 

I've tested that it works in both network and regular Dolphin views.

M  +1    -1    CMakeLists.txt
M  +8    -2    src/dolphinmainwindow.cpp

https://invent.kde.org/system/dolphin/-/commit/742566eb69e6bf46e7abb74e9ce9293c4b3ed7e8