Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] EWW crashes completely when circular progress goes out of range #854

Closed
3 tasks done
Jayden876212old opened this issue Jul 25, 2023 · 2 comments
Closed
3 tasks done
Labels
bug Something isn't working

Comments

@Jayden876212old
Copy link

Checklist before submitting an issue

  • I have searched through the existing closed and open issues for eww and made sure this is not a duplicate
  • I have specifically verified that this bug is not a common user error
  • I am providing as much relevant information as I am able to in this bug report (Minimal config to reproduce the issue for example, if applicable)

Description of the bug

When I am running a window with some quite extensive performance metrics, it will crash the eww daemon completely and at random with the error:
thread 'main' panicked at 'called Result::unwrap()on anErrvalue: BoolError { message: "property 'value' of type 'CircProg' can't be set from given value, it is invalid or out of range", filename: "/home/tdljayden/.cargo/registry/src/github.com-1ecc6299db9ec823/glib-0.15.12/src/object.rs", function: "glib::object", line: 3393 }', /home/tdljayden/.cargo/registry/src/github.com-1ecc6299db9ec823/glib-0.15.12/src/object.rs:2238:53 note: run withRUST_BACKTRACE=1 environment variable to display a backtrace

Reproducing the issue

`(defwidget performancepanelbox []
(box :class "sticker" :orientation "v" :space-evenly "false" :spacing 20 :valign "center" :height 1020
(meminfo)
(tempinfo)
(box :class "container" :orientation "h" :space-evenly "false" :spacing 20 :halign "center" :valign "center"
(driveinfo)
(faninfo))
(fetch)))

(defvar circularmetricsmallwidth 100)
(defvar circularmetricwidth 120)

(defwidget circularmetric [text value width ?fontclass colour]
(box :class "container" :halign "center" :width width :height 75 :orientation "v"
(circular-progress :value value
:thickness 10
:start-at 75
:class "${colour}circularbar"
(label :text text
:class fontclass
:limit-width 10
:wrap false))
(children)))

(defwidget faninfo []
(box :class "containerborder" :orientation "h" :halign "center" :valign "center" :height 300
(circularmetric :text "󰈐"
:value { ( (sensors.it8665-isa-0290.fan3.fan3_input) / 1900 ) * 100}
:width circularmetricsmallwidth
:fontclass "faniconfont"
:colour "green"
(label :text "${sensors.it8665-isa-0290.fan3.fan3_input} RPM")
(label :text "CPU Fan"))
(circularmetric :text "󰈐"
:value { ( (sensors.it8665-isa-0290.fan6.fan6_input) / 5000 ) * 100 }
:width circularmetricsmallwidth
:fontclass "faniconfont"
:colour "green"
(label :text "${sensors.it8665-isa-0290.fan6.fan6_input} RPM")
(label :text "CPU Pump"))
(circularmetric :text "󰈐"
:value { ( (sensors.amdgpu-pci-0b00.fan1.fan1_input) / 2700 ) * 100}
:width circularmetricsmallwidth
:fontclass "faniconfont"
:colour "red"
(label :text "${sensors.amdgpu-pci-0b00.fan1.fan1_input} RPM")
(label :text "GPU Fan"))))

(defwindow performancepanel0
:monitor 0
:geometry (geometry :x "10px"
:y "10px"
:width "30%"
:height "94.5%"
:anchor "top left")
:stacking "overlay"
:exclusive false
(box
(performancepanelbox)))`

Expected behaviour

I'm assuming that since the thread is panicking, that it is some sort of error picked up by the program itself rather than the logs. From what I know, this means that it is a bug and not simply a user error, because eww should not use a value if it knows that the value is above a certain range and simply display the maximum value instead, as this wouldn't crash the whole program including my bar.

Additional context

image

I suspect this is because one of my circular progress widgets goes out of range, and I'm leaning towards it being the one for the CPU pump's RPM as it could go over 5000 RPM.

@Jayden876212old Jayden876212old added the bug Something isn't working label Jul 25, 2023
@Jayden876212old
Copy link
Author

I'm not sure why the config isn't indenting.

@Jayden876212old Jayden876212old changed the title [BUG] [BUG] EWW crashes completely when circular progress goes out of range Jul 26, 2023
@willifan
Copy link

I have also noticed this, on the same note EWW_BATTERY.total_avg can exceed 100 causing eww to crash when used as is in circular progress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants