elkowar / eww

ElKowars wacky widgets
https://elkowar.github.io/eww
MIT License
8.78k stars 366 forks source link

[BUG] graphs with values causes error_handling_ctx #1114

Closed jlo62 closed 1 day ago

jlo62 commented 3 weeks ago

Checklist before submitting an issue

Description of the bug

I think this is similar to #1072, but it only happens for graphs.

I can replace the graphs with labels, and these values are correctly within the range 0-100.

Interestingly enough, the exact config worked a week ago before I reinstalled.

A example configuration:

(defwidget info_graph_ramx [value]
    ;(graph :class "info_graph" :value "${value}" :time-range "60s" :thickness 2 :height 100)
    (info_textboxx :title "none" :value "${value}")
)

It doesn't freeze eww when :value "10", but it also doesn't show a graph.

The output:

 2024-06-08T06:26:29.314Z INFO  eww::app               > Opening window bar as 'bar'
 2024-06-08T06:26:29.314Z INFO  eww::app               > Closing gtk window bar
 2024-06-08T06:26:29.337Z INFO  eww::server            > Reloaded config successfully
thread 'main' panicked at crates/eww/src/widgets/widget_definitions.rs:1170:33:
property 'value' of type 'Graph' can't be set from given value, it is invalid or out of range
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 2024-06-08T06:26:30.341Z ERROR eww::error_handling_ctx > channel closed
 2024-06-08T06:26:30.352Z ERROR eww::script_var_handler > [crates/eww/src/script_var_handler.rs:284] Error while executing listen-var command ~/.config/eww/bin/get_sysinfo: channel closed
 2024-06-08T06:26:31.433Z ERROR eww::error_handling_ctx > channel closed
 2024-06-08T06:26:31.437Z ERROR eww::error_handling_ctx > channel closed
 2024-06-08T06:26:32.444Z ERROR eww::error_handling_ctx > channel closed
 2024-06-08T06:26:33.526Z ERROR eww::error_handling_ctx > channel closed

The last line repeats once every second

Reproducing the issue

No response

Expected behaviour

No response

Additional context

No response

lenianiva commented 3 weeks ago

If you set the value to a constant, would the graph just not update? Then the graph is technically there but it never updates.

jlo62 commented 3 weeks ago

Yes, it uses up the space (this may also be the box around it) but it never appears

jlo62 commented 1 day ago

Seems to have been a bad build, it works now.