Bug 448532

Summary: Dolphin crashed while copying files to external hard drive
Product: [Applications] dolphin Reporter: Bae Hyeon Woo <qogusdn1017>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: 1i5t5.duncan, akselmo, bugsnmd, diwa867, epost.kde, jst4ne, kfm-devel, mattia.mari, meven29, mhamati, nate, seby.trello, TheShrekk, vaughan.m.johnston, xunilhcra
Priority: VHI Keywords: drkonqi
Version: 21.12.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 5.114
Sentry Crash Report:

Description Bae Hyeon Woo 2022-01-15 16:04:41 UTC
Application: dolphin (21.12.1)

Qt Version: 5.15.2
Frameworks Version: 5.90.0
Operating System: Linux 5.16.0-arch1-1 x86_64
Windowing System: X11
Distribution: "Arch Linux"
DrKonqi: 5.23.5 [KCrashBackend]

-- Information about the crash:
- What I was doing when the application crashed: Copying files from NTFS Partitioned disk(Windows) to exFAT Partitioned disk(External Hard Drive)

The reporter is unsure if this crash is reproducible.

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

[KCrash Handler]
#4  0x00007f702d52fa2f in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#5  0x00007f702dfa4195 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#6  0x00007f702d5309ba in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#7  0x00007f702dfdb4f9 in QWidget::setParent(QWidget*, QFlags<Qt::WindowType>) () from /usr/lib/libQt5Widgets.so.5
#8  0x00007f702dfc7eca in QWidgetPrivate::init(QWidget*, QFlags<Qt::WindowType>) () from /usr/lib/libQt5Widgets.so.5
#9  0x00007f702e19d8c6 in QDialog::QDialog(QWidget*, QFlags<Qt::WindowType>) () from /usr/lib/libQt5Widgets.so.5
#10 0x00007f702f0ac496 in KIO::SkipDialog::SkipDialog(QWidget*, QFlags<KIO::SkipDialog_Option>, QString const&) () from /usr/lib/libKF5KIOWidgets.so.5
#11 0x00007f702f0b7364 in KIO::WidgetsAskUserActionHandler::askUserSkip(KJob*, QFlags<KIO::SkipDialog_Option>, QString const&) () from /usr/lib/libKF5KIOWidgets.so.5
#12 0x00007f702ee42a4a in ?? () from /usr/lib/libKF5KIOCore.so.5
#13 0x00007f702d5615d3 in ?? () from /usr/lib/libQt5Core.so.5
#14 0x00007f702e6deca1 in KJob::result(KJob*, KJob::QPrivateSignal) () from /usr/lib/libKF5CoreAddons.so.5
#15 0x00007f702e6e340c in KJob::finishJob(bool) () from /usr/lib/libKF5CoreAddons.so.5
#16 0x00007f702d5615d3 in ?? () from /usr/lib/libQt5Core.so.5
#17 0x00007f702e6deca1 in KJob::result(KJob*, KJob::QPrivateSignal) () from /usr/lib/libKF5CoreAddons.so.5
#18 0x00007f702e6e340c in KJob::finishJob(bool) () from /usr/lib/libKF5CoreAddons.so.5
#19 0x00007f702d5615d3 in ?? () from /usr/lib/libQt5Core.so.5
#20 0x00007f702ee5ca1b in KIO::SlaveInterface::error(int, QString const&) () from /usr/lib/libKF5KIOCore.so.5
#21 0x00007f702ee6373f in KIO::SlaveInterface::dispatch(int, QByteArray const&) () from /usr/lib/libKF5KIOCore.so.5
#22 0x00007f702ee5c88d in KIO::SlaveInterface::dispatch() () from /usr/lib/libKF5KIOCore.so.5
#23 0x00007f702ee60283 in KIO::Slave::gotInput() () from /usr/lib/libKF5KIOCore.so.5
#24 0x00007f702d5615d3 in ?? () from /usr/lib/libQt5Core.so.5
#25 0x00007f702d5546c6 in QObject::event(QEvent*) () from /usr/lib/libQt5Core.so.5
#26 0x00007f702dfa41a6 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#27 0x00007f702d5309ba in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#28 0x00007f702d5314b9 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQt5Core.so.5
#29 0x00007f702d577d88 in ?? () from /usr/lib/libQt5Core.so.5
#30 0x00007f702b1cdfd3 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#31 0x00007f702b224049 in ?? () from /usr/lib/libglib-2.0.so.0
#32 0x00007f702b1cb545 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#33 0x00007f702d57bc8a in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#34 0x00007f702d528bab in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#35 0x00007f702d5343e7 in QCoreApplication::exec() () from /usr/lib/libQt5Core.so.5
#36 0x000055f022a1b1b1 in ?? ()
#37 0x00007f702ceeab25 in __libc_start_main () from /usr/lib/libc.so.6
#38 0x000055f022a1b98e in ?? ()
[Inferior 1 (process 63887) detached]

Possible duplicates by query: bug 448347, bug 448047, bug 448018, bug 447907, bug 447799.

Reported using DrKonqi
Comment 1 Nicolas Fella 2022-09-04 23:06:43 UTC
*** Bug 454593 has been marked as a duplicate of this bug. ***
Comment 2 Nicolas Fella 2022-09-04 23:07:00 UTC
*** Bug 451566 has been marked as a duplicate of this bug. ***
Comment 3 Nicolas Fella 2022-09-04 23:08:41 UTC
*** Bug 457856 has been marked as a duplicate of this bug. ***
Comment 4 Akseli Lahtinen 2023-11-27 10:41:03 UTC
*** Bug 474872 has been marked as a duplicate of this bug. ***
Comment 5 Akseli Lahtinen 2023-11-27 10:41:31 UTC
*** Bug 457313 has been marked as a duplicate of this bug. ***
Comment 6 Akseli Lahtinen 2023-11-27 10:41:40 UTC
*** Bug 464248 has been marked as a duplicate of this bug. ***
Comment 7 Akseli Lahtinen 2023-11-27 10:42:13 UTC
Some discussion in here https://bugs.kde.org/show_bug.cgi?id=457313
Comment 8 Nate Graham 2023-11-28 15:19:11 UTC
*** Bug 468345 has been marked as a duplicate of this bug. ***
Comment 9 Akseli Lahtinen 2023-11-29 08:16:29 UTC
*** Bug 476022 has been marked as a duplicate of this bug. ***
Comment 10 Akseli Lahtinen 2023-11-29 08:24:52 UTC
*** Bug 474409 has been marked as a duplicate of this bug. ***
Comment 11 Akseli Lahtinen 2023-11-29 12:38:52 UTC
Managed to reproduce the bug:

1. In target device, create file named file500
2. Copy a lot of files to the target device, including ones that are not in the target device, say files named file1 to file500
3. Close dolphin while its copying
4. Wait til the last file, file500 is asking to be overwritten
5. Crash happens when the overwrite window cant open
Comment 12 Akseli Lahtinen 2023-11-29 12:46:50 UTC
(In reply to Akseli Lahtinen from comment #11)
> Managed to reproduce the bug:
> 
> 1. In target device, create file named file500
> 2. Copy a lot of files to the target device, including ones that are not in
> the target device, say files named file1 to file500
> 3. Close dolphin while its copying
> 4. Wait til the last file, file500 is asking to be overwritten
> 5. Crash happens when the overwrite window cant open

To clarify, the files from 1-499 should not overwrite anything.

The bug happens because something tries to spawn the overwrite window through dolphin, but dolphin window is closed.
Comment 13 Akseli Lahtinen 2023-11-29 12:53:07 UTC
Backtrace copy-paste from gdb

Thread 1 "dolphin" received signal SIGSEGV, Segmentation fault.
0x00007ffff4c04cd8 in std::__uniq_ptr_impl<QWExtra, std::default_delete<QWExtra> >::_M_ptr (
    this=0x99) at /usr/include/c++/13/bits/unique_ptr.h:199
199           pointer    _M_ptr() const noexcept { return std::get<0>(_M_t); }
(gdb) bt
#0  0x00007ffff4c04cd8 in std::__uniq_ptr_impl<QWExtra, std::default_delete<QWExtra> >::_M_ptr() const (this=0x99) at /usr/include/c++/13/bits/unique_ptr.h:199
#1  std::unique_ptr<QWExtra, std::default_delete<QWExtra> >::get() const (this=0x99)
    at /usr/include/c++/13/bits/unique_ptr.h:470
#2  std::unique_ptr<QWExtra, std::default_delete<QWExtra> >::operator bool() const (this=0x99)
    at /usr/include/c++/13/bits/unique_ptr.h:487
#3  QWidget::focusProxy() const (this=this@entry=0x1604be0)
    at /usr/src/debug/qt6-qtbase-6.6.0-6.fc39.x86_64/src/widgets/kernel/qwidget.cpp:6461
#4  0x00007ffff4c10f23 in QWidgetPrivate::effectiveFocusWidget()
    (this=0x7ffff33f6b20 <main_arena+96>)
    at /usr/src/debug/qt6-qtbase-6.6.0-6.fc39.x86_64/redhat-linux-build/include/QtWidgets/6.6.0/QtWidgets/private/../../../../../../src/widgets/kernel/qwidget_p.h:436
#5  QWidget::setAttribute(Qt::WidgetAttribute, bool)
    (this=0x7ffff33f6b30 <main_arena+112>, attribute=<optimized out>, on=true)
    at /usr/src/debug/qt6-qtbase-6.6.0-6.fc39.x86_64/src/widgets/kernel/qwidget.cpp:11374
#6  0x00007ffff4c10a1c in QWidgetPrivate::createWinId() (this=<optimized out>)
    at /usr/src/debug/qt6-qtbase-6.6.0-6.fc39.x86_64/src/widgets/kernel/qwidget.cpp:2393
#7  0x00007ffff4c12bbd in QWidget::createWinId() (this=<optimized out>)
    at /usr/src/debug/qt6-qtbase-6.6.0-6.fc39.x86_64/src/widgets/kernel/qwidget.cpp:2457
#8  0x00007ffff4c10800 in QWidget::create(unsigned long long, bool, bool)
    (this=0x117af40, window=<optimized out>, initializeWindow=<optimized out>, destroyOldWindow=<optimized out>) at /usr/src/debug/qt6-qtbase-6.6.0-6.fc39.x86_64/src/widgets/kernel/qwidget.cpp:1154
#9  0x00007ffff4c1ddc5 in QWidgetPrivate::setVisible(bool)
    (this=0x10b5a30, visible=<optimized out>)
    at /usr/src/debug/qt6-qtbase-6.6.0-6.fc39.x86_64/src/widgets/kernel/qwidget.cpp:8377
#10 0x00007ffff4c1e1db in QWidget::setVisible(bool) (visible=<optimized out>, this=0x117af40)
    at /usr/src/debug/qt6-qtbase-6.6.0-6.fc39.x86_64/src/widgets/kernel/qwidget.cpp:8358
#11 0x00007ffff4e39bc1 in QDialogPrivate::setVisible(bool) (this=0x10b5a30, visible=true)
    at /usr/src/debug/qt6-qtbase-6.6.0-6.fc39.x86_64/src/widgets/dialogs/qdialog.cpp:770
#12 0x00007ffff74e6855 in operator()() const (__closure=0x93d420)
    at /home/akseli/Repositories/kde/src/kio/src/widgets/widgetsaskuseractionhandler.cpp:158
#13 0x00007ffff74ec09e in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, KIO::WidgetsAskUserActionHandler::askUserRename(KJob*, const QString&, const QUrl&, const QUrl&, KIO::RenameDialog_Options, KIO::filesize_t, KIO::filesize_t, const QDateTime&, const QDateTime&, const QDateTime&, const QDateTime&)::<lambda()> >::call(struct {...} &, void **)
    (f=..., arg=0x7fffffffac08) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:137
#14 0x00007ffff74ebe0b in QtPrivate::Functor<KIO::WidgetsAskUserActionHandler::askUserRename(KJob*, const QString&, const QUrl&, const QUrl&, KIO::RenameDialog_Options, KIO::filesize_t, KIO::filesize_t, const QDateTime&, const QDateTime&, const QDateTime&, const QDateTime&)::<lambda()>, 0>::call<QtPrivate::List<>, void>(struct {...} &, void *, void **) (f=..., arg=0x7fffffffac08)
    at /usr/include/qt6/QtCore/qobjectdefs_impl.h:339
#15 0x00007ffff74eb652 in QtPrivate::QCallableObject<KIO::WidgetsAskUserActionHandler::askUserRename(KJob*, const QString&, const QUrl&, const QUrl&, KIO::RenameDialog_Options, KIO::filesize_t, KIO::filesize_t, const QDateTime&, const QDateTime&, const QDateTime&, const QDateTime&)::<lambda()>, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *)
    (which=1, this_=0x93d410, r=0x7fffffffc320, a=0x7fffffffac08, ret=0x0)
    at /usr/include/qt6/QtCore/qobjectdefs_impl.h:522
#16 0x00007ffff39afdca in QtPrivate::QSlotObjectBase::call(QObject*, void**)
    (a=0x7fffffffac08, r=0x7fffffffc320, this=0x93d410)
    at /usr/src/debug/qt6-qtbase-6.6.0-6.fc39.x86_64/src/corelib/kernel/qobjectdefs_impl.h:433
#17 QMetaObject::invokeMethodImpl(QObject*, QtPrivate::QSlotObjectBase*, Qt::ConnectionType, void*)
    (object=0x7fffffffc320, slotObj=0x93d410, type=<optimized out>, ret=0x0)
    at /usr/src/debug/qt6-qtbase-6.6.0-6.fc39.x86_64/src/corelib/kernel/qmetaobject.cpp:1634
#18 0x00007ffff74e9f36 in QMetaObject::invokeMethod<KIO::WidgetsAskUserActionHandler::askUserRename(KJob*, const QString&, const QUrl&, const QUrl&, KIO::RenameDialog_Options, KIO::filesize_t, KIO::filesize_t, const QDateTime&, const QDateTime&, const QDateTime&, const QDateTime&)::<lambda()> >(QtPrivate::ContextTypeForFunctor<KIO::WidgetsAskUserActionHandler::askUserRename(KJob*, const QString&, const QUrl&, const QUrl&, KIO::RenameDialog_Options, KIO::filesize_t, KIO::filesize_t, const QDateTime&, const QDateTime&, const QDateTime&, const QDateTime&)::<lambda()>, void>::ContextType *, struct {...} &&, Qt::ConnectionType, QtPrivate::ZeroArgFunctor<KIO::WidgetsAskUserActionHandler::askUserRename(KJob*, const QString&, const QUrl&, const QUrl&, KIO::RenameDialog_Options, KIO::filesize_t, KIO::filesize_t, const QDateTime&, const QDateTime&, const QDateTime&, const QDateTime&)::<lambda()> >::ReturnType *) (object=0x7fffffffc320, function=..., type=Qt::AutoConnection, ret=0x0)
    at /usr/include/qt6/QtCore/qobjectdefs.h:425
#19 0x00007ffff74e6a76 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&)
    (this=0x1312d30, job=0xad5ab0, title=..., src=..., dest=..., options=..., sizeSrc=1048576, sizeDest=1048576, ctimeSrc=..., ctimeDest=..., mtimeSrc=..., mtimeDest=...)
    at /home/akseli/Repositories/kde/src/kio/src/widgets/widgetsaskuseractionhandler.cpp:145
#20 0x00007ffff6cb615b in KIO::CopyJobPrivate::slotResultErrorCopyingFiles(KJob*)
    (this=0x13166d0, job=0x10a8d50)
--Type <RET> for more, q to quit, c to continue without paging--
    at /home/akseli/Repositories/kde/src/kio/src/core/copyjob.cpp:1720
#21 0x00007ffff6cbc292 in KIO::CopyJob::slotResult(KJob*) (this=0xad5ab0, job=0x10a8d50)
    at /home/akseli/Repositories/kde/src/kio/src/core/copyjob.cpp:2564
#22 0x00007ffff5946a30 in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<KJob*>, void, void (KCompositeJob::*)(KJob*)>::call(void (KCompositeJob::*)(KJob*), KCompositeJob*, void**)
    (f=&virtual KCompositeJob::slotResult(KJob*), o=0xad5ab0, arg=0x7fffffffb310)
    at /usr/include/qt6/QtCore/qobjectdefs_impl.h:145
#23 0x00007ffff5946316 in QtPrivate::FunctionPointer<void (KCompositeJob::*)(KJob*)>::call<QtPrivate::List<KJob*>, void>(void (KCompositeJob::*)(KJob*), KCompositeJob*, void**)
    (f=&virtual KCompositeJob::slotResult(KJob*), o=0xad5ab0, arg=0x7fffffffb310)
    at /usr/include/qt6/QtCore/qobjectdefs_impl.h:182
#24 0x00007ffff5945639 in QtPrivate::QCallableObject<void (KCompositeJob::*)(KJob*), QtPrivate::List<KJob*>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
    (which=1, this_=0x123fb70, r=0xad5ab0, a=0x7fffffffb310, ret=0x0)
    at /usr/include/qt6/QtCore/qobjectdefs_impl.h:520
#25 0x00007ffff3a02011 in QtPrivate::QSlotObjectBase::call(QObject*, void**)
    (a=0x7fffffffb310, r=0xad5ab0, this=0x123fb70)
    at /usr/src/debug/qt6-qtbase-6.6.0-6.fc39.x86_64/src/corelib/kernel/qobjectdefs_impl.h:433
#26 doActivate<false>(QObject*, int, void**)
    (sender=0x10a8d50, signal_index=6, argv=0x7fffffffb310)
    at /usr/src/debug/qt6-qtbase-6.6.0-6.fc39.x86_64/src/corelib/kernel/qobject.cpp:4021
#27 0x00007ffff5949996 in KJob::result(KJob*, KJob::QPrivateSignal)
    (this=0x10a8d50, _t1=0x10a8d50, _t2=...)
    at /home/akseli/Repositories/kde/build/kcoreaddons/src/lib/KF6CoreAddons_autogen/include/moc_kjob.cpp:793
#28 0x00007ffff59473ab in KJob::finishJob(bool) (this=0x10a8d50, emitResult=true)
    at /home/akseli/Repositories/kde/src/kcoreaddons/src/lib/jobs/kjob.cpp:98
#29 0x00007ffff5947fb7 in KJob::emitResult() (this=0x10a8d50)
    at /home/akseli/Repositories/kde/src/kcoreaddons/src/lib/jobs/kjob.cpp:329
#30 0x00007ffff6d13fdf in KIO::SimpleJob::slotFinished() (this=0x10a8d50)
    at /home/akseli/Repositories/kde/src/kio/src/core/simplejob.cpp:229
#31 0x00007ffff6d188f3 in KIO::StatJob::slotFinished() (this=0x10a8d50)
    at /home/akseli/Repositories/kde/src/kio/src/core/statjob.cpp:170
#32 0x00007ffff6d1774b in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (KIO::SimpleJob::*)()>::call(void (KIO::SimpleJob::*)(), KIO::SimpleJob*, void**)
    (f=&virtual KIO::SimpleJob::slotFinished(), o=0x10a8d50, arg=0x7fffffffb648)
    at /usr/include/qt6/QtCore/qobjectdefs_impl.h:145
#33 0x00007ffff6d174c0 in QtPrivate::FunctionPointer<void (KIO::SimpleJob::*)()>::call<QtPrivate::List<>, void>(void (KIO::SimpleJob::*)(), KIO::SimpleJob*, void**)
    (f=&virtual KIO::SimpleJob::slotFinished(), o=0x10a8d50, arg=0x7fffffffb648)
    at /usr/include/qt6/QtCore/qobjectdefs_impl.h:182
#34 0x00007ffff6d17281 in QtPrivate::QCallableObject<void (KIO::SimpleJob::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
    (which=1, this_=0x1063020, r=0x10a8d50, a=0x7fffffffb648, ret=0x0)
    at /usr/include/qt6/QtCore/qobjectdefs_impl.h:520
#35 0x00007ffff3a02011 in QtPrivate::QSlotObjectBase::call(QObject*, void**)
    (a=0x7fffffffb648, r=0x10a8d50, this=0x1063020)
    at /usr/src/debug/qt6-qtbase-6.6.0-6.fc39.x86_64/src/corelib/kernel/qobjectdefs_impl.h:433
#36 doActivate<false>(QObject*, int, void**)
    (sender=0x1111690, signal_index=7, argv=0x7fffffffb648)
    at /usr/src/debug/qt6-qtbase-6.6.0-6.fc39.x86_64/src/corelib/kernel/qobject.cpp:4021
#37 0x00007ffff6dce9bd in KIO::WorkerInterface::finished() (this=0x1111690)
    at /home/akseli/Repositories/kde/build/kio/src/core/KF6KIOCore_autogen/include/moc_workerinterface_p.cpp:639
#38 0x00007ffff6dcc294 in KIO::WorkerInterface::dispatch(int, QByteArray const&)
    (this=0x1111690, _cmd=104, rawdata=...)
    at /home/akseli/Repositories/kde/src/kio/src/core/workerinterface.cpp:129
#39 0x00007ffff6dcbf2c in KIO::WorkerInterface::dispatch() (this=0x1111690)
    at /home/akseli/Repositories/kde/src/kio/src/core/workerinterface.cpp:60
#40 0x00007ffff6dc9df1 in KIO::Worker::gotInput() (this=0x1111690)
    at /home/akseli/Repositories/kde/src/kio/src/core/worker.cpp:263
#41 0x00007ffff6dcbbb8 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (KIO::Worker::*)()>::call(void (KIO::Worker::*)(), KIO::Worker*, void**)
    (f=(void (KIO::Worker::*)(KIO::Worker * const)) 0x7ffff6dc9dae <KIO::Worker::gotInput()>, o=0x1111690, arg=0x7fffffffbb78) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:145
#42 0x00007ffff6dcbb3e in QtPrivate::FunctionPointer<void (KIO::Worker::*)()>::call<QtPrivate::List<>, void>(void (KIO::Worker::*)(), KIO::Worker*, void**)
    (f=(void (KIO::Worker::*)(KIO::Worker * const)) 0x7ffff6dc9dae <KIO::Worker::gotInput()>, o=0x1111690, arg=0x7fffffffbb78) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:182
#43 0x00007ffff6dcba7f in QtPrivate::QCallableObject<void (KIO::Worker::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
    (which=1, this_=0x106b8a0, r=0x1111690, a=0x7fffffffbb78, ret=0x0)
--Type <RET> for more, q to quit, c to continue without paging--c
    at /usr/include/qt6/QtCore/qobjectdefs_impl.h:520
#44 0x00007ffff3a02011 in QtPrivate::QSlotObjectBase::call(QObject*, void**)
    (a=0x7fffffffbb78, r=0x1111690, this=0x106b8a0)
    at /usr/src/debug/qt6-qtbase-6.6.0-6.fc39.x86_64/src/corelib/kernel/qobjectdefs_impl.h:433
#45 doActivate<false>(QObject*, int, void**)
    (sender=0x10f8eb0, signal_index=3, argv=0x7fffffffbb78)
    at /usr/src/debug/qt6-qtbase-6.6.0-6.fc39.x86_64/src/corelib/kernel/qobject.cpp:4021
#46 0x00007ffff6c55b21 in KIO::Connection::readyRead() (this=0x10f8eb0)
    at /home/akseli/Repositories/kde/build/kio/src/core/KF6KIOCore_autogen/include/moc_connection_p.cpp:160
#47 0x00007ffff6c54c59 in KIO::ConnectionPrivate::dequeue() (this=0xfd23b0)
    at /home/akseli/Repositories/kde/src/kio/src/core/connection.cpp:31
#48 0x00007ffff6c557b3 in operator()() const (__closure=0x104d120)
    at /home/akseli/Repositories/kde/src/kio/src/core/connection.cpp:223
#49 0x00007ffff6c565f8 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, KIO::Connection::read(int*, QByteArray&)::<lambda()> >::call(struct {...} &, void **)
    (f=..., arg=0x116a098) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:137
#50 0x00007ffff6c564f7 in QtPrivate::Functor<KIO::Connection::read(int*, QByteArray&)::<lambda()>, 0>::call<QtPrivate::List<>, void>(struct {...} &, void *, void **) (f=..., arg=0x116a098)
    at /usr/include/qt6/QtCore/qobjectdefs_impl.h:339
#51 0x00007ffff6c563dc in QtPrivate::QCallableObject<KIO::Connection::read(int*, QByteArray&)::<lambda()>, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=1, this_=0x104d110, r=0x10f8eb0, a=0x116a098, ret=0x0)
    at /usr/include/qt6/QtCore/qobjectdefs_impl.h:522
#52 0x00007ffff39f3617 in QObject::event(QEvent*) (this=0x10f8eb0, e=0x116a050)
    at /usr/src/debug/qt6-qtbase-6.6.0-6.fc39.x86_64/src/corelib/kernel/qobject.cpp:1437
#53 0x00007ffff4bc2b38 in QApplicationPrivate::notify_helper(QObject*, QEvent*)
    (this=<optimized out>, receiver=0x10f8eb0, e=0x116a050)
    at /usr/src/debug/qt6-qtbase-6.6.0-6.fc39.x86_64/src/widgets/kernel/qapplication.cpp:3290
#54 0x00007ffff39a0ba8 in QCoreApplication::notifyInternal2(QObject*, QEvent*)
    (receiver=0x10f8eb0, event=0x116a050)
    at /usr/src/debug/qt6-qtbase-6.6.0-6.fc39.x86_64/src/corelib/kernel/qcoreapplication.cpp:1118
#55 0x00007ffff39a0dad in QCoreApplication::sendEvent(QObject*, QEvent*)
    (receiver=<optimized out>, event=<optimized out>)
    at /usr/src/debug/qt6-qtbase-6.6.0-6.fc39.x86_64/src/corelib/kernel/qcoreapplication.cpp:1536
#56 0x00007ffff39a4aa5 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)
    (receiver=0x0, event_type=0, data=0x6358b0)
    at /usr/src/debug/qt6-qtbase-6.6.0-6.fc39.x86_64/src/corelib/kernel/qcoreapplication.cpp:1898
#57 0x00007ffff39a4e1d in QCoreApplication::sendPostedEvents(QObject*, int)
    (receiver=<optimized out>, event_type=<optimized out>)
    at /usr/src/debug/qt6-qtbase-6.6.0-6.fc39.x86_64/src/corelib/kernel/qcoreapplication.cpp:1757
#58 0x00007ffff3c410bf in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=0x6b1d00)
    at /usr/src/debug/qt6-qtbase-6.6.0-6.fc39.x86_64/src/corelib/kernel/qeventdispatcher_glib.cpp:243
#59 0x00007ffff1b12e5c in g_main_dispatch (context=0x7fffdc000ef0) at ../glib/gmain.c:3476
#60 g_main_context_dispatch_unlocked (context=0x7fffdc000ef0) at ../glib/gmain.c:4284
#61 0x00007ffff1b6ddd8 in g_main_context_iterate_unlocked.isra.0
    (context=context@entry=0x7fffdc000ef0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4349
#62 0x00007ffff1b10ad3 in g_main_context_iteration (context=0x7fffdc000ef0, may_block=1)
    at ../glib/gmain.c:4414
#63 0x00007ffff3c4096f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x639060, flags=...)
    at /usr/src/debug/qt6-qtbase-6.6.0-6.fc39.x86_64/src/corelib/kernel/qeventdispatcher_glib.cpp:393
#64 0x00007ffff39ad9bb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)
    (this=this@entry=0x7fffffffc170, flags=..., flags@entry=...)
    at /usr/src/debug/qt6-qtbase-6.6.0-6.fc39.x86_64/src/corelib/global/qflags.h:34
#65 0x00007ffff39a97bd in QCoreApplication::exec() ()
    at /usr/src/debug/qt6-qtbase-6.6.0-6.fc39.x86_64/src/corelib/global/qflags.h:74
#66 0x000000000043f6ca in main(int, char**) (argc=1, argv=0x7fffffffd6d8)
    at /home/akseli/Repositories/kde/src/dolphin/src/main.cpp:253
Comment 15 Bug Janitor Service 2023-11-29 14:53:16 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/1496
Comment 16 Akseli Lahtinen 2023-12-01 11:27:30 UTC
Git commit bdef648edd54e146c30e881d8eb95990a59c5bbc by Akseli Lahtinen.
Committed on 01/12/2023 at 12:27.
Pushed by akselmo into branch 'master'.

WidgetsAskUserActionHandler: Use QPointer to check the validity of parent widgets

If Dolphin is closed during the copying process,
and the overwrite/skip dialog appears,
this crashes the copying process since the 
parent shows to faulty location.

Use QPointer to check that the parent widgets are still
valid. If not, we just use nullptr, and the dialogs
will still open.

This also cleans some repetition in code.

M  +39   -51   src/widgets/widgetsaskuseractionhandler.cpp

https://invent.kde.org/frameworks/kio/-/commit/bdef648edd54e146c30e881d8eb95990a59c5bbc
Comment 17 Méven Car 2023-12-15 08:49:33 UTC
Git commit 6bea074739d5a75920d5540bc266549df5642511 by Méven Car, on behalf of Akseli Lahtinen.
Committed on 15/12/2023 at 09:48.
Pushed by meven into branch 'kf5'.

WidgetsAskUserActionHandler: Use QPointer to check the validity of parent widgets

If Dolphin is closed during the copying process,
and the overwrite/skip dialog appears,
this crashes the copying process since the
parent shows to faulty location.

Use QPointer to check that the parent widgets are still
valid. If not, we just use nullptr, and the dialogs
will still open.

This also cleans some repetition in code.
(cherry picked from commit bdef648edd54e146c30e881d8eb95990a59c5bbc)

M  +39   -51   src/widgets/widgetsaskuseractionhandler.cpp

https://invent.kde.org/frameworks/kio/-/commit/6bea074739d5a75920d5540bc266549df5642511
Comment 18 Duncan 2023-12-16 08:53:09 UTC
(In reply to Méven Car from comment #17)
> Git commit 6bea074739d5a75920d5540bc266549df5642511 by Méven Car, on behalf
> of Akseli Lahtinen.
> Committed on 15/12/2023 at 09:48.
> Pushed by meven into branch 'kf5'.
> 
> WidgetsAskUserActionHandler: Use QPointer to check the validity of parent
> widgets

This commit breaks a (kf5) kio rebuild (kf6 kio is fine at 25add040d, which includes the parallel bdef648ed  from a couple weeks ago), at least on a hybrid kf5/kf6 system updating from yesterday  using the gentoo/kde overlay.   Occurs immediately after  [381/472] in the build process.  The errors are below.  (5.239.9999 is gentoo/kde's pseudo-version used for the kf5 frameworks live-git slot.)

../kio-5.239.9999/src/widgets/widgetsaskuseractionhandler.cpp: In member function 'virtual void KIO::WidgetsAskUserActionHandler::requestUserMessageBox(KIO::AskUserActionInterface::MessageDialogType, const QString&, const QString&, const QString&, const QString&, const QString&, const QString&, const QString&, const QString&, const KIO::MetaData&, QWidget*)':
../kio-5.239.9999/src/widgets/widgetsaskuseractionhandler.cpp:411:42: error: 'parentWidget' was not declared in this scope
411 |         d->sslMessageBox(text, metaData, parentWidget);
|                                          ^~~~~~~~~~~~
../kio-5.239.9999/src/widgets/widgetsaskuseractionhandler.cpp: In member function 'void KIO::WidgetsAskUserActionHandlerPrivate::sslMessageBox(const QString&, const KIO::MetaData&, QWidget*)':
../kio-5.239.9999/src/widgets/widgetsaskuseractionhandler.cpp:491:29: error: 'd' was not declared in this scope
491 |     QWidget *parentWidget = d->getParentWidget(parent);
|                             ^
ninja: subcommand failed
Comment 19 Méven Car 2023-12-16 10:01:51 UTC
(In reply to Duncan from comment #18)
> (In reply to Méven Car from comment #17)
> > Git commit 6bea074739d5a75920d5540bc266549df5642511 by Méven Car, on behalf
> > of Akseli Lahtinen.
> > Committed on 15/12/2023 at 09:48.
> > Pushed by meven into branch 'kf5'.
> > 
> > WidgetsAskUserActionHandler: Use QPointer to check the validity of parent
> > widgets
> 
> This commit breaks a (kf5) kio rebuild (kf6 kio is fine at 25add040d, which
> includes the parallel bdef648ed  from a couple weeks ago), at least on a
> hybrid kf5/kf6 system updating from yesterday  using the gentoo/kde overlay.
> Occurs immediately after  [381/472] in the build process.  The errors are
> below.  (5.239.9999 is gentoo/kde's pseudo-version used for the kf5
> frameworks live-git slot.)
> 
> ../kio-5.239.9999/src/widgets/widgetsaskuseractionhandler.cpp: In member
> function 'virtual void
> KIO::WidgetsAskUserActionHandler::requestUserMessageBox(KIO::
> AskUserActionInterface::MessageDialogType, const QString&, const QString&,
> const QString&, const QString&, const QString&, const QString&, const
> QString&, const QString&, const KIO::MetaData&, QWidget*)':
> ../kio-5.239.9999/src/widgets/widgetsaskuseractionhandler.cpp:411:42: error:
> 'parentWidget' was not declared in this scope
> 411 |         d->sslMessageBox(text, metaData, parentWidget);
> |                                          ^~~~~~~~~~~~
> ../kio-5.239.9999/src/widgets/widgetsaskuseractionhandler.cpp: In member
> function 'void KIO::WidgetsAskUserActionHandlerPrivate::sslMessageBox(const
> QString&, const KIO::MetaData&, QWidget*)':
> ../kio-5.239.9999/src/widgets/widgetsaskuseractionhandler.cpp:491:29: error:
> 'd' was not declared in this scope
> 491 |     QWidget *parentWidget = d->getParentWidget(parent);
> |                             ^
> ninja: subcommand failed

Thank you for reporting this.

I have a fix https://invent.kde.org/frameworks/kio/-/merge_requests/1515
Comment 20 Méven 2023-12-16 10:03:24 UTC
Git commit b1820506f20088fad311d68f41aa4e35853ad436 by Méven Car.
Committed on 16/12/2023 at 11:01.
Pushed by meven into branch 'kf5'.

WidgetsAskUserActionHandler: fix backport

The backport 6bea074739d5a75920d5540bc266549df5642511 was incorrect.

M  +2    -2    src/widgets/widgetsaskuseractionhandler.cpp

https://invent.kde.org/frameworks/kio/-/commit/b1820506f20088fad311d68f41aa4e35853ad436
Comment 21 Duncan 2023-12-16 11:33:36 UTC
(In reply to Méven from comment #20)
> Git commit b1820506f20088fad311d68f41aa4e35853ad436
> 
> WidgetsAskUserActionHandler: fix backport

Indeed.  Builds fine now. =:^)  Thanks.
Comment 22 Nicolas Fella 2024-03-03 14:25:56 UTC
*** Bug 481928 has been marked as a duplicate of this bug. ***
Comment 23 Bug Janitor Service 2024-08-12 21:32:08 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kwidgetsaddons/-/merge_requests/262
Comment 24 Bug Janitor Service 2024-08-12 21:38:05 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kguiaddons/-/merge_requests/127
Comment 25 Nicolas Fella 2024-08-19 11:31:05 UTC
Git commit bbbc7b8105e30761a72888190b70589939e92c85 by Nicolas Fella.
Committed on 19/08/2024 at 11:13.
Pushed by nicolasfella into branch 'master'.

[kjobwidgets] Store window in a QPointer

The widget/window may be deleted at any time

Store it in a QPointer so that we avoid accessing a dangling pointer
Related: bug 491637

M  +6    -4    src/kjobwidgets.cpp

https://invent.kde.org/frameworks/kwidgetsaddons/-/commit/bbbc7b8105e30761a72888190b70589939e92c85
Comment 26 Nicolas Fella 2024-08-19 11:31:53 UTC
Git commit 780b2961e58e73b6f9ce9c654155e3f2bcc2d66b by Nicolas Fella.
Committed on 19/08/2024 at 11:31.
Pushed by nicolasfella into branch 'master'.

[kjobwidgets] Store window in a QPointer

The widget/window may be deleted at any time

Store it in a QPointer so that we avoid accessing a dangling pointer
Related: bug 491637

M  +3    -2    src/util/kjobwindows.cpp

https://invent.kde.org/frameworks/kguiaddons/-/commit/780b2961e58e73b6f9ce9c654155e3f2bcc2d66b