https://bugs.kde.org/show_bug.cgi?id=400778
Matt Fagnani <matthew.fagn...@utoronto.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- Platform|Other |Fedora RPMs --- Comment #2 from Matt Fagnani <matthew.fagn...@utoronto.ca> --- I added the following check of currentBattery being null to /usr/share/kpackage/kcms/kcm_energyinfo/contents/ui/main.qml right before line 459 if (currentBattery === null) { return "No battery" } var value = currentBattery[modelData.value] I haven't see the errors of the form "file:///usr/share/kpackage/kcms/kcm_energyinfo/contents/ui/main.qml:459: TypeError: Cannot read property * of null" after I made that change, started kinfocenter and clicked on Energy Information. I changed the function scalePoint in /usr/share/kpackage/kcms/kcm_energyinfo/contents/ui/Graph.qml so that if plot was undefined, then scaledX and scaledY weren't calculated and the returned value didn't include those variables. function scalePoint(plot) { if (plot === undefined) { return Qt.point(xPadding, height - yPadding); } else { var scaledX = (plot.x - xMin) * plotWidth / (xMax-xMin); var scaledY = (plot.y - yMin) * plotHeight / (yMax-yMin); return Qt.point(xPadding + scaledX, height - yPadding - scaledY); } } I haven't see the error "//usr/share/kpackage/kcms/kcm_energyinfo/contents/ui/Graph.qml:64: TypeError: Cannot read property 'x' of undefined" after I made that change, started kinfocenter and clicked on Energy Information. The Energy Consumption Statistics panel was still blank after those changes. I ran strace kinfocenter which showed many statx system calls checking for files named kinfocenter.mo and kinfocenter.js which returned -1 ENOENT (No such file or directory). My language was set to en_CA which was included in the paths being checked for kinfocenter.mo. I noted that /usr/share/locale/en_GB/LC_MESSAGES/kinfocenter.mo was provided by the kinfocenter package using sudo dnf repoquery -l kinfocenter | less, but no such file for en_CA was present. In System Settings > Regional Settings > Language , I set British english. kinfocenter.mo was found as shown when running strace kinfocenter after that statx(AT_FDCWD, "/usr/share/locale/en_GB/LC_MESSAGES/kcm_energyinfo.mo", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL, stx_attributes=0, stx_mode=S_IFREG|0644, stx_size=3138, ...}) = 0 sudo dnf repoquery --whatprovides *kcm_energyinfo.js showed no package providing kcm_energyinfo.js . I've been unable to find that file elsewhere. The absence of kcm_energyinfo.js might be involved in this issue. /usr/lib/qt5/plugins/kcms/kcm_energyinfo.so was found after many statx calls that returned No such file or directory errors: ... statx(AT_FDCWD, "/usr/lib/qt5/plugins/kcms/kcm_energyinfo", AT_STATX_SYNC_AS_STAT, STATX_ALL, 0xbfb0274c) = -1 ENOENT (No such file or directory) statx(AT_FDCWD, "/usr/lib/qt5/plugins/kcms/kcm_energyinfo.so", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL, stx_attributes=0, stx_mode=S_IFREG|0755, stx_size=136888, ...}) = 0 openat(AT_FDCWD, "/usr/lib/qt5/plugins/kcms/kcm_energyinfo.so", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 15 ... Later in the strace output 12 statx calls returned -1 ENOENT (No such file or directory) without finding checking for /usr/lib/qt5/plugins/kcms/kcm_energyinfo.so I ran sudo ln /usr/lib/qt5/plugins/kcms/kcm_energyinfo.so /usr/lib/qt5/plugins/kcm_energyinfo.so followed by strace kinfocenter. /usr/lib/qt5/plugins/kcm_energyinfo.so was then found and opened, but the Energy Information was still blank. ... statx(AT_FDCWD, "/usr/lib/qt5/plugins/kcm_energyinfo.so", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL, stx_attributes=0, stx_mode=S_IFREG|0755, stx_size=136888, ...}) = 0 openat(AT_FDCWD, "/usr/lib/qt5/plugins/kcm_energyinfo.so", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 15 ... I saw some shmctl calls which were trying to remove shared memory segments returning -1 invalid argument after I clicked on Energy Information such as shmctl(13402151, IPC_64|IPC_RMID, NULL) = -1 EINVAL (Invalid argument) I don't know if these might be related to this issue. I ran valgrind valgrind --log-file=valgrind_kinfocenter_1.txt kinfocenter which noted some memory leaks. I installed some more of the qt5 and kf5 debug packages involved in the crash traces and memory leaks many of which involved /usr/lib/libQt5Quick.so.5.11.1 and /usr/lib/libQt5Qml.so.5.11.1 provided by qt5-qtdeclarative. When I ran valgrind --leak-check=yes --log-file=valgrind_kinfocenter_3.txt kinfocenter , then I clicked on Energy Information, and closed kinfocenter I saw a pop up window stating "Application "kinfocenter" is not responding You tried to close window "KInfocentre — Info Centre" from application "kinfocenter" (Process ID: 2048) but the application is not responding. Do you want to terminate this application? Warning: Terminating the application will close all of its child windows. Any unsaved data will be lost. Terminate Program kinfocenter Wait Longer" After I clicked Wait Longer, the valgrind log showed that kinfocenter crashed due to invalid reads of size 4 and 2 as follows ==2048== Invalid read of size 4 ==2048== at 0x586EBB7: QGuiApplicationPrivate::processActivatedEvent(QWindowSystemInterfacePrivate::ActivatedWindowEvent*) (qguiapplication.cpp:2270) ==2048== by 0x586F0E0: QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) (qguiapplication.cpp:1837) ==2048== by 0x5844E13: QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) (qwindowsysteminterface.cpp:1032) ==2048== by 0xB193E41: QPAEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (qeventdispatcher_glib.cpp:70) ==2048== by 0x6064B6E: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (qeventloop.cpp:214) ==2048== by 0x606D3E1: QCoreApplication::exec() (qcoreapplication.cpp:1336) ==2048== by 0x5862234: QGuiApplication::exec() (qguiapplication.cpp:1761) ==2048== by 0x5157D17: QApplication::exec() (qapplication.cpp:2901) ==2048== by 0x113E64: main (main.cpp:76) ==2048== Address 0xf09b680 is 0 bytes inside a block of size 44 free'd ==2048== at 0x4836D85: operator delete(void*, unsigned int) (vg_replace_malloc.c:581) ==2048== by 0x51B8EA7: QWidgetWindow::~QWidgetWindow() (qwidgetwindow.cpp:166) ==2048== by 0x518AC59: QWidgetPrivate::deleteTLSysExtra() (qwidget.cpp:1901) ==2048== by 0x518FDF8: QWidget::destroy(bool, bool) (qwidget.cpp:12453) ==2048== by 0x519801A: QWidget::~QWidget() (qwidget.cpp:1710) ==2048== by 0x52C1EC0: QMainWindow::~QMainWindow() (qmainwindow.cpp:389) ==2048== by 0x4A4A5E2: KMainWindow::~KMainWindow() (in /usr/lib/libKF5XmlGui.so.5.51.0) ==2048== by 0x4A98418: KXmlGuiWindow::~KXmlGuiWindow() (in /usr/lib/libKF5XmlGui.so.5.51.0) ==2048== by 0x11435B: KInfoCenter::~KInfoCenter() (infocenter.cpp:93) ==2048== by 0x1143ED: KInfoCenter::~KInfoCenter() (infocenter.cpp:109) ==2048== by 0x609177A: QObject::event(QEvent*) (qobject.cpp:1242) ==2048== by 0x519D66C: QWidget::event(QEvent*) (qwidget.cpp:9347) ==2048== Block was alloc'd at ==2048== at 0x4835C89: operator new(unsigned int) (vg_replace_malloc.c:328) ==2048== by 0x5184C77: QWidgetPrivate::createTLSysExtra() (qwidget.cpp:1538) ==2048== by 0x518D93B: QWidget::setAttribute(Qt::WidgetAttribute, bool) (qwidget.cpp:11300) ==2048== by 0x518EABC: QWidget::winId() const (qwidget.cpp:2533) ==2048== by 0x4A4C14C: KMainWindow::applyMainWindowSettings(KConfigGroup const&) (in /usr/lib/libKF5XmlGui.so.5.51.0) ==2048== by 0x4A9A841: KXmlGuiWindow::applyMainWindowSettings(KConfigGroup const&) (in /usr/lib/libKF5XmlGui.so.5.51.0) ==2048== by 0x4A4C2E1: KMainWindow::setAutoSaveSettings(QString const&, bool) (in /usr/lib/libKF5XmlGui.so.5.51.0) ==2048== by 0x4A9A5E2: KXmlGuiWindow::setupGUI(QSize const&, QFlags<KXmlGuiWindow::StandardWindowOption>, QString const&) (in /usr/lib/libKF5XmlGui.so.5.51.0) ==2048== by 0x115CB1: KInfoCenter::KInfoCenter() (infocenter.cpp:84) ==2048== by 0x116E5B: KicApp::KicApp(int&, char**) (main.cpp:64) ==2048== by 0x113E5A: main (main.cpp:72) ==2048== ==2048== Thread 3 QDBusConnectionM: ==2048== Invalid read of size 2 ==2048== at 0x60BCFFC: socketNotifierSourceCheck(_GSource*) (qeventdispatcher_glib.cpp:88) ==2048== by 0x9A552C1: g_main_context_check (gmain.c:3753) ==2048== by 0x9A558B4: g_main_context_iterate.isra.20 (gmain.c:3917) ==2048== by 0x9A55A5A: g_main_context_iteration (gmain.c:3981) ==2048== by 0x60BD15C: QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (qeventdispatcher_glib.cpp:423) ==2048== by 0x6064B6E: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (qeventloop.cpp:214) ==2048== by 0x5ECDDD0: QThread::exec() (qthread.cpp:525) ==2048== by 0x5D3D0CF: QDBusConnectionManager::run() (qdbusconnection.cpp:178) ==2048== by 0x5ED8908: QThreadPrivate::start(void*) (qthread_unix.cpp:367) ==2048== by 0x785E5DD: start_thread (pthread_create.c:486) ==2048== by 0x669E789: clone (clone.S:108) ==2048== Address 0xccd43b6 is 6 bytes inside a block of size 12 free'd ==2048== at 0x4836D85: operator delete(void*, unsigned int) (vg_replace_malloc.c:581) ==2048== by 0x60BD91F: QEventDispatcherGlib::unregisterSocketNotifier(QSocketNotifier*) (qeventdispatcher_glib.cpp:504) ==2048== by 0x609CD81: QSocketNotifier::setEnabled(bool) (qsocketnotifier.cpp:246) ==2048== by 0x60BCFF4: socketNotifierSourceCheck(_GSource*) (qeventdispatcher_glib.cpp:88) ==2048== by 0x9A552C1: g_main_context_check (gmain.c:3753) ==2048== by 0x9A558B4: g_main_context_iterate.isra.20 (gmain.c:3917) ==2048== by 0x9A55A5A: g_main_context_iteration (gmain.c:3981) ==2048== by 0x60BD15C: QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (qeventdispatcher_glib.cpp:423) ==2048== by 0x6064B6E: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (qeventloop.cpp:214) ==2048== by 0x5ECDDD0: QThread::exec() (qthread.cpp:525) ==2048== by 0x5D3D0CF: QDBusConnectionManager::run() (qdbusconnection.cpp:178) ==2048== by 0x5ED8908: QThreadPrivate::start(void*) (qthread_unix.cpp:367) ==2048== Block was alloc'd at ==2048== at 0x4835C89: operator new(unsigned int) (vg_replace_malloc.c:328) ==2048== by 0x60BD7EC: QEventDispatcherGlib::registerSocketNotifier(QSocketNotifier*) (qeventdispatcher_glib.cpp:460) ==2048== by 0x609CC75: QSocketNotifier::QSocketNotifier(int, QSocketNotifier::Type, QObject*) (qsocketnotifier.cpp:155) ==2048== by 0x5D484F8: qDBusAddWatch (qdbusintegrator.cpp:213) ==2048== by 0x7A2C688: _dbus_watch_list_set_functions (in /usr/lib/libdbus-1.so.3.19.8) ==2048== by 0x7A10219: dbus_connection_set_watch_functions (in /usr/lib/libdbus-1.so.3.19.8) ==2048== by 0x5D4B00A: q_dbus_connection_set_watch_functions (qdbus_symbols_p.h:229) ==2048== by 0x5D4B00A: QDBusConnectionPrivate::setConnection(DBusConnection*, QDBusErrorInternal const&) (qdbusintegrator.cpp:1794) ==2048== by 0x5D3F6F7: QDBusConnectionManager::executeConnectionRequest(QDBusConnectionManager::ConnectionRequestData*) (qdbusconnection.cpp:289) ==2048== by 0x608E203: call (qobjectdefs_impl.h:376) ==2048== by 0x608E203: QMetaCallEvent::placeMetaCall(QObject*) (qobject.cpp:504) ==2048== by 0x6091752: QObject::event(QEvent*) (qobject.cpp:1251) ==2048== by 0x5ECDEFA: QThread::event(QEvent*) (qthread.cpp:832) ==2048== by 0x6065DC1: doNotify(QObject*, QEvent*) (qcoreapplication.cpp:1138) ==2048== ==2048== Invalid read of size 2 ==2048== at 0x60BCF60: socketNotifierSourceCheck(_GSource*) (qeventdispatcher_glib.cpp:79) ==2048== by 0x9A552C1: g_main_context_check (gmain.c:3753) ==2048== by 0x9A558B4: g_main_context_iterate.isra.20 (gmain.c:3917) ==2048== by 0x9A55A5A: g_main_context_iteration (gmain.c:3981) ==2048== by 0x60BD15C: QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (qeventdispatcher_glib.cpp:423) ==2048== by 0x6064B6E: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (qeventloop.cpp:214) ==2048== by 0x5ECDDD0: QThread::exec() (qthread.cpp:525) ==2048== by 0x5D3D0CF: QDBusConnectionManager::run() (qdbusconnection.cpp:178) ==2048== by 0x5ED8908: QThreadPrivate::start(void*) (qthread_unix.cpp:367) ==2048== by 0x785E5DD: start_thread (pthread_create.c:486) ==2048== by 0x669E789: clone (clone.S:108) ==2048== Address 0xccd43b4 is 4 bytes inside a block of size 12 free'd ==2048== at 0x4836D85: operator delete(void*, unsigned int) (vg_replace_malloc.c:581) ==2048== by 0x60BD91F: QEventDispatcherGlib::unregisterSocketNotifier(QSocketNotifier*) (qeventdispatcher_glib.cpp:504) ==2048== by 0x609CD81: QSocketNotifier::setEnabled(bool) (qsocketnotifier.cpp:246) ==2048== by 0x60BCFF4: socketNotifierSourceCheck(_GSource*) (qeventdispatcher_glib.cpp:88) ==2048== by 0x9A552C1: g_main_context_check (gmain.c:3753) ==2048== by 0x9A558B4: g_main_context_iterate.isra.20 (gmain.c:3917) ==2048== by 0x9A55A5A: g_main_context_iteration (gmain.c:3981) ==2048== by 0x60BD15C: QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (qeventdispatcher_glib.cpp:423) ==2048== by 0x6064B6E: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (qeventloop.cpp:214) ==2048== by 0x5ECDDD0: QThread::exec() (qthread.cpp:525) ==2048== by 0x5D3D0CF: QDBusConnectionManager::run() (qdbusconnection.cpp:178) ==2048== by 0x5ED8908: QThreadPrivate::start(void*) (qthread_unix.cpp:367) ==2048== Block was alloc'd at ==2048== at 0x4835C89: operator new(unsigned int) (vg_replace_malloc.c:328) ==2048== by 0x60BD7EC: QEventDispatcherGlib::registerSocketNotifier(QSocketNotifier*) (qeventdispatcher_glib.cpp:460) ==2048== by 0x609CC75: QSocketNotifier::QSocketNotifier(int, QSocketNotifier::Type, QObject*) (qsocketnotifier.cpp:155) ==2048== by 0x5D484F8: qDBusAddWatch (qdbusintegrator.cpp:213) ==2048== by 0x7A2C688: _dbus_watch_list_set_functions (in /usr/lib/libdbus-1.so.3.19.8) ==2048== by 0x7A10219: dbus_connection_set_watch_functions (in /usr/lib/libdbus-1.so.3.19.8) ==2048== by 0x5D4B00A: q_dbus_connection_set_watch_functions (qdbus_symbols_p.h:229) ==2048== by 0x5D4B00A: QDBusConnectionPrivate::setConnection(DBusConnection*, QDBusErrorInternal const&) (qdbusintegrator.cpp:1794) ==2048== by 0x5D3F6F7: QDBusConnectionManager::executeConnectionRequest(QDBusConnectionManager::ConnectionRequestData*) (qdbusconnection.cpp:289) ==2048== by 0x608E203: call (qobjectdefs_impl.h:376) ==2048== by 0x608E203: QMetaCallEvent::placeMetaCall(QObject*) (qobject.cpp:504) ==2048== by 0x6091752: QObject::event(QEvent*) (qobject.cpp:1251) ==2048== by 0x5ECDEFA: QThread::event(QEvent*) (qthread.cpp:832) ==2048== by 0x6065DC1: doNotify(QObject*, QEvent*) (qcoreapplication.cpp:1138) I ran valgrind --leak-check=yes --log-file=valgrind_kinfocenter_4.txt kinfocenter and then I clicked on Energy Information, and closed kinfocenter I saw the same pop up window, clicked Wait Longer and kinfocenter closed normally. I'll attach some of the valgrind and strace output. -- You are receiving this mail because: You are watching all bug changes.