Waybar: Crash on multiple monitors wake up

When waking up monitors from DPMS, waybar sometimes crash around this line: https://github.com/Alexays/Waybar/blob/f233d27b782c04ef128e3d71ec32a0b2ce02df39/src/bar.cpp#L33

        Signal: 11 (SEGV)
     Timestamp: Fri 2021-02-05 17:37:53 UTC (13min ago)
  Command Line: /nix/store/8nyxlm520y29bqinfb28qn0xsd5bdjgq-waybar-0.9.5/bin/waybar --config /nix/store/hi6l2j1fb5ls1q84vcgzrax6v9w4c7g5-waybar_conf.json --style /nix/store/68p5zz5prq4825yjb1ijy526avycqf25-waybar_style.css
    Executable: /nix/store/8nyxlm520y29bqinfb28qn0xsd5bdjgq-waybar-0.9.5/bin/.waybar-wrapped

I only have a partial coredump:

(gdb) bt
#0  0x000000000044067b in waybar::GLSSurfaceImpl::GLSSurfaceImpl(Gtk::Window&, waybar::waybar_output&) ()
Backtrace stopped: Cannot access memory at address 0x7ffcf02dda08

I’ll try to capture a better coredump

(gdb) disas 0x000000000044067b
Dump of assembler code for function _ZN6waybar14GLSSurfaceImplC2ERN3Gtk6WindowERNS_13waybar_outputE:
   0x00000000004405d0 <+0>:	push   %r15
   0x00000000004405d2 <+2>:	push   %r14
   0x00000000004405d4 <+4>:	push   %r13
   0x00000000004405d6 <+6>:	lea    0x8(%rdi),%r13
   0x00000000004405da <+10>:	push   %r12
   0x00000000004405dc <+12>:	mov    %rdx,%r12
   0x00000000004405df <+15>:	push   %rbp
   0x00000000004405e0 <+16>:	mov    %rsi,%rbp
   0x00000000004405e3 <+19>:	push   %rbx
   0x00000000004405e4 <+20>:	mov    %rdi,%rbx
   0x00000000004405e7 <+23>:	lea    0x18(%rbx),%r14
   0x00000000004405eb <+27>:	sub    $0x48,%rsp
   0x00000000004405ef <+31>:	mov    %fs:0x28,%rax
   0x00000000004405f8 <+40>:	mov    %rax,0x38(%rsp)
   0x00000000004405fd <+45>:	mov    $0x4b8f88,%rax
   0x0000000000440604 <+52>:	add    $0x10,%rax
   0x0000000000440608 <+56>:	mov    %rax,(%rdi)
   0x000000000044060b <+59>:	mov    %r13,%rdi
   0x000000000044060e <+62>:	call   0x4162c0 <_ZN4sigc9trackableC2Ev@plt>
   0x0000000000440613 <+67>:	mov    $0x4b8fd8,%rax
   0x000000000044061a <+74>:	mov    %rbp,0x10(%rbx)
   0x000000000044061e <+78>:	mov    %r14,%rdi
   0x0000000000440621 <+81>:	movq   $0x0,0x20(%rbx)
   0x0000000000440629 <+89>:	lea    0x8(%r12),%rsi
   0x000000000044062e <+94>:	add    $0x10,%rax
   0x0000000000440632 <+98>:	movb   $0x0,0x28(%rbx)
   0x0000000000440636 <+102>:	mov    %rax,(%rbx)
   0x0000000000440639 <+105>:	lea    0x28(%rbx),%rax
   0x000000000044063d <+109>:	mov    %rax,0x18(%rbx)
   0x0000000000440641 <+113>:	movb   $0x0,0x40(%rbx)
   0x0000000000440645 <+117>:	call   0x4177f0 <_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_@plt>
   0x000000000044064a <+122>:	mov    0x10(%rbx),%rax
   0x000000000044064e <+126>:	mov    (%rax),%rdx
   0x0000000000440651 <+129>:	mov    -0x18(%rdx),%rdx
   0x0000000000440655 <+133>:	mov    0x8(%rax,%rdx,1),%rdi
   0x000000000044065a <+138>:	call   0x4177e0 <gtk_layer_init_for_window@plt>
   0x000000000044065f <+143>:	mov    0x0(%rbp),%rax
   0x0000000000440663 <+147>:	xor    %esi,%esi
   0x0000000000440665 <+149>:	mov    -0x18(%rax),%rax
   0x0000000000440669 <+153>:	mov    0x8(%rbp,%rax,1),%rdi
   0x000000000044066e <+158>:	call   0x417db0 <gtk_layer_set_keyboard_interactivity@plt>
   0x0000000000440673 <+163>:	mov    (%r12),%rdx
   0x0000000000440677 <+167>:	mov    0x10(%rbx),%rax
   0x000000000044067b <+171>:	mov    (%rdx),%rcx
   0x000000000044067e <+174>:	mov    -0x18(%rcx),%rcx
   0x0000000000440682 <+178>:	mov    0x8(%rdx,%rcx,1),%rsi
   0x0000000000440687 <+183>:	mov    (%rax),%rdx
   0x000000000044068a <+186>:	mov    -0x18(%rdx),%rdx
   0x000000000044068e <+190>:	mov    0x8(%rax,%rdx,1),%rdi
   0x0000000000440693 <+195>:	call   0x417d00 <gtk_layer_set_monitor@plt>
   0x0000000000440698 <+200>:	mov    0x10(%rbx),%rax
   0x000000000044069c <+204>:	lea    0x5718f(%rip),%rsi        # 0x497832
   0x00000000004406a3 <+211>:	mov    (%rax),%rdx
   0x00000000004406a6 <+214>:	mov    -0x18(%rdx),%rdx
   0x00000000004406aa <+218>:	mov    0x8(%rax,%rdx,1),%rdi
   0x00000000004406af <+223>:	call   0x416bc0 <gtk_layer_set_namespace@plt>
   0x00000000004406b4 <+228>:	lea    0x10(%rsp),%r12
   0x00000000004406b9 <+233>:	mov    %rbp,%rsi
   0x00000000004406bc <+236>:	mov    %r12,%rdi
   0x00000000004406bf <+239>:	call   0x416650 <_ZN3Gtk6Widget22signal_configure_eventEv@plt>
   0x00000000004406c4 <+244>:	mov    $0x58,%edi
   0x00000000004406c9 <+249>:	call   0x417a90 <_Znwm@plt>
   0x00000000004406ce <+254>:	mov    %rax,%rdi
   0x00000000004406d1 <+257>:	mov    %rax,%rbp
   0x00000000004406d4 <+260>:	call   0x4162c0 <_ZN4sigc9trackableC2Ev@plt>
   0x00000000004406d9 <+265>:	mov    $0x43fc90,%rax
   0x00000000004406e0 <+272>:	mov    %rbp,%rsi
   0x00000000004406e3 <+275>:	movq   $0x0,0x8(%rbp)
   0x00000000004406eb <+283>:	mov    %r13,0x48(%rbp)
   0x00000000004406ef <+287>:	mov    0x7b83a(%rip),%rdx        # 0x4bbf30
   0x00000000004406f6 <+294>:	mov    %r13,%rdi
   0x00000000004406f9 <+297>:	mov    %rax,0x10(%rbp)

Waybar 0.9.5 I have multiple monitors and some are connected with MST (displayport daisychain) and they dont all come back at once.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 18 (7 by maintainers)

Commits related to this issue

Most upvoted comments

Any chance you’d know where to capture either the output name or the serial number of the output?

Yes, see updated gist contents.