-
Notifications
You must be signed in to change notification settings - Fork 2
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
Panic - thread 'main' panicked at 'Ratio should be between 0 and 1 inclusively.' #1
Comments
@ltrook21 what GPU do you have? do you know the architecture? |
@ltrook21 maybe fix : https://github.com/alphastrata/nvtop/tree/fix/panic-issue%231 much appreciated if you can try. |
Sure, I'll give it try between tomorrow and Monday. Unfortunately I don't have a lot of time. Also it seems that the link you posted is giving me a 404. Thanks for the work so far, and being so quick with a response! |
I'm pretty sure some work done this after noon will either of fixed this, or if you pass in the Lemme know |
So I ran it again after pulling the changes, still getting this error: FWIW, I have an Nvidia RTX 3070 TI in a gaming laptop, 2022 release so pretty new hardware. |
somewhere the graphs' using the |
Yep |
Are you able to use |
#12 this can solve the problem comment-blocked re-scan beceause discover_gpus not implemented, also added let percentage = match avg.is_nan() {
true => 0.0,
false => avg
};
let label = match avg.is_nan() {
true => "No fan".to_string(),
false => format!("{:.1}%", avg)
}; so if there is no fans, it will show no fans. (i think there can be a more efficient way) |
So I don't know if this might be helpful at all but nvtop works perfectly on my desktop with an Nvidia RTX 2060. The problem is on my laptop with an RTX 3070 ti... |
Because on desktop, your GPU has a fan and it's connected on your GPU card. On the laptop, your mobile GPU doesn't have fans, yes it has fans, but they are connected to your motherboard, like any case fans in your desktop. So, the program doesn't detect it as a GPU fan. on the program, the fan percentage becomes NaN, and you are clamping it, and becomes NaN, and ratatui says it must be between 0 and 1. and the pull request i made it makes it "If fan spin is NaN, its zero and label is 'No fans'". i tested it on a GTX1060 6GB and Victus 16 laptop, works fine. |
@bktech2021's work (I think) will fix this @ltrook21 -- I just suggested a few changes and we can get it merged in. |
Awesome. Will give it a shot between tonight and tomorrow so we can close this out. |
Built from source.
Unable to run the program.
thread 'main' panicked at 'Ratio should be between 0 and 1 inclusively.' ..../.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.23.0/src/widgets/gauge.rs:62:9 note: run with
RUST_BACKTRACE=1environment variable to display a backtrace
I should probably also note that I'm running this with hybrid graphics enabled, and connected to a power supply.
The text was updated successfully, but these errors were encountered: