[plasma-integration] [Bug 404995] QApplication::quitOnLastWindowClosed() doesn't work if dialog opened before QApplication::exec() started
https://bugs.kde.org/show_bug.cgi?id=404995 Raphael Robatsch changed: What|Removed |Added CC||raphael-svc-kde@tapesoftwar ||e.net --- Comment #4 from Raphael Robatsch --- Created attachment 141860 --> https://bugs.kde.org/attachment.cgi?id=141860=edit Call stack of a leaking KIO::ListJob I've debugged this some more and found a KIO::ListJob that doesn't get destroyed. I added qInfo() calls to the constructor, destructor, and KJob::finishJob (before the deleteLater()) call. I made a small program which shows a file picker, and then a main window. I started the application and pressed Escape to close the file picker. Here's what happens: NEW KIO::ListJob(0x55ecf47bd0a0) QUrl("tags:/") deleteLater KIO::ListJob(0x55ecf47bd0a0) DELETE KIO::ListJob(0x55ecf47bd0a0) NEW KIO::ListJob(0x55ecf48e6720) QUrl("file:///home/raphi/src/scratch/pleaseclose") deleteLater KIO::ListJob(0x55ecf48e6720) NEW KIO::ListJob(0x55ecf50cccd0) QUrl("file:///home/raphi/src/scratch/pleaseclose") deleteLater KIO::ListJob(0x55ecf50cccd0) DELETE KIO::ListJob(0x55ecf50cccd0) the 2nd KIO::ListJob (0x...6720) doesn't get deleted, even though deleteLater() gets called. I've attached call stacks of the leaking job's creation and killing. But I can't figure out why that job doesn't get deleted - deleteLater() gets called after all. Manually deleting the job in KCoreDirListerCache::stopListingUrl() causes the application to exit as expected once the main window is closed, which confrims that the leaking ListJob is the cause of this bug (this is not a fix, of course). I'm not sure how to debug this further. -- You are receiving this mail because: You are watching all bug changes.
[plasma-integration] [Bug 404995] QApplication::quitOnLastWindowClosed() doesn't work if dialog opened before QApplication::exec() started
https://bugs.kde.org/show_bug.cgi?id=404995 --- Comment #3 from Martin Sandsmark --- Put a breakpoint on the destructor as well, though, and it seems like all the lockers are destroyed, but I guess they don't handle the application not running yet very well. -- You are receiving this mail because: You are watching all bug changes.
[plasma-integration] [Bug 404995] QApplication::quitOnLastWindowClosed() doesn't work if dialog opened before QApplication::exec() started
https://bugs.kde.org/show_bug.cgi?id=404995 --- Comment #2 from Martin Sandsmark --- unfortunately I don't have debug symbols for kio or qt, but I think you are spot on: (gdb) bt #0 0x76fb4850 in QEventLoopLocker::QEventLoopLocker() () from /usr/lib/libQt5Core.so.5 #1 0x7fffefbb530c in KJobPrivate::KJobPrivate() () from /usr/lib/libKF5CoreAddons.so.5 #2 0x7fffefbb1a1a in KCompositeJobPrivate::KCompositeJobPrivate() () from /usr/lib/libKF5CoreAddons.so.5 #3 0x7fffefbb1a61 in KCompositeJob::KCompositeJob(QObject*) () from /usr/lib/libKF5CoreAddons.so.5 #4 0x705a2b34 in KIO::Job::Job(KIO::JobPrivate&) () from /usr/lib/libKF5KIOCore.so.5 #5 0x705b71da in KIO::SimpleJob::SimpleJob(KIO::SimpleJobPrivate&) () from /usr/lib/libKF5KIOCore.so.5 #6 0x705bc4fa in KIO::StatJob::StatJob(KIO::StatJobPrivate&) () from /usr/lib/libKF5KIOCore.so.5 #7 0x705bd24d in KIO::stat(QUrl const&, KIO::StatJob::StatSide, short, QFlags) () from /usr/lib/libKF5KIOCore.so.5 #8 0x712cc810 in KFileWidget::KFileWidget(QUrl const&, QWidget*) () from /usr/lib/libKF5KIOFileWidgets.so.5 #9 0x713c06dd in KDEPlatformFileDialog::KDEPlatformFileDialog (this=0x5560ed60) at /home/sandsmark/src/sandsmark-integration/src/platformtheme/kdeplatformfiledialoghelper.cpp:100 #10 0x713c1514 in KDEPlatformFileDialogHelper::KDEPlatformFileDialogHelper (this=0x556109b0) at /home/sandsmark/src/sandsmark-integration/src/platformtheme/kdeplatformfiledialoghelper.cpp:254 #11 0x713b4274 in KdePlatformTheme::createPlatformDialogHelper (this=0x55601c50, type=QPlatformTheme::FileDialog) at /home/sandsmark/src/sandsmark-integration/src/platformtheme/kdeplatformtheme.cpp:294 #12 0x77bf005e in QDialogPrivate::platformHelper() const () from /usr/lib/libQt5Widgets.so.5 #13 0x77c02afd in QFileDialogPrivate::init(QUrl const&, QString const&, QString const&) () from /usr/lib/libQt5Widgets.so.5 #14 0x77c0311a in QFileDialog::QFileDialog(QFileDialogArgs const&) () from /usr/lib/libQt5Widgets.so.5 #15 0x77c03284 in QFileDialog::getOpenFileUrl(QWidget*, QString const&, QUrl const&, QString const&, QString*, QFlags, QStringList const&) () from /usr/lib/libQt5Widgets.so.5 #16 0x77c034d6 in QFileDialog::getOpenFileName(QWidget*, QString const&, QString const&, QString const&, QString*, QFlags) () from /usr/lib/libQt5Widgets.so.5 #17 0xc31a in Widget::Widget (this=0x7fffe000, parent=0x0) at widget.cpp:31 #18 0xbfc4 in main (argc=1, argv=0x7fffe168) at main.cpp:8 -- You are receiving this mail because: You are watching all bug changes.
[plasma-integration] [Bug 404995] QApplication::quitOnLastWindowClosed() doesn't work if dialog opened before QApplication::exec() started
https://bugs.kde.org/show_bug.cgi?id=404995 David Edmundson changed: What|Removed |Added CC||k...@davidedmundson.co.uk --- Comment #1 from David Edmundson --- Can you put a breakpoint on QEventLoopLocker::QEventLoopLocker() I think it'll be KIO causing it. -- You are receiving this mail because: You are watching all bug changes.