Comments (7)
It works now, thanks!
from macchina.
It looks like sysctl hw.model
may have returned an ill-formatted byte which led to the panic. I'm working on fixing this.
from macchina.
I went and wrapped the value_string
invocation using our own ReadoutError
which will propagate to macchina in a safe way. The panic should no longer occur and --doctor
will show us an error message that may or may not help.
from macchina.
❯ RUST_BACKTRACE=full target/release/macchina --doctor
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Utf8Error(Utf8Error { valid_up_to: 48, error_len: Some(1) })', /home/yonas/.cargo/registry/src/github.com-1ecc6299db9ec823/libmacchina-6.4.0/src/freebsd/mod.rs:245:14
stack backtrace:
0: 0x32a3d53dd75c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he71fd4eda74f87b0
1: 0x32a3d535696e - core::fmt::write::h5fd3e26984166a6e
2: 0x32a3d53c30b4 - std::io::Write::write_fmt::h69fa03c5d51d5c91
3: 0x32a3d53dd537 - std::sys_common::backtrace::print::h05788f88478cef7c
4: 0x32a3d53c3885 - std::panicking::default_hook::{{closure}}::h0a304c2f161776d3
5: 0x32a3d53c4194 - std::panicking::rust_panic_with_hook::h2b720056ea930d75
6: 0x32a3d53ddbb4 - std::panicking::begin_panic_handler::{{closure}}::h9b43afdf57796039
7: 0x32a3d53ddb1c - std::sys_common::backtrace::__rust_end_short_backtrace::he531317bc19f7b93
8: 0x32a3d53c3b01 - rust_begin_unwind
9: 0x32a3d53586d2 - core::panicking::panic_fmt::hf50430e1e32891db
10: 0x32a3d5358ae2 - core::result::unwrap_failed::ha57a5a37c8028fff
11: 0x32a3d5377a4c - macchina::data::get_all_readouts::hef727af34dbb0250
12: 0x32a3d53692e3 - macchina::main::h9baa4fd3d260d27c
13: 0x32a3d5365059 - std::sys_common::backtrace::__rust_begin_short_backtrace::hd5483f5276f70cc0
14: 0x32a3d53656c9 - main
❯ RUST_BACKTRACE=full target/release/macchina
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Utf8Error(Utf8Error { valid_up_to: 48, error_len: Some(1) })', /home/yonas/.cargo/registry/src/github.com-1ecc6299db9ec823/libmacchina-6.4.0/src/freebsd/mod.rs:245:14
stack backtrace:
0: 0x149b30c6d75c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he71fd4eda74f87b0
1: 0x149b30be696e - core::fmt::write::h5fd3e26984166a6e
2: 0x149b30c530b4 - std::io::Write::write_fmt::h69fa03c5d51d5c91
3: 0x149b30c6d537 - std::sys_common::backtrace::print::h05788f88478cef7c
4: 0x149b30c53885 - std::panicking::default_hook::{{closure}}::h0a304c2f161776d3
5: 0x149b30c54194 - std::panicking::rust_panic_with_hook::h2b720056ea930d75
6: 0x149b30c6dbb4 - std::panicking::begin_panic_handler::{{closure}}::h9b43afdf57796039
7: 0x149b30c6db1c - std::sys_common::backtrace::__rust_end_short_backtrace::he531317bc19f7b93
8: 0x149b30c53b01 - rust_begin_unwind
9: 0x149b30be86d2 - core::panicking::panic_fmt::hf50430e1e32891db
10: 0x149b30be8ae2 - core::result::unwrap_failed::ha57a5a37c8028fff
11: 0x149b30c07a4c - macchina::data::get_all_readouts::hef727af34dbb0250
12: 0x149b30bf92e3 - macchina::main::h9baa4fd3d260d27c
13: 0x149b30bf5059 - std::sys_common::backtrace::__rust_begin_short_backtrace::hd5483f5276f70cc0
14: 0x149b30bf56c9 - main
from macchina.
Did you point the libmacchina dependency to its git branch?
Something like:
# Cargo.toml
libmacchina = { git = "https://github.com/Macchina-CLI/libmacchina" }
from macchina.
@grtcdr After updating Cargo.toml
, I get this compile error:
Compiling macchina v6.1.8 (/usr/home/yonas/git/make-cd/files/macchina)
error[E0425]: cannot find function `version` in crate `libmacchina`
--> src/main.rs:118:46
|
118 | println!("libmacchina {}", libmacchina::version());
| ^^^^^^^ not found in `libmacchina`
For more information about this error, try `rustc --explain E0425`.
error: could not compile `macchina` due to previous error
I didn't get this error for pfetch-rs after updating its Cargo.toml.
from macchina.
Sorry about this.
You should also enable the version
feature.
libmacchina = { git = "https://github.com/Macchina-CLI/libmacchina", features = ["version"] }
from macchina.
Related Issues (20)
- [BUG] WSL2 openSUSE Tumbleweed zypper packages didn't show up HOT 4
- [Feature Request] More standard and versioned release artifacts on github
- Accept disk path(s) to display usage of specified disk / multiple disks
- [BUG] Build failed with libgit2 1.6.4 on Arch Linux HOT 2
- [BUG] Fails to build with ratatui HOT 2
- [BUG] Add Debian point releases from /etc/debian_version HOT 2
- [New Distro] - Amazon Linux HOT 1
- Display aarch64 CPU info HOT 3
- [BUG] macOS Sonoma is shown as 'macOS 14.0.0 Unknown' HOT 10
- Does Macchina support two batteries? HOT 3
- [BUG] error[E0432]: unresolved imports `vergen::Config`, `vergen::ShaKind`, error[E0425]: cannot find function `vergen` in crate `vergen` HOT 1
- [BUG] Macchina errors for me when using the provided macchina.toml HOT 2
- -o isn't working properly HOT 5
- Wrong battery value on MacOS HOT 10
- CPU Load value greater than 100% on MacOS HOT 12
- [BUG] install failure (build and cargo run works just fine, however) HOT 2
- [Feature Request] Image support like Neofetch. HOT 1
- [BUG] version `GLIBC_2.33' not found HOT 5
- [BUG] no themes installed and no configs is found HOT 1
- [FEATURE] Palette spacing HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from macchina.