| Summary: | file open dialog freezes when browsing to /dev | ||
|---|---|---|---|
| Product: | [Frameworks and Libraries] frameworks-kio | Reporter: | Thomas Eschenbacher <Thomas.Eschenbacher> |
| Component: | general | Assignee: | David Faure <faure> |
| Status: | RESOLVED UPSTREAM | ||
| Severity: | crash | CC: | emmanuelpescosta099, kdelibs-bugs-null, wbauer1 |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Gentoo Packages | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
also easily reproducible on Kubuntu 15.04 x86_64 Looks like a bug in Qt which has been reported already. See https://bugreports.qt.io/browse/QTBUG-48529 I suppose this can be closed meanwhile? Should be fixed in Qt 5.6.0, earlier versions are not supported by KDE Frameworks anymore, and it was an upstream problem (in Qt) anyway... At least I cannot reproduce it on openSUSE anymore since we added the upstream fix to our Qt 5.5.1 packages over a year ago or upgraded to 5.6.0, while it happened reliably before. I can confirm that the original bug seems to be fixed. Only the display is wrong, the texts of the items are all positioned overlapping over the preview symbols, which makes the dialog look ugly and the texts unreadable. (In reply to Thomas Eschenbacher from comment #4) > I can confirm that the original bug seems to be fixed. Ok, let's close it then, I'd say. > Only the display is wrong, the texts of the items are all positioned > overlapping over the preview symbols, which makes the dialog look ugly and > the texts unreadable. That's a completely different/unrelated problem though, and happens with all files that do not have a proper (mimetype) icon (so the "unknown" icon is used as fallback). It seems the layout is done without an icon in this case, and the fallback icon drawn on top later on. I'm not sure if there's a bug report about that, but I remember it being mentioned somewhere a few days ago... |
reproduced here with kde-frameworks/kio-5.12.0 This bug might be low priority for most people, as most people do not navigate into /dev with their applications, but it is fatal for my application (Kwave), because I need to provide a way to select a device for sound recording or playback! Reproducible: Always Steps to Reproduce: 1. start any KF5 application that is providing the standard File/Open dialog (e.g. kwrite or any other) 2. disable the file filter, so that "All Files" (*) are displayed 3. navigate to /dev Actual Results: Currently the whole event loop is blocked, because KFilePreviewGenerator tries to provide an icon of each entry found in /dev. For this purpose it tries to guess the mime type of each node, which works by reading some data from it. This seems to be implemented in a blocking way. (see gdb backtrace below) Expected Results: There should be a check whether the file for which is preview generator tries to create a preview is a "real" file, or a "special" node. here the corresponding backtrace of my application: #0 0x00000033b04dcfad in read () from /lib64/libc.so.6 #1 0x00000033e31e797d in QFSFileEnginePrivate::readFdFh(char*, long long) () from /usr/lib64/libQt5Core.so.5 #2 0x00000033e31f51df in QFSFileEnginePrivate::nativeRead(char*, long long) () from /usr/lib64/libQt5Core.so.5 #3 0x00000033e3194073 in QFileDevice::readData(char*, long long) () from /usr/lib64/libQt5Core.so.5 #4 0x00000033e319a77b in QIODevice::read(char*, long long) () from /usr/lib64/libQt5Core.so.5 #5 0x00000033e319b084 in QIODevice::read(long long) () from /usr/lib64/libQt5Core.so.5 #6 0x00000033e319b15d in QIODevicePrivate::peek(long long) () from /usr/lib64/libQt5Core.so.5 #7 0x00000033e319c14e in QIODevice::peek(long long) () from /usr/lib64/libQt5Core.so.5 #8 0x00000033e32d3d6d in QMimeDatabasePrivate::mimeTypeForFileNameAndData(QString const&, QIODevice*, int*) () from /usr/lib64/libQt5Core.so.5 #9 0x00000033e32d454c in QMimeDatabase::mimeTypeForFile(QFileInfo const&, QMimeDatabase::MatchMode) const () from /usr/lib64/libQt5Core.so.5 #10 0x00000033e32d483d in QMimeDatabase::mimeTypeForFile(QString const&, QMimeDatabase::MatchMode) const () from /usr/lib64/libQt5Core.so.5 #11 0x00000033e32d4ac1 in QMimeDatabase::mimeTypeForUrl(QUrl const&) const () from /usr/lib64/libQt5Core.so.5 #12 0x00007ffb414392e5 in KFileItem::determineMimeType() const () from /usr/lib64/libKF5KIOCore.so.5 #13 0x00007ffb41aca42b in KFilePreviewGenerator::Private::resolveMimeType() () from /usr/lib64/libKF5KIOFileWidgets.so.5 #14 0x00000033e328b360 in QObject::event(QEvent*) () from /usr/lib64/libQt5Core.so.5 #15 0x00007ffb423ccd1c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5 #16 0x00007ffb423d2140 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5 #17 0x00000033e325ac6c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5 #18 0x00000033e325db9a in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib64/libQt5Core.so.5 #19 0x00000033e32b1853 in postEventSourceDispatch(_GSource*, int (*)(void*), void*) () from /usr/lib64/libQt5Core.so.5 #20 0x00000033b184a7eb in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0 #21 0x00000033b184aa08 in g_main_context_iterate.isra () from /usr/lib64/libglib-2.0.so.0 #22 0x00000033b184aacc in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0 #23 0x00000033e32b0f9a in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5 #24 0x00000033e3258fab in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5 #25 0x00007ffb425c3112 in QDialog::exec() () from /usr/lib64/libQt5Widgets.so.5 #26 0x00007ffb37aa43fe in KDEPlatformFileDialogHelper::exec() () from /usr/lib64/qt5/plugins/platformthemes/KDEPlatformTheme.so #27 0x00007ffb425c2f3a in QDialog::exec() () from /usr/lib64/libQt5Widgets.so.5 #28 0x00007ffb2a267cd9 in Kwave::RecordDialog::selectRecordDevice (this=0xd39760) at /usr/src/packages/multimedia/sound/kwave/plugins/record/RecordDialog.cpp:623