Summary: | Plasma freezes when editing a desktop file through GUI | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-kio | Reporter: | Antti Savolainen <antti.savo> |
Component: | Properties dialog | Assignee: | KIO Bugs <kio-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | faure, kde, kdelibs-bugs, nate, nicolas.fella, plasma-bugs |
Priority: | HI | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/frameworks/kio/commit/0300441bb80c3d75a305bc7b1f4a7e1c36f28845 | Version Fixed In: | 5.79 |
Attachments: | These are the only affected files. |
Description
Antti Savolainen
2021-01-21 21:47:16 UTC
From the video we're not frozen, but stuck in a nested event loop. It is presumably this line here frameworks/kio kpropertiesdialog.cpp:1543 KIO::copyJob... .... QEventLoop eventLoop; eventLoop.exec(QEventLoop::ExcludeUserInputEvents); Event loops from plasma are bad anyway, but with this one if the copy job prompts, it won't handle the user event. We're best trying to port away from the event loop if that's possible within the API I just came to the conclusion as David. Commenting out the line makes the dialog responsive again, although the rest of Plasma is still blocked, but that is probably expected since Dolphin behaves the same Created attachment 135046 [details]
These are the only affected files.
So it seems that only .desktop files inside another folder inside ~/.local/share/applications are affected. None of the files in the root folder cause the loop.
I can make Dolphin freeze the same way by just creating a file called "a" and one named "aa" and then trying to rename it to "a" Even bin/kpropertiesdialogtest locks up itself Bisected to 4c12899369f43009269d0fdb80964483365bb922 A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/324 Git commit 0300441bb80c3d75a305bc7b1f4a7e1c36f28845 by David Redondo. Committed on 25/01/2021 at 11:26. Pushed by dfaure into branch 'master'. Fix lockup when renaming a file from properties dialog 4c12899369f43009269d0fdb80964483365bb922 changed how we show the rename dialog. Before we would exec() it and now we call show(). This causes a lockup when renaming a file from the properties dialog to a filename that already exsist. Optimally we would change KPropertiesDialog to make it async and not use nested event loops but this fixes the lockup for now. M +2 -2 src/widgets/kpropertiesdialog.cpp https://invent.kde.org/frameworks/kio/commit/0300441bb80c3d75a305bc7b1f4a7e1c36f28845 |