SUMMARY File open dialogs with selection mode "directory" are freezing the application forever. I experienced this with multiple KDE Applications, but only with the Flatpak version. I marked this as critical as I think the open directory dialog is quite common and often used but the related features are completely broken with the freeze. It seems that the freeze happen only with the modal version, but in the non-modal version there seems to be still something strange as folders in my home dir are not shown at all. However I haven't tested this further… Experienced with: Kdenlive, Kate and flatpak-portal-test-kde (https://invent.kde.org/libraries/xdg-portal-test-kde/-/tree/master) STEPS TO REPRODUCE 1. Install flatpak-portal-test-kde (https://invent.kde.org/libraries/xdg-portal-test-kde/-/tree/master) 2. Start the application 3. Hit the button "Open (modal)…" in the "Open directory" line OBSERVED RESULT The application freezes EXPECTED RESULT Everything works as expected SOFTWARE/OS VERSIONS Linux/KDE Plasma: KDE Neon User Edition and Ubuntu Studio (XFCE)
What is your xdg-desktop-portal version? I believe the issue is that you have old xdg-desktop-portal version and the dialog is opened inside sandbox instead. At least I cannot reproduce it here.
How can I check the xdg-desktop-portal? I compiled flatpak-portal-test-kde just today from source. All other packages on my machine (flatpak as well) should be up-to-date… Btw BUG 43533is exactly about this for Kdenlive Operating System: KDE neon 5.22 KDE Plasma Version: 5.22.0 KDE Frameworks Version: 5.83.0 Qt Version: 5.15.3 Kernel Version: 5.4.0-74-generic (64-bit) Graphics Platform: X11 Processors: 4 × Intel® Core™ i5-2540M CPU @ 2.60GHz Memory: 7.7 GiB of RAM Graphics Processor: AMD CAICOS
(In reply to Julius Künzel from comment #2) > Btw BUG 43533is exactly about this for Kdenlive Wrong bug, this is the right one Bug 435225
I cannot reproduce the freeze, possibly because of newer version of xdg-desktop-portal, no idea. However, in order to have folder selection dialog to work you need to have https://invent.kde.org/frameworks/kio/-/merge_requests/445.
The Flatpak runtime got the update to 5.83 yesterday so I updated org.kde.Platform to have the MR you mentioned, but I still have the same problem (or is it necessary to rebuild the kdenlive Flatpak with the updated org.kde.Sdk???)
Created attachment 139492 [details] gdb backtrace Here is a gdb backtrace. Does it help?
I cannot reproduce still. Does it happen only when trying to open a directory? Does it happen when picking a file?
It only happens with directory, with files it works fine
I have this problem with Kdenlive 21.08.1 when clicking on 'Search recursively' in the 'Missing clips' dialog upon opening a project. A folder tree dialog is opened, and the whole application becomes completely unresponsive, necessitating a kill -9.
@Jan In the meanwhile I have a new PC and new Plasma Version and I can still reproduce this. Have you tested it on X11 or Wayland? Here is some code to reproduce: QFileDialog *fileDialog = new QFileDialog(this); fileDialog->setFileMode(QFileDialog::Directory); if (fileDialog->exec() == QDialog::Accepted) { fileDialog->deleteLater(); } If you change use fileDialog->setFileMode(QFileDialog::ExistingFile) instead it works perfectly fine. Here is the output of flatpak-portal-test-kde after you triggered the "Open (modal)…" button in the "Open Directory" row. If you do the same with the one in the "FileChooser:" row there is no output: kf.kio.widgets: Cannot read information about filesystem under path "/home/julius/.var/app/org.kde.portal-test-kde/cache/thumbnails/" Qt: Session management error: networkIdsList argument is NULL Operating System: KDE neon 5.23 KDE Plasma Version: 5.23.5 KDE Frameworks Version: 5.89.0 Qt Version: 5.15.3 Kernel Version: 5.15.6-051506-generic (64-bit) Graphics Platform: X11 Processors: 16 × AMD Ryzen 7 5800HS with Radeon Graphics Memory: 15.1 GiB of RAM Graphics Processor: NVIDIA GeForce GTX 1650 with Max-Q Design/PCIe/SSE2
I can not reproduce it hanging but i can reproduce QFileDialog::Directory not working. Run org.kde.gwenview, select 2 images, open the right mouse button menu, select "Copy To". See how regular gwenview from not flatpak works but the one from flatpak doesn't actually let you select a folder.
For me with Kdenlive and flatpak-portal-test-kde it is a strange hanging, because it does not real freeze (the cursor continues to flash), but it doesn't accept any input anymore (not even close) so the only option is to kill the app.
Still confirmed on 5.24
Just to avoid misunderstandings I like to mention that this happens with flatpak-portal-test-kde and the code I posted above only inside a Flatpak, while flatpak-portal-test-kde outside a Flatpak does not have this problem
(In reply to Julius Künzel from comment #14) > Just to avoid misunderstandings I like to mention that this happens with > flatpak-portal-test-kde and the code I posted above only inside a Flatpak, > while flatpak-portal-test-kde outside a Flatpak does not have this problem I'm still not able to reproduce, I tried flatpak-portal-test-kde (as flatpak) and it just works without any issue. (In reply to Albert Astals Cid from comment #11) > I can not reproduce it hanging but i can reproduce QFileDialog::Directory > not working. > > Run org.kde.gwenview, select 2 images, open the right mouse button menu, > select "Copy To". > > See how regular gwenview from not flatpak works but the one from flatpak > doesn't actually let you select a folder. This is because I can see it calling "FileChooser::SaveFile" instead "FileChooser::SaveFiles" which should request a directory. This is something I will have to fix in Qt itself and possibly in xdg-desktop-portal-kde.
Hmm. Very annoying. Any idea what else I can do to debug this?
I reproduced this issue using KDE Neon 5.24 and two specific Flatpak apps: OBS Studio and youtubedl-gui. OBS Studio when trying to pick a directory to save recordings in, and youtubedl-gui when trying to pick a directory to save downloads in. OBS Studio is especially problematic because this app is published by upstream directly on Flathub; it's an official package from them.
In progress with https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/76
Today I was able to find the bug in my system. ~/.conifg/QtProject.conf was 512MB. ``` [FileDialog] shortcuts=file:, file:///home/bobafit, file:///home/bobafit/Documents/KDFÃÂÃÂÃÂÃÂÃÂ...[and 500MB more]...ÃÂE/script ``` I just moved this file away and now KDE runs very smoothly again :-)
I am having the same problem, but my QtProject.conf is normal. Instead i get spammed with the following logs from xdg-desktop-portal-kde in journald: QWindow::fromWinId(): platform plugin does not support foreign windows.
The issue for me was, that QT_QPA_PLATFORMTHEME was set to someting incorrect. Deleting it fixes this issue.
Worth checking for sure. Julius, can you run `echo $QT_QPA_PLATFORMTHEME` in a terminal window and paste the output?
I tested it again with the latest versions of Kdenlive and xdg-portal-test-kde and it works with both now. So I am closing it. BTW the output of `echo $QT_QPA_PLATFORMTHEME` is empty