Bug 454442 - Opening Discover without having an network connection makes it freeze
Summary: Opening Discover without having an network connection makes it freeze
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: discover (show other bugs)
Version: 5.24.90
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Dan Leinir Turthra Jensen
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2022-05-26 15:09 UTC by John
Modified: 2022-08-24 10:59 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.25.5


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John 2022-05-26 15:09:13 UTC
SUMMARY
***
Opening Discover without having an internet connection makes it freeze
***


STEPS TO REPRODUCE
1. Boot KDE Neon  and open Discover without having a wired or wireless connection active

OBSERVED RESULT
The loading progress bar under the "Loading..." text is freezing (nothing is moving)
If we try to maximize the window at that time, Discover will freeze (showing the unresponsive text and whitening)
The same if it opens in fullscreen mode and we try to restore it to windowed mode
And the same if try to close it, it will freeze for a while and when it comes back it will finally close.

EXPECTED RESULT
I expect Discover to open without freezing and becoming unresponsive in the cases where there's no wired, wireless connection, the computer is in Airplane mode, hotspot mode or there is some kind of network connection, but there's isn't internet accessiblity.
I want it to be fast and let me do whatever I want as soon as I open it, for example clicking on the "Installed" tab to look at the installed software.
Since all the installed software is locally installed, it makes no sense for me to not be able to do that or to be delayed by some network connection.
Also in the case I opened Discover by mistake I want to be able to close it as soon as possible without any delay.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma:
KDE Plasma Version: 5.24.90
KDE Frameworks Version: 5.95
Qt Version: 5.15.4

ADDITIONAL INFORMATION
From: neon-testing-20220524-1822.iso
Tested on Wayland
Comment 1 Nate Graham 2022-05-26 17:24:28 UTC
Can confirm. Pretty sure this used to work; seems like a regression.

It does however immediately unfreeze and start working normally if the network connection is restored.
Comment 2 Reziac 2022-05-29 20:51:59 UTC
Is this related to how it bloody insists on checking for updates immediately upon being opened?
I seem to recall it didn't used to do that, but does now. (Several different systems) Very annoying as it pretty much stalls everything for the 5 minutes or so it takes to finish that task.
Comment 3 ernestgupik 2022-07-06 16:14:06 UTC
git bisect points out this being the first bad commit: 7eddbef0fb2e7a5c181f26d09b7ab6247f4f5d3b (Use std::chrono_literals + initialize variables in headers)
Comment 4 Bug Janitor Service 2022-07-06 17:28:53 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/327
Comment 5 ernestgupik 2022-07-07 21:54:55 UTC
Update: As I found out, my git bisect results are totally wrong because of my non standard QEMU virtual machine dev environment.
Comment 6 Bug Janitor Service 2022-08-22 15:39:17 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/350
Comment 7 Aleix Pol 2022-08-23 09:37:37 UTC
Git commit 91a7b6357e93b7f7bbad2d31cec59dbc8e688d39 by Aleix Pol i Gonzalez.
Committed on 23/08/2022 at 09:33.
Pushed by apol into branch 'master'.

Be faster when all KNS categories fail at once (i.e. when you are offline)

M  +9    -2    libdiscover/Category/CategoryModel.cpp
M  +3    -0    libdiscover/Category/CategoryModel.h

https://invent.kde.org/plasma/discover/commit/91a7b6357e93b7f7bbad2d31cec59dbc8e688d39
Comment 8 Aleix Pol 2022-08-23 10:33:22 UTC
Git commit 359fa0ca665154e9c21b3dbd69297cc52a949274 by Aleix Pol Gonzalez, on behalf of Aleix Pol i Gonzalez.
Committed on 23/08/2022 at 10:33.
Pushed by apol into branch 'Plasma/5.25'.

Be faster when all KNS categories fail at once (i.e. when you are offline)


(cherry picked from commit 91a7b6357e93b7f7bbad2d31cec59dbc8e688d39)

M  +9    -2    libdiscover/Category/CategoryModel.cpp
M  +3    -0    libdiscover/Category/CategoryModel.h

https://invent.kde.org/plasma/discover/commit/359fa0ca665154e9c21b3dbd69297cc52a949274