Version: unspecified (using KDE 4.6.2) OS: Linux Hi, when I activate "show usage of all processors" in system load viewer to get a better view of my system load, system load viewer stops updating the bars in the panel. Greetings Marc Reproducible: Always Steps to Reproduce: Right click on system load viewer widget, call up settings screen, check "show usage of all processors", click OK, see bars freeze. Actual Results: Bars are not updated any more, three bars still shown Expected Results: four moving bars.
Created attachment 61266 [details] Proposed fix: Explicit typecasts for generation of m_numCPUs Hi all, this patch has been created while debugging this issue on my system (Debian/sid KDE 4.6.3, systemloadviewer applet from source, kdeplasma-addons.git, remotes/origin/4.6) code. The problem was caused by the line m_numCPUs = sys_mon->query("system/cores")["value"].toUInt(); which returned 0 in m_numCPUs. For debugging reasons, I split the expression and typecasts in multiple explicit assignments/casts and it "suddenly" worked. Unfortunately, I don't have more time to analyze the reasons in depth. Anyway, I hope, the patch is sufficiently clean for inclusion in the git repository. Best regards, Martin
Hi all, after having some more problems with two instances of this applet at session startup (the one instance recognized all cores, the other one did not), I did some more debugging. The result is the following patch set, also including the previous patch for completeness. Patches 0001--0003: The previous fix for explicit type casts. Might not be necessary any more. 0002/0003 add a comment for that change. Patch 0004: Added a temporary variable in SystemLoadViewer::dataUpdated for data["value"]. Although not necessary to fix anything, it came out of the debugging session. For coding style reasons, I'd prefer to keep this change. Patch 0005: A fix to display at least the system CPU usage if m_showMultiCPU is requested and we don't know the number of cores. Patch 0006: *The* fix for the m_numCPUs = 0 problem. It seems that the applet does not always/automatically get signal sourceAdded("system/cores"). Thus we explicitly connect to that resource.
Created attachment 61567 [details] added comment for prev fix
Created attachment 61568 [details] extended comment about prev. fix
Created attachment 61569 [details] Patch: added temporary explicit QVariant variable to SystemLoadViewer::dataUpdated
Created attachment 61570 [details] Patch: fallback to standard cpu/system/* resources
Created attachment 61571 [details] Patch: Always connect to the resource system/cores
Git commit f0ca12ab794063527a0537bce701423f97bb5972 by Matthew Dawson. Committed on 13/11/2011 at 04:35. Pushed by mdawson into branch 'KDE/4.7'. Fix issue with the system/cores value not being received. The systemmonitor data engine is 100% asynchronous. Unfortunately this makes polling any source impossible. This caused a hard to pin down bug related to certain cpu sources not being connected. To correct this the system/cores value is now properly polled. This should avoid/fix any issues with 'show usage of all processors' option. BUG: 271918 FIXED-IN: 4.7.4 M +54 -48 applets/systemloadviewer/systemloadviewer.cpp http://commits.kde.org/kdeplasma-addons/f0ca12ab794063527a0537bce701423f97bb5972
Git commit e19afaf10f0acc72cb2fce1ba9660868a7ffdfac by Matthew Dawson. Committed on 13/11/2011 at 04:35. Pushed by mdawson into branch 'master'. Fix issue with the system/cores value not being received. The systemmonitor data engine is 100% asynchronous. Unfortunately this makes polling any source impossible. This caused a hard to pin down bug related to certain cpu sources not being connected. To correct this the system/cores value is now properly polled. This should avoid/fix any issues with 'show usage of all processors' option. BUG: 271918 FIXED-IN: 4.8.0 M +54 -48 applets/systemloadviewer/systemloadviewer.cpp http://commits.kde.org/kdeplasma-addons/e19afaf10f0acc72cb2fce1ba9660868a7ffdfac