scorpion-26 / gBar

Blazingly fast status bar written with GTK
MIT License
478 stars 17 forks source link

gBar crashes when nvml features are unsupported #52

Closed aramacs closed 11 months ago

aramacs commented 11 months ago

Describe the bug The bug I'm facing after I finally manage to config my Nvidia 630M card to play on Hyprland. After that gBar crashes and won't open.

OS Arch Linux Hyprland

Screenshot_2023-09-19-07-58-05_1103

scorpion-26 commented 11 months ago

Does it crash(Segmentation fault or similar) or does it not open(idles forever). If it idles, please install and start either pipewire or pulseaudio and see if that changes anything. If it crashes, please debug it with gdb, as the don't reveal further clues: gdb /<pathtogbar>/gBar and run bar 0 inside gdb. Please post any output of gdb.

The config warning is not critical, if you want to configure gBar, please read the corresponding section in the README. The warning should go away.

aramacs commented 11 months ago

Maybe I'm too young to play with that... kidding. So I couldn't play gdb the way you said. But, I unninstalled and compile from source. Then, the error goes on and I had that:

image

scorpion-26 commented 11 months ago

Does the bar open now, as those are all benign warnings and I can't see any indications of a crash in the screenshot. If it did indeed crash, a crash report via gdb would be really useful. I forgot to mention, for gdb to display any helpful information you need debug symbols(Run inside where gbar is cloned): meson setup build-debug -Dbuildtype=debug && ninja -C build-debug to build, then gdb build-debug/gBar and run bar 0 inside gdb.

aramacs commented 11 months ago

It still won't open.

Screenshot_2023-09-20-08-54-07_16855

scorpion-26 commented 11 months ago

run bar 0 not bar 0

aramacs commented 11 months ago

My bad. First time using gdb.

That was my result

Screenshot_2023-09-20-14-48-43_12048

scorpion-26 commented 11 months ago

Ok, gBar crashes, because gpu utilization is not supported on your gpu. I'll be working on a fix.

scorpion-26 commented 11 months ago

Should be fixed now. Instead of crashing, gBar will disable the GPU module, since the required information isn't available.

aramacs commented 11 months ago

Ok. I proceed making another clone of the repo. This time I think I have an error in the compile. Screenshot_2023-09-21-11-13-13_18058

Then when I run gBar bar 0, it shows that

Screenshot_2023-09-21-11-14-54_8177

And gdb crashes

image

scorpion-26 commented 11 months ago

The build failed, so no binaries have been built or installed. The first error is still the initial error from when you first installed gBar. The gdb error is due to the fact that there is no local binary, because the build failed.

Since you're on arch, I'd recommend you to use my AUR package (In the following I use yay, other tools should work similar): yay -S gbar-git. Then check if you've got any remaining files from local installations left in /usr/local (/usr/local/bin/gBar, /usr/local/lib/libgBar.a, /usr/local/include/gBar), as they could interfere with the AUR installation. Running it now with gBar bar 0 should use the updated version.

In case you're wondering about the build error, you forgot to clone a submodule. git submodule update --init, then ninja -C build-debug again should work. build-debug/gBar bar 0 to run it.

aramacs commented 11 months ago

It works! Thanks to the whole explanation. I'm kind a new to open source and programming too. I'm very excited about open source projects and WM's and the rabbit hole of personalization. Your bar is a really good project.

Cheers from Brazil

scorpion-26 commented 11 months ago

No problem. And good luck on your open source journey!