Bug 458709 - [bug]: the closed file manager window crashes when copying
Summary: [bug]: the closed file manager window crashes when copying
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 21.12.3
Platform: ROSA RPMs Linux
: HI normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
: 452686 454133 456223 458111 458570 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-09-04 19:17 UTC by Nikolaj
Modified: 2023-04-23 12:00 UTC (History)
9 users (show)

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


Attachments
debugging (6.62 KB, text/plain)
2022-09-04 19:17 UTC, Nikolaj
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nikolaj 2022-09-04 19:17:53 UTC
Created attachment 151818 [details]
debugging

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***
the essence of the problem is that after caching-copying, during the copying process itself, the file manager crashes.
I have only tried copying with already existing files in the copy location. But I haven't tried with pure copying, although there may be a bug only in this version of events.


STEPS TO REPRODUCE
1. I start copying (there is a caching process from the WebDAV cloud)
2. closing the file manager
3. the copying process begins

OBSERVED RESULT
file manager crashes

EXPECTED RESULT
if there are duplicates, a window with a question about the action should come out.

SOFTWARE/OS VERSIONS
Operating System: ROSA Fresh Desktop 2021.1
KDE Plasma Version: 5.24.5
KDE Framework Version:
5.92.0 Qt Version: 5.15.2
Kernel version: 5.15.43-generic-2rosa2021.1-x86_64 (64-bit)
Graphics Platform: X11
Processors: 6 ? AMD FX(tm)-6300 six-core processor
Memory: 7.7 GiB RAM
GPU: NVC1
nikolanp@rosa2021 ~> rpm -qa | grep dolphin
lib64dolphinvcs5-21.12.3-1.x86_64
lib64dolphinprivate5-21.12.3-1.x86_64
plasma5-dolphin-21.12.3-1.x86_64
nikolanp@rosa2021 ~>
ADDITIONAL INFORMATION
Comment 1 Nicolas Fella 2022-09-04 23:00:40 UTC
Thread 1 (Thread 0x7fec4d8039c0 (LWP 2729)):
[KCrash Handler]
#4  0x00007fec4c7e7c62 in QWidget::setParent(QWidget*, QFlags<Qt::WindowType>) () from /usr/lib64/libQt5Widgets.so.5
#5  0x00007fec4c7e8016 in QWidgetPrivate::init(QWidget*, QFlags<Qt::WindowType>) () from /usr/lib64/libQt5Widgets.so.5
#6  0x00007fec4c9ae62f in QDialog::QDialog(QWidget*, QFlags<Qt::WindowType>) () from /usr/lib64/libQt5Widgets.so.5
#7  0x00007fec4dd3f777 in KIO::RenameDialog::RenameDialog(QWidget*, QString const&, QUrl const&, QUrl const&, QFlags<KIO::RenameDialog_Option>, unsigned long long, unsigned long long, QDateTime const&, QDateTime const&, QDateTime const&, QDateTime const&) () from /usr/lib64/libKF5KIOWidgets.so.5
#8  0x00007fec4dd5108b in KIO::WidgetsAskUserActionHandler::askUserRename(KJob*, QString const&, QUrl const&, QUrl const&, QFlags<KIO::RenameDialog_Option>, unsigned long long, unsigned long long, QDateTime const&, QDateTime const&, QDateTime const&, QDateTime const&) () from /usr/lib64/libKF5KIOWidgets.so.5
#9  0x00007fec4d9f8b54 in KIO::CopyJobPrivate::slotResultConflictCreatingDirs(KJob*) () from /usr/lib64/libKF5KIOCore.so.5
#10 0x00007fec4bc8ae8f in ?? () from /usr/lib64/libQt5Core.so.5
#11 0x00007fec4cde12cc in KJob::result(KJob*, KJob::QPrivateSignal) () from /usr/lib64/libKF5CoreAddons.so.5
#12 0x00007fec4cde276b in KJob::finishJob(bool) () from /usr/lib64/libKF5CoreAddons.so.5
#13 0x00007fec4bc8ae8f in ?? () from /usr/lib64/libQt5Core.so.5
#14 0x00007fec4da29cf3 in KIO::SlaveInterface::dispatch(int, QByteArray const&) () from /usr/lib64/libKF5KIOCore.so.5
#15 0x00007fec4da28359 in KIO::SlaveInterface::dispatch() () from /usr/lib64/libKF5KIOCore.so.5
#16 0x00007fec4da2c9ca in KIO::Slave::gotInput() () from /usr/lib64/libKF5KIOCore.so.5
#17 0x00007fec4bc8ae8f in ?? () from /usr/lib64/libQt5Core.so.5
#18 0x00007fec4bc830cf in QObject::event(QEvent*) () from /usr/lib64/libQt5Core.so.5
#19 0x00007fec4c7a4a5f in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#20 0x00007fec4bc58878 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
#21 0x00007fec4bc5bd5e in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib64/libQt5Core.so.5
#22 0x00007fec4bca9003 in ?? () from /usr/lib64/libQt5Core.so.5
#23 0x00007fec4960bd2b in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#24 0x00007fec4960bfd8 in g_main_context_iterate.constprop () from /usr/lib64/libglib-2.0.so.0
#25 0x00007fec4960c08f in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#26 0x00007fec4bca8ab4 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#27 0x00007fec4bc5730b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#28 0x00007fec4bc5f640 in QCoreApplication::exec() () from /usr/lib64/libQt5Core.so.5
#29 0x0000000000448028 in main ()
Comment 2 Nicolas Fella 2022-09-04 23:10:24 UTC

*** This bug has been marked as a duplicate of bug 456223 ***
Comment 3 Nate Graham 2022-09-12 18:18:37 UTC

*** This bug has been marked as a duplicate of bug 364039 ***
Comment 4 Ahmad Samir 2022-09-12 18:39:32 UTC
*** Bug 458111 has been marked as a duplicate of this bug. ***
Comment 5 Ahmad Samir 2022-09-12 18:40:39 UTC
*** Bug 456223 has been marked as a duplicate of this bug. ***
Comment 6 Ahmad Samir 2022-09-12 18:42:53 UTC
postix posted a complete backtrace at https://bugs.kde.org/show_bug.cgi?id=364039#c84


Operating System: openSUSE Tumbleweed 20220525
KDE Plasma Version: 5.24.5
KDE Frameworks Version: 5.94.0
Qt Version: 5.15.2
Kernel Version: 5.17.9-1-default (64-bit)
Graphics Platform: Wayland


```
#0  0x00007f0f092846ac in __pthread_kill_implementation () from /lib64/libc.so.6
#1  0x00007f0f092316f6 in raise () from /lib64/libc.so.6
#2  0x00007f0f0b2b9d7e in KCrash::defaultCrashHandler (sig=11) at /usr/src/debug/kcrash-5.94.0-1.1.x86_64/src/kcrash.cpp:633
#3  <signal handler called>
#4  QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> >::operator-> (this=0x8) at ../../include/QtCore/../../src/corelib/tools/qscopedpointer.h:116
#5  qGetPtrHelper<QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> > > (ptr=...) at ../../include/QtCore/../../src/corelib/global/qglobal.h:1143
#6  QWidget::d_func (this=0x0) at kernel/qwidget.h:132
#7  QWidgetPrivate::createWinId (this=<optimized out>) at kernel/qwidget.cpp:2371
#8  0x00007f0f0a5bdf79 in QWidget::createWinId (this=<optimized out>) at kernel/qwidget.cpp:2442
#9  0x00007f0f0a5bbbd0 in QWidget::create (this=0x564ddc1b3f00, window=<optimized out>, initializeWindow=<optimized out>, destroyOldWindow=<optimized out>) at kernel/qwidget.cpp:1149
#10 0x00007f0f0a5c899a in QWidgetPrivate::setVisible (this=0x564ddc020db0, visible=<optimized out>) at kernel/qwidget.cpp:8063
#11 0x00007f0f0a5c8d92 in QWidget::setVisible (this=this@entry=0x564ddc1b3f00, visible=visible@entry=true) at kernel/qwidget.cpp:8044
#12 0x00007f0f0a78fb95 in QDialog::setVisible (this=0x564ddc1b3f00, visible=<optimized out>) at dialogs/qdialog.cpp:787
#13 0x00007f0f0b335dda in KIO::CopyJobPrivate::slotResultErrorCopyingFiles (this=<optimized out>, job=0x564dda63dd60) at /usr/src/debug/kio-5.94.0-1.1.x86_64/src/core/copyjob.cpp:1769
#14 0x00007f0f09949def in QtPrivate::QSlotObjectBase::call (a=0x7ffd4c6f7b20, r=0x564ddc0c4920, this=0x564dda659950) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#15 doActivate<false> (sender=0x564dda63dd60, signal_index=6, argv=0x7ffd4c6f7b20) at kernel/qobject.cpp:3886
#16 0x00007f0f099430cf in QMetaObject::activate (sender=sender@entry=0x564dda63dd60, m=<optimized out>, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x7ffd4c6f7b20) at kernel/qobject.cpp:3946
#17 0x00007f0f0ab97785 in KJob::result (this=this@entry=0x564dda63dd60, _t1=<optimized out>, _t1@entry=0x564dda63dd60, _t2=...) at /usr/src/debug/kcoreaddons-5.94.0-1.1.x86_64/build/src/lib/KF5CoreAddons_autogen/include/moc_kjob.cpp:633
#18 0x00007f0f0ab9b8eb in KJob::finishJob (this=0x564dda63dd60, emitResult=<optimized out>) at /usr/src/debug/kcoreaddons-5.94.0-1.1.x86_64/src/lib/jobs/kjob.cpp:98
#19 0x00007f0f09949def in QtPrivate::QSlotObjectBase::call (a=0x7ffd4c6f7c40, r=0x564dda63dd60, this=0x564ddb3e85a0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#20 doActivate<false> (sender=0x564ddb3bd9a0, signal_index=6, argv=0x7ffd4c6f7c40) at kernel/qobject.cpp:3886
#21 0x00007f0f099430cf in QMetaObject::activate (sender=sender@entry=0x564ddb3bd9a0, m=<optimized out>, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x7ffd4c6f7c40) at kernel/qobject.cpp:3946
#22 0x00007f0f0ab97785 in KJob::result (this=this@entry=0x564ddb3bd9a0, _t1=<optimized out>, _t1@entry=0x564ddb3bd9a0, _t2=...) at /usr/src/debug/kcoreaddons-5.94.0-1.1.x86_64/build/src/lib/KF5CoreAddons_autogen/include/moc_kjob.cpp:633
#23 0x00007f0f0ab9b8eb in KJob::finishJob (this=0x564ddb3bd9a0, emitResult=<optimized out>) at /usr/src/debug/kcoreaddons-5.94.0-1.1.x86_64/src/lib/jobs/kjob.cpp:98
#24 0x00007f0f09949def in QtPrivate::QSlotObjectBase::call (a=0x7ffd4c6f7d60, r=0x564ddb3bd9a0, this=0x564ddc0b7f80) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#25 doActivate<false> (sender=0x564ddc06c610, signal_index=5, argv=0x7ffd4c6f7d60) at kernel/qobject.cpp:3886
#26 0x00007f0f099430cf in QMetaObject::activate (sender=sender@entry=0x564ddc06c610, m=<optimized out>, local_signal_index=local_signal_index@entry=2, argv=argv@entry=0x7ffd4c6f7d60) at kernel/qobject.cpp:3946
#27 0x00007f0f0b34f056 in KIO::SlaveInterface::error (this=this@entry=0x564ddc06c610, _t1=<optimized out>, _t2=...) at /usr/src/debug/kio-5.94.0-1.1.x86_64/build/src/core/KF5KIOCore_autogen/include/moc_slaveinterface.cpp:452
#28 0x00007f0f0b355f88 in KIO::SlaveInterface::dispatch (this=0x564ddc06c610, _cmd=102, rawdata=...) at /usr/src/debug/kio-5.94.0-1.1.x86_64/src/core/slaveinterface.cpp:181
#29 0x00007f0f0b34ef06 in KIO::SlaveInterface::dispatch (this=0x564ddc06c610) at /usr/src/debug/kio-5.94.0-1.1.x86_64/src/core/slaveinterface.cpp:78
#30 0x00007f0f0b3528b9 in KIO::Slave::gotInput (this=0x564ddc06c610) at /usr/src/debug/kio-5.94.0-1.1.x86_64/src/core/slave.cpp:336
#31 0x00007f0f09949def in QtPrivate::QSlotObjectBase::call (a=0x7ffd4c6f7f70, r=0x564ddc06c610, this=0x564ddc0c59f0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#32 doActivate<false> (sender=0x564ddc09ab80, signal_index=3, argv=0x7ffd4c6f7f70) at kernel/qobject.cpp:3886
#33 0x00007f0f0993e660 in QObject::event (this=0x564ddc09ab80, e=0x564ddbe54a90) at kernel/qobject.cpp:1314
#34 0x00007f0f0a58737e in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x564ddc09ab80, e=0x564ddbe54a90) at kernel/qapplication.cpp:3632
#35 0x00007f0f09912988 in QCoreApplication::notifyInternal2 (receiver=0x564ddc09ab80, event=0x564ddbe54a90) at kernel/qcoreapplication.cpp:1064
#36 0x00007f0f09915921 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x564dda3eba40) at kernel/qcoreapplication.cpp:1821
#37 0x00007f0f0996aec3 in postEventSourceDispatch (s=0x564dda44edd0) at kernel/qeventdispatcher_glib.cpp:277
#38 0x00007f0f07438da0 in g_main_dispatch (context=0x564dda459c00) at ../glib/gmain.c:3417
#39 g_main_context_dispatch (context=0x564dda459c00) at ../glib/gmain.c:4135
#40 0x00007f0f07439158 in g_main_context_iterate (context=context@entry=0x564dda459c00, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4211
#41 0x00007f0f074391ec in g_main_context_iteration (context=0x564dda459c00, may_block=1) at ../glib/gmain.c:4276
#42 0x00007f0f0996a5a6 in QEventDispatcherGlib::processEvents (this=0x564dda45e0e0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#43 0x00007f0f099113fb in QEventLoop::exec (this=this@entry=0x7ffd4c6f8360, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#44 0x00007f0f09919566 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#45 0x00007f0f09e2c3bc in QGuiApplication::exec () at kernel/qguiapplication.cpp:1867
#46 0x00007f0f0a5872f5 in QApplication::exec () at kernel/qapplication.cpp:2824
#47 0x0000564dd855a212 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/dolphin-22.04.1-1.1.x86_64/src/main.cpp:217
```
Comment 7 Ahmad Samir 2022-09-12 18:44:54 UTC
*** Bug 454133 has been marked as a duplicate of this bug. ***
Comment 8 Ahmad Samir 2022-09-12 18:45:22 UTC
*** Bug 458570 has been marked as a duplicate of this bug. ***
Comment 9 Ahmad Samir 2022-09-16 16:42:02 UTC
The backtrace in comment#6 looks slightly different than the one from comment#0, could be two separate issues... the problem is the backtrace from comment#0 is not complete due to missing debug symbols.

I tried reproducing this issue, and it happened 1-2 times, but I failed to make crash again.

This *might* be related: https://invent.kde.org/frameworks/kio/-/merge_requests/977 (it makes sense to parent the widgets to the dialog, not to its parent anyway). The question is, why is this happening only now when this code has been around for ages?
Comment 10 Nikolaj 2022-09-17 04:59:36 UTC
blocked the change.
Comment 11 postix 2022-10-18 17:34:00 UTC
*** Bug 452686 has been marked as a duplicate of this bug. ***
Comment 12 Fushan Wen 2023-04-22 09:28:05 UTC
Git commit ac2a594a654a3821e94b34be92d534608b9837a1 by Fushan Wen.
Committed on 22/04/2023 at 09:09.
Pushed by fusionfuture into branch 'master'.

WidgetsAskUserActionHandler: make sure all dialogs are created in the main thread

In Qt, the GUI runs in its own thread and must be accessed from the
main thread. If QWidget is created in a non-main thread, we can use
the QMetaObject::invokeMethod() method to create it in the main thread.
Related: bug 364039
FIXED-IN: 5.106

M  +127  -172  src/widgets/widgetsaskuseractionhandler.cpp

https://invent.kde.org/frameworks/kio/commit/ac2a594a654a3821e94b34be92d534608b9837a1
Comment 13 Fushan Wen 2023-04-23 12:00:48 UTC
Git commit 214dc24fa331dde345a69ca25f90dda20874ab2b by Fushan Wen.
Committed on 23/04/2023 at 08:29.
Pushed by fusionfuture into branch 'kf5'.

WidgetsAskUserActionHandler: make sure all dialogs are created in the main thread

In Qt, the GUI runs in its own thread and must be accessed from the
main thread. If QWidget is created in a non-main thread, we can use
the QMetaObject::invokeMethod() method to create it in the main thread.
Related: bug 364039
FIXED-IN: 5.106
(cherry picked from commit ac2a594a654a3821e94b34be92d534608b9837a1)

M  +127  -172  src/widgets/widgetsaskuseractionhandler.cpp

https://invent.kde.org/frameworks/kio/commit/214dc24fa331dde345a69ca25f90dda20874ab2b