D12371: fix always reproducible crash
Jaime Torres Amate
noreply at phabricator.kde.org
Fri Apr 20 18:54:57 UTC 2018
jtamate added a comment.
More investigation, in bold what causes the problem.
moveListersWithoutCachedItemsJob append KDirLister(0x3b510c70) to holders for url= QUrl("file:///virtual/kde5/5kde/build/frameworks/kio")
forgetDirs removeAll in directoryData[ "file:///virtual/kde5/5kde/build/frameworks/kio" ] for KDirLister(0x3b510c70)
moveListersWithoutCachedItemsJob append KDirLister(0x3b510c70) to holders for url= QUrl("remote:/")
forgetDirs removeAll in directoryData[ "remote:/" ] for KDirLister(0x3b510c70)
**forgetDirs not found: "smb://" in directoryData for KDirLister(0x3b510c70) **
moveListersWithoutCachedItemsJob append KDirLister(0x3b510c70) to holders for url= QUrl("smb:///")
**moveListersWithoutCachedItemsJob append KDirLister(0x3b510c70) to holders for url= QUrl("smb://") **
forgetDirs removeAll in directoryData[ "smb:///" ] for KDirLister(0x3b510c70)
moveListersWithoutCachedItemsJob append KDirLister(0x3b510c70) to holders for url= QUrl("smb://127.0.0.1/")
forgetDirs removeAll in directoryData[ "smb://127.0.0.1/" ] for KDirLister(0x3b510c70)
moveListersWithoutCachedItemsJob append KDirLister(0x3b510c70) to holders for url= QUrl("smb://127.0.0.1/kk")
forgetDirs removeAll in directoryData[ "smb://127.0.0.1/kk" ] for KCoreDirLister(0x3b510c70)
forgetCachedItemsJob append KDirLister(0x4e273400) to holders for url= QUrl("smb://127.0.0.1/kk")
forgetDirs removeAll in directoryData[ "smb://127.0.0.1/kk" ] for KDirLister(0x4e273400)
forgetCachedItemsJob append KDirLister(0x4e273400) to holders for url= QUrl("file:///virtual/kde5/5kde/build/frameworks/kio")
forgetDirs removeAll in directoryData[ "file:///virtual/kde5/5kde/build/frameworks/kio" ] for KDirLister(0x4e273400)
moveListersWithoutCachedItemsJob append KDirLister(0x4e273400) to holders for url= QUrl("smb://127.0.0.1/kk")
forgetDirs removeAll in directoryData[ "smb://127.0.0.1/kk" ] for KDirLister(0x4e273400)
forgetCachedItemsJob append KDirLister(0x4e273400) to holders for url= QUrl("file:///virtual/kde5/5kde/build/frameworks/kio")
forgetDirs removeAll in directoryData[ "file:///virtual/kde5/5kde/build/frameworks/kio" ] for KDirLister(0x4e273400)
forgetCachedItemsJob append KDirLister(0x4e273400) to holders for url= QUrl("file:///virtual/kde5/5kde/build/frameworks/kio")
forgetDirs removeAll in directoryData[ "file:///virtual/kde5/5kde/build/frameworks/kio" ] for KDirLister(0x4e273400)
forgetCachedItemsJob append KDirLister(0x4e273400) to holders for url= QUrl("remote:/")
forgetDirs removeAll in directoryData[ "remote:/" ] for KDirLister(0x4e273400)
forgetDirs removeAll in directoryData[ "smb://" ] for KDirLister(0x4e273400)
**number of holders for "smb://" 1**
==23870== Invalid read of size 8
==23870== at 0x5F41167: KCoreDirListerCache::slotRedirection(KIO::Job*, QUrl const&) (kcoredirlister.cpp:1484)
==23870== by 0x5F4A3A9: call (qobjectdefs_impl.h:136)
==23870== by 0x5F4A3A9: call<QtPrivate::List<KIO::Job*, const QUrl&>, void> (qobjectdefs_impl.h:169)
==23870== by 0x5F4A3A9: QtPrivate::QSlotObject<void (KCoreDirListerCache::*)(KIO::Job*, QUrl const&), QtPrivate::List<KIO::Job*, QUrl const&>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (qobjectdefs_impl.h:398)
==23870== by 0xA0F736B: call (qobjectdefs_impl.h:378)
==23870== by 0xA0F736B: QMetaObject::activate(QObject*, int, int, void**) (qobject.cpp:3749)
==23870== by 0x5EED068: KIO::ListJob::redirection(KIO::Job*, QUrl const&) (moc_listjob.cpp:246)
==23870== by 0x5EED481: KIO::ListJobPrivate::slotRedirection(QUrl const&) (listjob.cpp:222)
==23870== by 0x5EED4C1: operator() (listjob.cpp:294)
==23870== by 0x5EED4C1: call (qobjectdefs_impl.h:130)
==23870== by 0x5EED4C1: call<QtPrivate::List<const QUrl&>, void> (qobjectdefs_impl.h:240)
==23870== by 0x5EED4C1: QtPrivate::QFunctorSlotObject<KIO::ListJobPrivate::start(KIO::Slave*)::{lambda(QUrl const&)#4}, 1, QtPrivate::List<QUrl const&>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (qobjectdefs_impl.h:423)
==23870== by 0xA0F736B: call (qobjectdefs_impl.h:378)
==23870== by 0xA0F736B: QMetaObject::activate(QObject*, int, int, void**) (qobject.cpp:3749)
==23870== by 0x5ED159A: KIO::SlaveInterface::redirection(QUrl const&) (moc_slaveinterface.cpp:518)
==23870== by 0x5ED3B39: KIO::SlaveInterface::dispatch(int, QByteArray const&) (slaveinterface.cpp:248)
==23870== by 0x5ED16F5: KIO::SlaveInterface::dispatch() (slaveinterface.cpp:89)
==23870== by 0x5ED64A6: KIO::Slave::gotInput() (slave.cpp:406)
==23870== by 0x5F660AB: KIO::Slave::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_slave.cpp:89)
==23870== Address 0x3b510c70 is 0 bytes inside a block of size 32 free'd
==23870== at 0x4C2F7BB: operator delete(void*) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==23870== by 0x5BD45B6: KDirLister::~KDirLister() (kdirlister.cpp:55)
==23870== by 0xA0F503A: QObjectPrivate::deleteChildren() (qobject.cpp:1992)
==23870== by 0xA0FE38A: QObject::~QObject() (qobject.cpp:1022)
==23870== by 0x5BD6E68: KDirModel::~KDirModel() (kdirmodel.cpp:394)
==23870== by 0x5BD6E78: KDirModel::~KDirModel() (kdirmodel.cpp:397)
==23870== by 0x210252F9: ??? (in /usr/lib64/libKF5KIOFileWidgets.so.5.44.0)
==23870== by 0x21025492: KDirOperator::~KDirOperator() (in /usr/lib64/libKF5KIOFileWidgets.so.5.44.0)
==23870== by 0x210254C8: KDirOperator::~KDirOperator() (in /usr/lib64/libKF5KIOFileWidgets.so.5.44.0)
==23870== by 0x2103C33B: KFileWidget::~KFileWidget() (in /usr/lib64/libKF5KIOFileWidgets.so.5.44.0)
==23870== by 0x2103C4B8: KFileWidget::~KFileWidget() (in /usr/lib64/libKF5KIOFileWidgets.so.5.44.0)
==23870== by 0xA0F503A: QObjectPrivate::deleteChildren() (qobject.cpp:1992)
==23870== Block was alloc'd at
==23870== at 0x4C2E6FF: operator new(unsigned long) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==23870== by 0x21028589: KDirOperator::KDirOperator(QUrl const&, QWidget*) (in /usr/lib64/libKF5KIOFileWidgets.so.5.44.0)
==23870== by 0x2103EB77: KFileWidget::KFileWidget(QUrl const&, QWidget*) (in /usr/lib64/libKF5KIOFileWidgets.so.5.44.0)
==23870== by 0x20B722CD: ??? (in /usr/lib64/qt5/plugins/platformthemes/KDEPlasmaPlatformTheme.so)
==23870== by 0x20B728A4: ??? (in /usr/lib64/qt5/plugins/platformthemes/KDEPlasmaPlatformTheme.so)
==23870== by 0x20B67609: ??? (in /usr/lib64/qt5/plugins/platformthemes/KDEPlasmaPlatformTheme.so)
==23870== by 0x8F06654: QDialogPrivate::platformHelper() const (qdialog.cpp:122)
==23870== by 0x8F1755A: platformFileDialogHelper (qfiledialog_p.h:122)
==23870== by 0x8F1755A: QFileDialogPrivate::init(QUrl const&, QString const&, QString const&) (qfiledialog.cpp:2826)
==23870== by 0x8F17995: QFileDialog::QFileDialog(QFileDialogArgs const&) (qfiledialog.cpp:373)
==23870== by 0x8F18311: QFileDialog::getSaveFileUrl(QWidget*, QString const&, QUrl const&, QString const&, QString*, QFlags<QFileDialog::Option>, QStringList const&) (qfiledialog.cpp:2413)
==23870== by 0x4F5877E: KTextEditor::DocumentPrivate::documentSaveAs() (katedocument.cpp:4314)
==23870== by 0x50F868D: KTextEditor::DocumentPrivate::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_katedocument.cpp:514)
==23870==
KCrash: crashing... crashRecursionCounter = 2
> So while I don't deny that we might have designed this wrongly (and if we did, it's probably my fault), the right solution is to design this correctly, not to sprinkle qpointers.
It is well designed. But I'll include some comments, just in case someone else gets lost in the forest as I did.
The problem seems to be in moveListersWithoutCachedItemsJob or in forgetDirs.
REPOSITORY
R241 KIO
REVISION DETAIL
https://phabricator.kde.org/D12371
To: jtamate, dfaure, #frameworks, apol
Cc: apol, michaelh, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180420/7527d8b3/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list