Bug 478351 - DiscoverNotifier spams crash notifications on session opening
Summary: DiscoverNotifier spams crash notifications on session opening
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: Notifier (show other bugs)
Version: 5.90.0
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2023-12-10 15:07 UTC by Paragoumba
Modified: 2023-12-12 14:56 UTC (History)
2 users (show)

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


Attachments
Discover Notifier crash notifications (31.37 KB, image/png)
2023-12-10 15:07 UTC, Paragoumba
Details
Crash report (1.93 KB, text/vnd.kde.kcrash-report)
2023-12-10 15:07 UTC, Paragoumba
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paragoumba 2023-12-10 15:07:21 UTC
Created attachment 164070 [details]
Discover Notifier crash notifications

SUMMARY
DiscoverNotifier crashes in loop on session opening if the network isn't available


STEPS TO REPRODUCE
1. Log into plasma without a valid network, like a wifi with a captive portal

OBSERVED RESULT
DiscoverNotifier spams crash notifications

EXPECTED RESULT
DiscoverNotifier should not crash

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: ArchLinux
KDE Plasma Version: 5.90.0
KDE Frameworks Version: 5.246.0
Qt Version: 6.6.1
Comment 1 Paragoumba 2023-12-10 15:07:58 UTC
Created attachment 164071 [details]
Crash report
Comment 2 Nate Graham 2023-12-11 22:37:39 UTC
Application: DiscoverNotifier (DiscoverNotifier), signal: Segmentation fault
Content of s_kcrashErrorMessage: std::unique_ptr<char []> = {get() = <optimized out>}
[KCrash Handler]
#6  std::__uniq_ptr_impl<QNetworkInformationBackend, std::default_delete<QNetworkInformationBackend> >::_M_ptr() const (this=<optimized out>) at /usr/src/debug/qt6-base/build/include/QtNetwork/6.6.1/QtNetwork/private/../../../../../../qtbase-everywhere-src-6.6.1/src/network/kernel/qnetworkinformation_p.h:51
#7  std::unique_ptr<QNetworkInformationBackend, std::default_delete<QNetworkInformationBackend> >::get() const (this=<optimized out>) at /usr/include/c++/13.2.1/bits/unique_ptr.h:470
#8  std::unique_ptr<QNetworkInformationBackend, std::default_delete<QNetworkInformationBackend> >::operator->() const (this=<optimized out>) at /usr/include/c++/13.2.1/bits/unique_ptr.h:463
#9  QNetworkInformation::reachability() const (this=0x0) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.1/src/network/kernel/qnetworkinformation.cpp:518
#10 0x0000555fc2cb59dd in DiscoverNotifier::state() const (this=0x7ffcff8775c8) at /usr/src/debug/discover/discover-5.90.0/notifier/DiscoverNotifier.cpp:212
#11 DiscoverNotifier::notifyAboutUpdates() const (this=this@entry=0x7ffcff8775c8) at /usr/src/debug/discover/discover-5.90.0/notifier/DiscoverNotifier.cpp:100
#12 0x0000555fc2cbb15a in DiscoverNotifier::refreshUnattended() (this=0x7ffcff8775c8) at /usr/src/debug/discover/discover-5.90.0/notifier/DiscoverNotifier.cpp:189
#13 DiscoverNotifier::DiscoverNotifier(QObject*) (this=0x7ffcff8775c8, parent=0x0) at /usr/src/debug/discover/discover-5.90.0/notifier/DiscoverNotifier.cpp:39
#14 0x0000555fc2cb33fb in NotifierItem::NotifierItem() (this=0x7ffcff8775b0) at /usr/src/debug/discover/discover-5.90.0/notifier/NotifierItem.cpp:27
#15 main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/discover/discover-5.90.0/notifier/main.cpp:33
[Inferior 1 (process 2103) detached]
Comment 3 Nate Graham 2023-12-11 22:39:28 UTC
We're crashing here:

>   else if (QNetworkInformation::instance()->reachability() != QNetworkInformation::Reachability::Online)

Can you comment on the network state your system was in when you experienced this problem, as well as how you've configured networking on your machine? Anything unusual? For example are you not using NetworkManager or have you disabled or masked any of its system units? Etc.
Comment 4 Paragoumba 2023-12-11 22:44:42 UTC
(In reply to Nate Graham from comment #3)
> We're crashing here:
> 
> >   else if (QNetworkInformation::instance()->reachability() != QNetworkInformation::Reachability::Online)
> 
> Can you comment on the network state your system was in when you experienced
> this problem, as well as how you've configured networking on your machine?
> Anything unusual? For example are you not using NetworkManager or have you
> disabled or masked any of its system units? Etc.

I am using NetworkManager with no particular configuration. I mainly had this problem when connected via WiFi and when having no access to the internet. It happened one time after I killed my session with magic SysRq (AltGr+PrnScr+R then E then I) which also killed NM and logging right after. It also happens when I connect to public Wifi with a captive portal before I log in and thus have no internet connection
Comment 5 Nate Graham 2023-12-12 14:56:55 UTC
Fixed today by Harald Sitter with https://invent.kde.org/plasma/discover/-/commit/f2bb47ae10d44cfae0a319ebe3293e3ff1bf9e2e!