marhkb / pods

Keep track of your podman containers
GNU General Public License v3.0
739 stars 15 forks source link

circular_progress_bar crash #641

Closed sielnet closed 1 year ago

sielnet commented 1 year ago

Reproduction steps

Install latest Pods version from flathub. Start Pods. Pods crashes.

flatpak run com.github.marhkb.Pods

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/view/component/circular_progress_bar.rs:140:18
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Environment

marhkb commented 1 year ago

Thanks for reporting. This crashes on coloring the circular progress bar.

https://github.com/marhkb/pods/blob/6f01bbfaca4eb1a2b055f707e5198ea0842fa9b9/src/view/component/circular_progress_bar.rs#L140

Are your using a custom theme / stylesheet?

sielnet commented 1 year ago

I updated to version xxx from flatpak.

Still the same error:

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', 
src/view/component/circular_progress_bar.rs:140:18

Are your using a custom theme / stylesheet? Yes but it is a official theme. I am running fedora 38. I choose "prefer dark theme" for the gtk4 apps. And I set env=GTK_THEME=Adwaita-dark for gtk3 apps. Adwaita is not a custom theme. MAybe it does not work with adwaita dark?

gsettings set org.gnome.desktop.interface color-scheme prefer-dark flatpak install org.gtk.Gtk3theme.Adwaita-dark flatpak install flathub org.kde.KStyle.Adwaita sudo flatpak override --env=GTK_THEME=Adwaita-dark and i set Adwaita-dark in gnome-tweak

sielnet commented 1 year ago

I was able to "fix" it by sudo flatpak override --unset-env=GTK_THEME

marhkb commented 1 year ago

Thanks for the feeedback. I can reproduce it with sudo flatpak override --env=GTK_THEME=Adwaita-dark.

I just had a look at https://gitlab.gnome.org/World/Authenticator/-/blob/master/src/widgets/progress_icon.rs#L52 and think I will use the same approach to fix it.