sysbar icon indicating copy to clipboard operation
sysbar copied to clipboard

bar not launching

Open saberr26 opened this issue 4 months ago • 21 comments

i downloaded it from AUR first, when i launch it :

sysbar                                                                                                            09:37
MESA-INTEL: warning: ../mesa-25.2.2/src/intel/vulkan/anv_formats.c:949: FINISHME: support YUV colorspace with DRM format modifiers
MESA-INTEL: warning: ../mesa-25.2.2/src/intel/vulkan/anv_formats.c:981: FINISHME: support more multi-planar formats with DRM modifiers
The weather file does not seem to be valid: * Line 241, Column 21
  Missing '}' or object member name

fish: Job 1, 'sysbar' terminated by signal SIGSEGV (Address boundary error)

then tried to compile myself from source,but same issue here's the verbose output(MESA warnings are not related to sysbar, it's a intel thing):

sysbar -V                                                                                                         09:40
Monitor: eDP-1
MESA-INTEL: warning: ../mesa-25.2.2/src/intel/vulkan/anv_formats.c:949: FINISHME: support YUV colorspace with DRM format modifiers
MESA-INTEL: warning: ../mesa-25.2.2/src/intel/vulkan/anv_formats.c:981: FINISHME: support more multi-planar formats with DRM modifiers
Loading module: clock
Loading module: weather
Loading module: tray
Loading module: hyprland
The weather file does not seem to be valid: * Line 241, Column 21
  Missing '}' or object member name

Loading module: volume
Loading module: network
Loading module: notification
wlan0 has been added to the list
docker0 has been added to the list
CloudflareWARP has been added to the list
Default interface is docker0
fish: Job 1, 'sysbar -V' terminated by signal SIGSEGV (Address boundary error)

saberr26 avatar Sep 09 '25 08:09 saberr26

Humm it seems like the weather file got corrupt? Try running rm ~/.cache/sysbar-weather.json

System64fumo avatar Sep 09 '25 09:09 System64fumo

same issue (SIGSEV)

sysbar                                                                                                 3.13.7  10:47
MESA-INTEL: warning: ../mesa-25.2.2/src/intel/vulkan/anv_formats.c:949: FINISHME: support YUV colorspace with DRM format modifiers
MESA-INTEL: warning: ../mesa-25.2.2/src/intel/vulkan/anv_formats.c:981: FINISHME: support more multi-planar formats with DRM modifiers
Hyprland instance signature not found, Is hyprland running?
fish: Job 1, 'sysbar' terminated by signal SIGSEGV (Address boundary error)

saberr26 avatar Sep 09 '25 09:09 saberr26

I see, I've also had some issues getting sysbar running on another system of mine. I'll see if i can improve the stability a little. If you can compile this with make debug then run it with LD_LIBRARY_PATH=./build gdb sysbar then post where it crashes i'd appreciate it.

Sorry for the inconvenience..

System64fumo avatar Sep 09 '25 10:09 System64fumo

no worries, i am really happy to help! here's gdb output:

Debuginfod has been disabled.
To make this setting permanent, add 'set debuginfod enabled off' to .gdbinit.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7ffff29ff6c0 (LWP 63650)]
[New Thread 0x7ffff21fe6c0 (LWP 63651)]
[New Thread 0x7ffff19fd6c0 (LWP 63652)]
[New Thread 0x7ffff11fc6c0 (LWP 63653)]
[New Thread 0x7ffff09fb6c0 (LWP 63654)]
[New Thread 0x7fffe2e1c6c0 (LWP 63669)]
[New Thread 0x7fffe11286c0 (LWP 63670)]
[New Thread 0x7fffd6bff6c0 (LWP 63671)]
[New Thread 0x7fffd63fe6c0 (LWP 63672)]
[New Thread 0x7fffd5bfd6c0 (LWP 63673)]
[New Thread 0x7fffd53fc6c0 (LWP 63674)]
MESA-INTEL: warning: ../mesa-25.2.2/src/intel/vulkan/anv_formats.c:949: FINISHME: support YUV colorspace with DRM format modifiers
MESA-INTEL: warning: ../mesa-25.2.2/src/intel/vulkan/anv_formats.c:981: FINISHME: support more multi-planar formats with DRM modifiers
Unknown module: weather
Unknown module: tray
[New Thread 0x7fffd4bfb6c0 (LWP 63675)]
[New Thread 0x7fffbffff6c0 (LWP 63676)]
[New Thread 0x7fffbf7fe6c0 (LWP 63677)]

Thread 1 "sysbar" received signal SIGSEGV, Segmentation fault.
0x00007ffff7c4837c in Gtk::Button::set_icon_name(Glib::ustring const&) () from /usr/lib/libgtkmm-4.0.so.0
(gdb) 

also here's backtrace debug info:

(gdb) bt
#0  0x00007ffff7c4837c in Gtk::Button::set_icon_name(Glib::ustring const&) () at /usr/lib/libgtkmm-4.0.so.0
#1  0x00007ffff7c50b62 in Gtk::Button::set_image_from_icon_name(Glib::ustring const&, Gtk::IconSize, bool) ()
    at /usr/lib/libgtkmm-4.0.so.0
#2  0x00007ffff0151df5 in module_network::update_info (this=0x555555b92d10) at src/modules/network.cpp:103
#3  0x00007ffff01561f4 in std::__invoke_impl<void, void (module_network::* const&)(), module_network&>
    (__f=@0x555555b92b30: (void (module_network::*)(module_network * const)) 0x7ffff0151990 <module_network::update_info()>, __t=...) at /usr/include/c++/15.2.1/bits/invoke.h:69
#4  0x00007ffff0155f3e in std::__invoke<void (module_network::* const&)(), module_network&>
    (__fn=@0x555555b92b30: (void (module_network::*)(module_network * const)) 0x7ffff0151990 <module_network::update_info()>)
    at /usr/include/c++/15.2.1/bits/invoke.h:98
#5  0x00007ffff0155d4f in std::invoke<void (module_network::* const&)(), module_network&>
    (__fn=@0x555555b92b30: (void (module_network::*)(module_network * const)) 0x7ffff0151990 <module_network::update_info()>)
    at /usr/include/c++/15.2.1/functional:122
#6  0x00007ffff0155882 in sigc::bound_mem_functor<void (module_network::*)()>::operator() (this=0x555555b92b30)
    at /usr/include/sigc++-3.0/sigc++/functors/mem_fun.h:151
#7  0x00007ffff0156217 in std::__invoke_impl<void, sigc::bound_mem_functor<void (module_network::*)()>&> (__f=...)
    at /usr/include/c++/15.2.1/bits/invoke.h:63
#8  0x00007ffff0155f61 in std::__invoke<sigc::bound_mem_functor<void (module_network::*)()>&> (__fn=...)
    at /usr/include/c++/15.2.1/bits/invoke.h:98
#9  0x00007ffff0155d72 in std::invoke<sigc::bound_mem_functor<void (module_network::*)()>&> (__fn=...)
    at /usr/include/c++/15.2.1/functional:122
#10 0x00007ffff015589e in sigc::adaptor_functor<sigc::bound_mem_functor<void (module_network::*)()> >::operator()<>() const
    (this=0x555555b92b30) at /usr/include/sigc++-3.0/sigc++/adaptors/adaptor_trait.h:100
#11 0x00007ffff01558cd in sigc::internal::slot_call<sigc::bound_mem_functor<void (module_network::*)()>, void>::call_it
    (rep=0x555555b9b4e0) at /usr/include/sigc++-3.0/sigc++/functors/slot.h:154
#12 0x00007ffff79cf892 in Glib::DispatchNotifier::pipe_io_handler(Glib::IOCondition) () at /usr/lib/libglibmm-2.68.so.1
--Type <RET> for more, q to quit, c to continue without paging--ret
#13 0x00007ffff79cd3c1 in Glib::IOSource::dispatch(sigc::slot_base*) () at /usr/lib/libglibmm-2.68.so.1
#14 0x00007ffff79cf31b in Glib::Source::dispatch_vfunc(_GSource*, int (*)(void*), void*) () at /usr/lib/libglibmm-2.68.so.1
#15 0x00007ffff6d08880 in ??? () at /usr/lib/libglib-2.0.so.0
#16 0x00007ffff6d09cd7 in ??? () at /usr/lib/libglib-2.0.so.0
#17 0x00007ffff6d09ee5 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#18 0x00007ffff71145a6 in g_application_run () at /usr/lib/libgio-2.0.so.0
#19 0x00005555555592d1 in main (argc=1, argv=0x7fffffffe048) at src/main.cpp:148
(gdb) 

and after some debugging, it turns out that the control_network = 0x0 (null), and You’re dereferencing it to access button_action, idk if that's the issue tho, since i tried to fix it but yet the crash is still

saberr26 avatar Sep 09 '25 11:09 saberr26

Yup that's exactly the bug that i'm getting on one of my machines.

I'll try implementing some fixes hopefully by the end of the day, Thank you for providing valuable debug information!

System64fumo avatar Sep 09 '25 11:09 System64fumo

wait lol the fix actually worked but only when running with gdb

Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7ffff29ff6c0 (LWP 67053)]
[New Thread 0x7ffff21fe6c0 (LWP 67054)]
[New Thread 0x7ffff19fd6c0 (LWP 67055)]
[New Thread 0x7ffff11fc6c0 (LWP 67056)]
[New Thread 0x7ffff09fb6c0 (LWP 67057)]
[New Thread 0x7fffe2f016c0 (LWP 67058)]
[New Thread 0x7fffe11286c0 (LWP 67059)]
[New Thread 0x7fffd6bff6c0 (LWP 67060)]
[New Thread 0x7fffd63fe6c0 (LWP 67061)]
[New Thread 0x7fffd5bfd6c0 (LWP 67062)]
[New Thread 0x7fffd53fc6c0 (LWP 67063)]
MESA-INTEL: warning: ../mesa-25.2.2/src/intel/vulkan/anv_formats.c:949: FINISHME: support YUV colorspace with DRM format modifiers
MESA-INTEL: warning: ../mesa-25.2.2/src/intel/vulkan/anv_formats.c:981: FINISHME: support more multi-planar formats with DRM modifiers
Unknown module: weather
Unknown module: tray
[New Thread 0x7fffd4bfb6c0 (LWP 67064)]
[New Thread 0x7fffbbfff6c0 (LWP 67065)]
[New Thread 0x7fffbb7fe6c0 (LWP 67066)]
[New Thread 0x7fffbaffd6c0 (LWP 67067)]
[New Thread 0x7fffba7fc6c0 (LWP 67068)]

saberr26 avatar Sep 09 '25 11:09 saberr26

Interesting, What did you change? I just want to be sure just in case.

System64fumo avatar Sep 09 '25 11:09 System64fumo

@saberr26 Sorry for the long delay, Could you try now? It "should" be fixed.

No idea why it says "Unknown module: xyz" for you though?

System64fumo avatar Sep 09 '25 19:09 System64fumo

that didn't work :

(gdb) run
Starting program: /home/vanilla/git/Github/sysbar/build/sysbar
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7ffff29ff6c0 (LWP 51944)]
[New Thread 0x7ffff19fe6c0 (LWP 51945)]
[New Thread 0x7fffebfff6c0 (LWP 51946)]
[New Thread 0x7fffeaffe6c0 (LWP 51947)]
[New Thread 0x7fffe9ffd6c0 (LWP 51951)]
[New Thread 0x7fffdbfff6c0 (LWP 51952)]
[New Thread 0x7fffcffff6c0 (LWP 51953)]
[New Thread 0x7fffceffe6c0 (LWP 51954)]
[New Thread 0x7fffcdffd6c0 (LWP 51955)]
[New Thread 0x7fffc7fff6c0 (LWP 51956)]
[New Thread 0x7fffc6ffe6c0 (LWP 51957)]
MESA-INTEL: warning: ../mesa-25.2.2/src/intel/vulkan/anv_formats.c:949: FINISHME: support YUV colorspace with DRM format modifiers
MESA-INTEL: warning: ../mesa-25.2.2/src/intel/vulkan/anv_formats.c:981: FINISHME: support more multi-planar formats with DRM modifiers
[New Thread 0x7fffc5ffd6c0 (LWP 51958)]
[New Thread 0x7fffb7fff6c0 (LWP 51959)]
[New Thread 0x7fffb6ffe6c0 (LWP 51960)]
[Thread 0x7fffc5ffd6c0 (LWP 51958) exited]
[New Thread 0x7fffc5ffd6c0 (LWP 51961)]
[New Thread 0x7fffb5ffd6c0 (LWP 51962)]

Thread 1 "sysbar" received signal SIGSEGV, Segmentation fault.
0x00007ffff7c4837c in Gtk::Button::set_icon_name(Glib::ustring const&) () from /usr/lib/libgtkmm-4.0.so.0
(gdb) bt
#0  0x00007ffff7c4837c in Gtk::Button::set_icon_name(Glib::ustring const&) () at /usr/lib/libgtkmm-4.0.so.0
#1  0x00007ffff7c50b62 in Gtk::Button::set_image_from_icon_name(Glib::ustring const&, Gtk::IconSize, bool) ()
    at /usr/lib/libgtkmm-4.0.so.0
#2  0x00007ffff05be581 in module_network::update_info() () at /usr/lib/libsysbar.so
#3  0x00007ffff79cf892 in Glib::DispatchNotifier::pipe_io_handler(Glib::IOCondition) () at /usr/lib/libglibmm-2.68.so.1
#4  0x00007ffff79cd3c1 in Glib::IOSource::dispatch(sigc::slot_base*) () at /usr/lib/libglibmm-2.68.so.1
#5  0x00007ffff79cf31b in Glib::Source::dispatch_vfunc(_GSource*, int (*)(void*), void*) ()
    at /usr/lib/libglibmm-2.68.so.1
#6  0x00007ffff6d08880 in ??? () at /usr/lib/libglib-2.0.so.0
#7  0x00007ffff6d09cd7 in ??? () at /usr/lib/libglib-2.0.so.0
#8  0x00007ffff6d09ee5 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#9  0x00007ffff71145a6 in g_application_run () at /usr/lib/libgio-2.0.so.0
#10 0x0000555555556cc3 in ??? ()
#11 0x00007ffff6e27675 in ??? () at /usr/lib/libc.so.6
#12 0x00007ffff6e27729 in __libc_start_main () at /usr/lib/libc.so.6
#13 0x0000555555556e45 in ??? ()
(gdb)

saberr26 avatar Sep 09 '25 21:09 saberr26

Odd..? How did you resolve it earlier?

System64fumo avatar Sep 09 '25 21:09 System64fumo

it was quite simple i just Fixed thread safety by moving all GUI calls to the main thread using signal_idle() instead of calling them directly from the background network thread. but that caused a race condition sadly(worked only on gdb)

saberr26 avatar Sep 09 '25 22:09 saberr26

I see, I also forgot about that so good on you for reminding me to do that. I've been thinking of rewriting the entire network module from scratch again since it's a complete mess + I would like to expand on a few things. Would you rather me try to push out a quick fix for this or wait until the network module is rewritten?

I should also ask, Does sysbar work fine without the network module? Just that one module in particular is causing issues?

System64fumo avatar Sep 09 '25 22:09 System64fumo

I think i found the issue, I'm able to reproduce your exact issue. Will roll out a few more stability fixes and we'll see from there.

System64fumo avatar Sep 10 '25 03:09 System64fumo

Alright feel free to give it another go, Should be good now.

System64fumo avatar Sep 10 '25 03:09 System64fumo

sorry for late reply mate, I was tired last night so I slept earlier than usual, however, the fix doesn't seem to work, same issues as before, i am free today so i will try further debugging, but before that, it's working for you right? if yes, what's the icons theme are you using, because i think it maybe the issue, since the Segmentation fault always happens at Gtk::Button::set_icon_name , likely because it's being called outside the main thread?

saberr26 avatar Sep 10 '25 09:09 saberr26

ok i did some further debugging,it sounds like the Crash occurs in sidepanel::setup_header() because Gtk::Button::set_icon_name is called before the button is fully realized, which GTK4 cannot safely handle???? sorry but i almost never touched GUI dev before so i might be dumb in some things

Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (Gtk::Button::set_icon_name) pending.
(gdb) run
Starting program: /home/vanilla/git/Github/sysbar/build/sysbar

This GDB supports auto-downloading debuginfo from the following URLs:
  <https://debuginfod.archlinux.org>
Enable debuginfod for this session? (y or [n]) n
Debuginfod has been disabled.
To make this setting permanent, add 'set debuginfod enabled off' to .gdbinit.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7ffff29ff6c0 (LWP 127698)]
[New Thread 0x7ffff19fe6c0 (LWP 127699)]
[New Thread 0x7fffebfff6c0 (LWP 127700)]
[New Thread 0x7fffeaffe6c0 (LWP 127701)]
[New Thread 0x7fffe9ffd6c0 (LWP 127705)]
[New Thread 0x7fffdbfff6c0 (LWP 127706)]
[New Thread 0x7fffcffff6c0 (LWP 127707)]
[New Thread 0x7fffceffe6c0 (LWP 127708)]
[New Thread 0x7fffcdffd6c0 (LWP 127709)]
[New Thread 0x7fffc7fff6c0 (LWP 127710)]
[New Thread 0x7fffc6ffe6c0 (LWP 127711)]
MESA-INTEL: warning: ../mesa-25.2.2/src/intel/vulkan/anv_formats.c:949: FINISHME: support YUV colorspace with DRM format modifiers
MESA-INTEL: warning: ../mesa-25.2.2/src/intel/vulkan/anv_formats.c:981: FINISHME: support more multi-planar formats with DRM modifiers

Thread 1 "sysbar" hit Breakpoint 1, 0x00007ffff7c48368 in Gtk::Button::set_icon_name(Glib::ustring const&) ()
   from /usr/lib/libgtkmm-4.0.so.0
(gdb) bt
#0  0x00007ffff7c48368 in Gtk::Button::set_icon_name(Glib::ustring const&) () at /usr/lib/libgtkmm-4.0.so.0
#1  0x00007ffff7c50b62 in Gtk::Button::set_image_from_icon_name(Glib::ustring const&, Gtk::IconSize, bool) ()
    at /usr/lib/libgtkmm-4.0.so.0
#2  0x00007ffff2d47339 in sidepanel::setup_header() () at /usr/lib/libsysbar.so
#3  0x00007ffff2d4a6b1 in ??? () at /usr/lib/libsysbar.so
#4  0x00007ffff2d4aa70 in ??? () at /usr/lib/libsysbar.so
#5  0x00007ffff2d4ab92 in sysbar::setup_overlay_widgets() () at /usr/lib/libsysbar.so
#6  0x00007ffff2d4f0b4 in ??? () at /usr/lib/libsysbar.so
#7  0x00007ffff2d4f500 in sysbar_create () at /usr/lib/libsysbar.so
#8  0x0000555555559272 in main (argc=1, argv=0x7fffffffe168) at src/main.cpp:141

saberr26 avatar Sep 10 '25 10:09 saberr26

Odd.. Well since i'm unable to properly reproduce this i highly appreciate your debugging efforts. Just as a sanity check.. Do you mind running it like so: GSK_RENDERER=cairo sysbar? And do you mind sending me your config? ~/.config/sys64/bar/config.conf I can give this another round of bugfixes/cleanups but i highly doubt it would fix it..

System64fumo avatar Sep 10 '25 15:09 System64fumo

my config is same as yours:

[main]
position=0
size=40
layer=3
exclusive=true
verbose=false
main-monitor=HDMI-A-1
modules-start=clock,weather,tray
modules-center=hyprland
modules-end=mpris,volume,network,notification
sidepanel-start-size=350
sidepanel-end-size=350

[clock]
interval=1000
label-format=%H
tooltip-format=%Y/%m/%d
widget-layout=0044

[weather]
url=https://wttr.in/?format=j1
unit=c

[hyprland]
character-limit=128

[volume]
show-label=false
widget-layout=0441

[network]
show-label=false

[bluetooth]
show-icon=false

[backlight]
show-icon=false
show-label=false
path=/tmp/backlight
widget-layout=0341

[taskbar]
show-icon=true
show-label=true
text-length=14
icon-size=32

[notification]
command=aplay /home/amir/Music/ds-harmony/message-new-instant.wav

[mpris]
show-icon=false
show-label=false
widget-layout=0142

[cellular]
show-icon=true
show-label=false

also : GSK_RENDERER=cairo ./build/sysbar  17:22 fish: Job 1, 'GSK_RENDERER=cairo ./build/sysb…' terminated by signal SIGSEGV (Address boundary error)

saberr26 avatar Sep 10 '25 16:09 saberr26

Ah no lol The config is outdated, I rolled out a breaking change a few days ago.

Modules are no longer in the [main] section, They got their own dedicated [modules] section

Update sysbar cp /usr/share/sys64/bar/config.conf ~/.config/sys64/bar/config.conf And because i goofed up yesterday and forgot to include this, Add a controls module before every module in the end part.

Your modules section should look something like this:

[modules]
start=clock,weather,tray
center=hyprland
end=controls,mpris,volume,network,bluetooth,notification
icon-size=16

(Icon size stuff will be deprecated soon too in favor of more specific user customization via CSS instead of the config)

System64fumo avatar Sep 10 '25 16:09 System64fumo

still same issue:

./build/sysbar                                                                                                    20:19
MESA-INTEL: warning: ../mesa-25.2.2/src/intel/vulkan/anv_formats.c:949: FINISHME: support YUV colorspace with DRM format modifiers
MESA-INTEL: warning: ../mesa-25.2.2/src/intel/vulkan/anv_formats.c:981: FINISHME: support more multi-planar formats with DRM modifiers
Hyprland instance signature not found, Is hyprland running?
fish: Job 1, './build/sysbar' terminated by signal SIGSEGV (Address boundary error)

the hyprland error is because i am on wayfire

saberr26 avatar Sep 10 '25 19:09 saberr26

Yeah no clue.. to be honest.. Try removing every module and add them one by one?

System64fumo avatar Sep 10 '25 19:09 System64fumo

@saberr26 Got my friend to try my bar recently, He used to have issues too. Can you try now?

System64fumo avatar Dec 21 '25 23:12 System64fumo

ok we'll try

saberr26 avatar Dec 22 '25 15:12 saberr26