wojnilowicz / workrave-applet

KDE Plasma 5 applet for displaying Workrave timers.
GNU General Public License v2.0
4 stars 7 forks source link

"Binding loop detected for property" error when starting plasmashell #11

Open robertfw opened 1 year ago

robertfw commented 1 year ago

Hi there! First, thank you for making this applet!

I've been noticing the following error when restarting plasmashell:

file:///home/robertfw/.local/share/plasma/plasmoids/org.kde.workraveApplet/contents/ui/main.qml:381:9: QML Label: Binding loop detected for property "font".

It repeats about 50 times.

No impact that I can determine, I found this while restarting due to plasmashell occasionally eating up a pile of CPU.

wojnilowicz commented 1 year ago

Hi, you're welcome. It's probably from using timerComponentData for font property calculation. I'll look into that. Thanks for reporting.

As for the occasional eating up a pile of CPU, then I'm not sure if it's causing it. I know that there are CPU spikes during timer readouts. One can make them less often by increasing the update interval but maybe also make them lower by fixing that binding loop.

wojnilowicz commented 1 year ago

If you are concerned with this binding loop, then you could try to replace timerComponentData by timerComponent in file:///home/robertfw/.local/share/plasma/plasmoids/org.kde.workraveApplet/contents/ui/main.qml at lines 386 and 387, and see if it helps you.

falzonv commented 9 months ago

Hello @wojnilowicz,

Thank you for making this applet, it looks great!

I just observed the same error messages and can confirm that applying the fix you mentioned (replacing timerComponentData by timeComponent in lines 386 and 387 of ...contents/ui/main.qml) made these messages disappear when restarting plasmashell (which I had to do for testing something unrelated to this applet).

Best regards

wojnilowicz commented 9 months ago

Hi @falzonv, thanks. I'm glad that you like it.

If you're using the single timer mode, then you might be interested in my latest addition. It makes switching of the displayed timer way more intelligent. I used it myself for a long time but now is available to the public, but for now only on GitHub though, and not as a release.

Best regards

falzonv commented 9 months ago

Hello,

Thank you for the info, I may have a look in the future. So far I am happy with the default mode displaying all 3 timers horizontally :-)

It looks much more integrated in the desktop than the floating Workrave window, is always visible, cannot be closed by accident and don't get in the way when Alt+Tabbing. Since I already use two panels (one on top and one on the bottom), there is enough room to display all timers so I never really tried the single timer mode.

Side note: I noticed a typo in the new commit fixing the binding loop bug (https://github.com/wojnilowicz/workrave-applet/commit/1aa2653f36392d97b0e73e6b4719b382a91d39a7), it should be "timerComponent" instead of "timeComponent".

Best regards

wojnilowicz commented 9 months ago

Cool. Many thanks for spotting the typo.