Bug 491058 - After initiating KNS download tasks, System settings lets you quit the app but fails to fully quit until pending KNS tasks succeed
Summary: After initiating KNS download tasks, System settings lets you quit the app bu...
Status: CONFIRMED
Alias: None
Product: frameworks-knewstuff
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 6.4.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Dan Leinir Turthra Jensen
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2024-07-31 12:43 UTC by Alireza Rashidi
Modified: 2024-08-01 16:39 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alireza Rashidi 2024-07-31 12:43:14 UTC
SUMMARY
When I close "System Settings" while it getting something from store, I can't open it anymore 

STEPS TO REPRODUCE
1. Open System Settings
2. Start get something from KDE Store (like global themes)
3. Close "Download plugin..." and "System Settings" windows before download get end
4. Try to relaunch app

SOFTWARE/OS VERSIONS
KDE Plasma Version: 6.1.3
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.2

ADDITIONAL INFORMATION
(just if you run "systemsettings" in terminal, you can use Ctrl+C to close it)
Comment 1 Nate Graham 2024-07-31 16:45:23 UTC
Sounds like the KNS thread is hanging or something. I think I've seen this in the past as well, but I can't immediately reproduce it on demand right now. Will keep trying.
Comment 2 Harald Sitter 2024-07-31 19:44:26 UTC
From a quick glance I can only reproduce this if **not** closing the download window but simply clicking close on the systemsettings window. Is that what the report is about?

(this is super weird, I don't see any signals coming out of the qapplication when closing the windows yet it doesn't seem stuck in gdb)
Comment 3 Nate Graham 2024-07-31 19:51:38 UTC
Yeah. I can reproduce the issue as described now.

At the moment I think everything is working as expected: the parent process (systemsettings) doesn't end until its worker download processes are complete.

However this isn't super intuitive from a user perspective. Options:
1. Don't let people close a KNS dialog while it's still got pending operations; prompt the user to wait or terminate them.
2. Don't let the user close a KCM while a KNS dialog it initiated still has pending operations; prompt the user to wait or terminate them.
3. Have KNS tasks use KJob and register them with the central job server, then allow fully quitting the initiating app with the job proceeding in the background with a Plasma notification to show progress to the user.

Downside of #1 is that it might be annoying to not be able to close the dialog until jobs complete.
Downside of #2 is that it would require code changes in all KNS-using KCMs and apps.
Downside of #3 is that is might require a lot of code changes in KNS.
Comment 4 Harald Sitter 2024-07-31 19:52:49 UTC
I wasn't very clear: You don't even need to start a download, just open the kns window and close systemsettings.
Comment 5 Nate Graham 2024-07-31 19:56:48 UTC
Oh. I can reproduce that too.

I think it's a different bug from what's described here though, which involves downloading something, closing the dialog, and then closing the main window. I'll open a new bug report for it.
Comment 6 Nate Graham 2024-07-31 19:58:58 UTC
Bug 491083