fix crash during file copy after message box warning
AbandonedPublic

Authored by jtamate on Nov 26 2017, 9:05 AM.

Details

Reviewers
dfaure
Group Reviewers
Frameworks
Summary

As a temporary workaround for the problems with nested eventloops
and warning messages in the move/copy operation when it can't
change the destination file rights and the user is asked to retry
and after some failed retries he press cancel.
Even this is not the right solution, this fixes the crash of:
BUG: 364039
The right solution implies also solving bug 332948.

Diff Detail

Repository
R241 KIO
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
jtamate created this revision.Nov 26 2017, 9:05 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptNov 26 2017, 9:05 AM
jtamate requested review of this revision.Nov 26 2017, 9:05 AM

If this doesn't fix bug #332948, please remove it from the BUG: keyword, otherwise it will be automatically closed when pushing this commit.

jtamate edited the summary of this revision. (Show Details)Nov 26 2017, 9:41 AM

The backtrace without this patch:
Thread 1 (Thread 0x7f0a25cc5dc0 (LWP 18492)):
[KCrash Handler]
#6 0x00007f0a1fe9b156 in KJob::isAutoDelete() const (this=0x1ae3410) at /g/5kde/frameworks/kcoreaddons/src/lib/jobs/kjob.cpp:333
#7 0x00007f0a1fe9a826 in KJob::finishJob(bool) (this=0x1ae3410, emitResult=true) at /g/5kde/frameworks/kcoreaddons/src/lib/jobs/kjob.cpp:112
#8 0x00007f0a1fe9aeff in KJob::emitResult() (this=0x1ae3410) at /g/5kde/frameworks/kcoreaddons/src/lib/jobs/kjob.cpp:293
#9 0x00007f0a21676cba in KIO::FileCopyJob::slotResult(KJob*) (this=0x1ae3410, job=0x21cbe50) at /g/5kde/frameworks/kio/src/core/filecopyjob.cpp:509
#10 0x00007f0a1fe9a126 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=0x1ae3410, arg=0x7ffe447f26f0) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:136
#11 0x00007f0a1fe99d14 in QtPrivate::FunctionPointer<void (KCompositeJob::*)(KJob*)>::call<QtPrivate::List<KJob*>, void>(void (KCompositeJob::*)(KJob*), KCompositeJob*, void
) (f=&virtual KCompositeJob::slotResult(KJob*), o=0x1ae3410, arg=0x7ffe447f26f0) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:169
#12 0x00007f0a1fe9992d in QtPrivate::QSlotObject<void (KCompositeJob::*)(KJob*), QtPrivate::List<KJob*>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void, bool*) (which=1, this_=0x21d0040, r=0x1ae3410, a=0x7ffe447f26f0, ret=0x0) at /usr/include/qt5/QtCore/qobject_impl.h:120
#13 0x00007f0a1df9f73c in QMetaObject::activate(QObject*, int, int, void
) () at /usr/lib64/libQt5Core.so.5
#14 0x00007f0a1fe9c6cb in KJob::result(KJob*, KJob::QPrivateSignal) (this=0x21cbe50, _t1=0x21cbe50, _t2=...) at /virtual/kde5/5kde/build/frameworks/kcoreaddons/src/lib/KF5CoreAddons_autogen/include/moc_kjob.cpp:570
#15 0x00007f0a1fe9a816 in KJob::finishJob(bool) (this=0x21cbe50, emitResult=true) at /g/5kde/frameworks/kcoreaddons/src/lib/jobs/kjob.cpp:109
#16 0x00007f0a1fe9aeff in KJob::emitResult() (this=0x21cbe50) at /g/5kde/frameworks/kcoreaddons/src/lib/jobs/kjob.cpp:293
#17 0x00007f0a2167e313 in KIO::SimpleJob::slotFinished() (this=0x21cbe50) at /g/5kde/frameworks/kio/src/core/simplejob.cpp:233
#18 0x00007f0a2167e42d in KIO::SimpleJob::slotError(int, QString const&) (this=0x21cbe50, err=115, errorText=...) at /g/5kde/frameworks/kio/src/core/simplejob.cpp:246
#19 0x00007f0a2167f336 in KIO::SimpleJob::qt_static_metacall(QObject*, QMetaObject::Call, int, void) (_o=0x21cbe50, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7ffe447f2a20) at /virtual/kde5/5kde/build/frameworks/kio/src/core/KF5KIOCore_autogen/include/moc_simplejob.cpp:104
#20 0x00007f0a1df9f63a in QMetaObject::activate(QObject*, int, int, void
) () at /usr/lib64/libQt5Core.so.5
#21 0x00007f0a21665732 in KIO::SlaveInterface::error(int, QString const&) (this=0x1ba8950, _t1=115, _t2=...) at /virtual/kde5/5kde/build/frameworks/kio/src/core/KF5KIOCore_autogen/include/moc_slaveinterface.cpp:414
#22 0x00007f0a21663694 in KIO::SlaveInterface::dispatch(int, QByteArray const&) (this=0x1ba8950, _cmd=102, rawdata=...) at /g/5kde/frameworks/kio/src/core/slaveinterface.cpp:192
#23 0x00007f0a21663154 in KIO::SlaveInterface::dispatch() (this=0x1ba8950) at /g/5kde/frameworks/kio/src/core/slaveinterface.cpp:89
#24 0x00007f0a216676d0 in KIO::Slave::gotInput() (this=0x1ba8950) at /g/5kde/frameworks/kio/src/core/slave.cpp:406
#25 0x00007f0a216f7625 in KIO::Slave::qt_static_metacall(QObject*, QMetaObject::Call, int, void) (_o=0x1ba8950, _c=QMetaObject::InvokeMetaMethod, _id=2, _a=0x7ffe447f2d80) at /virtual/kde5/5kde/build/frameworks/kio/src/core/KF5KIOCore_autogen/EWIEGA46WW/moc_slave.cpp:89
#26 0x00007f0a1df9f63a in QMetaObject::activate(QObject*, int, int, void
) () at /usr/lib64/libQt5Core.so.5
#27 0x00007f0a2160d0ff in KIO::Connection::readyRead() (this=0x1b0c640) at /virtual/kde5/5kde/build/frameworks/kio/src/core/KF5KIOCore_autogen/include/moc_connection_p.cpp:144
#28 0x00007f0a2160bef7 in KIO::ConnectionPrivate::dequeue() (this=0x1fe9d20) at /g/5kde/frameworks/kio/src/core/connection.cpp:46
#29 0x00007f0a2160cf1c in KIO::Connection::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x1b0c640, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x22a98b0) at /virtual/kde5/5kde/build/frameworks/kio/src/core/KF5KIOCore_autogen/include/moc_connection_p.cpp:87
#30 0x00007f0a1dfa0022 in QObject::event(QEvent*) () at /usr/lib64/libQt5Core.so.5
#31 0x00007f0a1f3ceafc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#32 0x00007f0a1f3d5eb4 in QApplication::notify(QObject*, QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#33 0x00007f0a1df72128 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib64/libQt5Core.so.5
#34 0x00007f0a1df74715 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib64/libQt5Core.so.5

+1

Could you please check, while you are on KCoreAddons and KIO for other jobs that emitting result in same way?

jtamate abandoned this revision.Nov 30 2017, 7:18 PM