Bug 439054

Summary: Handle lack of battery presence better
Product: [Applications] kinfocenter Reporter: Alex <alex765>
Component: Energy InformationAssignee: Kai Uwe Broulik <kde>
Status: RESOLVED FIXED    
Severity: normal CC: plasma-bugs-null
Priority: NOR    
Version First Reported In: 5.22.1   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 5.23
Sentry Crash Report:

Description Alex 2021-06-23 09:04:42 UTC
When running this on a desktop, without a battery, the applet is blank, and this is printed to the terminal:

file:///usr/lib64/qt5/qml/org/kde/kirigami.2/templates/InlineMessage.qml:259:9: QML ActionToolBar: Binding loop detected for property "atBottom"
file:///usr/share/kpackage/kcms/kcm_energyinfo/contents/ui/main.qml:44: Error: Cannot assign [undefined] to QObject*
file:///usr/share/kpackage/kcms/kcm_energyinfo/contents/ui/main.qml:483: TypeError: Cannot read property 'temperature' of null
file:///usr/share/kpackage/kcms/kcm_energyinfo/contents/ui/main.qml:483: TypeError: Cannot read property 'energyFullDesign' of null
file:///usr/share/kpackage/kcms/kcm_energyinfo/contents/ui/main.qml:483: TypeError: Cannot read property 'energyFull' of null
file:///usr/share/kpackage/kcms/kcm_energyinfo/contents/ui/main.qml:483: TypeError: Cannot read property 'energy' of null
file:///usr/share/kpackage/kcms/kcm_energyinfo/contents/ui/main.qml:483: TypeError: Cannot read property 'voltage' of null
file:///usr/share/kpackage/kcms/kcm_energyinfo/contents/ui/main.qml:483: TypeError: Cannot read property 'energyRate' of null
file:///usr/share/kpackage/kcms/kcm_energyinfo/contents/ui/main.qml:483: TypeError: Cannot read property 'technology' of null
file:///usr/share/kpackage/kcms/kcm_energyinfo/contents/ui/main.qml:483: TypeError: Cannot read property 'serial' of null
file:///usr/share/kpackage/kcms/kcm_energyinfo/contents/ui/main.qml:483: TypeError: Cannot read property 'capacity' of null
file:///usr/share/kpackage/kcms/kcm_energyinfo/contents/ui/main.qml:483: TypeError: Cannot read property 'chargePercent' of null
file:///usr/share/kpackage/kcms/kcm_energyinfo/contents/ui/main.qml:483: TypeError: Cannot read property 'chargeState' of null
file:///usr/share/kpackage/kcms/kcm_energyinfo/contents/ui/main.qml:483: TypeError: Cannot read property 'rechargeable' of null
file:///usr/share/kpackage/kcms/kcm_energyinfo/contents/ui/main.qml:483: TypeError: Cannot read property 'temperature' of null
file:///usr/share/kpackage/kcms/kcm_energyinfo/contents/ui/main.qml:483: TypeError: Cannot read property 'energyFullDesign' of null
file:///usr/share/kpackage/kcms/kcm_energyinfo/contents/ui/main.qml:483: TypeError: Cannot read property 'energyFull' of null
file:///usr/share/kpackage/kcms/kcm_energyinfo/contents/ui/main.qml:483: TypeError: Cannot read property 'energy' of null
file:///usr/share/kpackage/kcms/kcm_energyinfo/contents/ui/main.qml:483: TypeError: Cannot read property 'voltage' of null
file:///usr/share/kpackage/kcms/kcm_energyinfo/contents/ui/main.qml:483: TypeError: Cannot read property 'energyRate' of null
file:///usr/share/kpackage/kcms/kcm_energyinfo/contents/ui/main.qml:483: TypeError: Cannot read property 'technology' of null
file:///usr/share/kpackage/kcms/kcm_energyinfo/contents/ui/main.qml:483: TypeError: Cannot read property 'serial' of null
file:///usr/share/kpackage/kcms/kcm_energyinfo/contents/ui/main.qml:483: TypeError: Cannot read property 'capacity' of null
file:///usr/share/kpackage/kcms/kcm_energyinfo/contents/ui/main.qml:483: TypeError: Cannot read property 'chargePercent' of null
file:///usr/share/kpackage/kcms/kcm_energyinfo/contents/ui/main.qml:483: TypeError: Cannot read property 'chargeState' of null
file:///usr/share/kpackage/kcms/kcm_energyinfo/contents/ui/main.qml:483: TypeError: Cannot read property 'rechargeable' of null
file:///usr/share/kpackage/kcms/kcm_energyinfo/contents/ui/Graph.qml:68: TypeError: Cannot read property 'x' of undefined

Via system settings, this KCM is not exposed on desktop, so it's not much of an issue there. However, its accessible directly via kinfocenter.
Comment 1 Alex 2021-07-17 04:44:12 UTC
I think this has been fixed by https://invent.kde.org/plasma/kinfocenter/-/merge_requests/40