hyprwm / Hyprland

Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
21.07k stars 881 forks source link

Clicking on the waybar wlr/taskbar icon does not switch between running programs correctly #6481

Closed hdm9527 closed 1 month ago

hdm9527 commented 4 months ago

Bug or Regression?

Bug

System Info and Version

System/Version info ```sh Hyprland, built from branch main at commit 4842eb83b444418ad3fe1901d645dd02224989e5 (helpers: make shm_open() portable after 8bcccf9f0f0f (6471)). Date: Thu Jun 13 20:20:14 2024 Tag: v0.41.1-2-g4842eb83, commits: 4820 flags: (if any) System Information: System name: Linux Node name: Arch Release: 6.9.3-2-cachyos-echo-lto Version: #1 SMP PREEMPT_DYNAMIC Thu, 06 Jun 2024 06:05:56 +0000 GPU information: 64:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Phoenix1 [1002:15bf] (rev c7) (prog-if 00 [VGA controller]) os-release: NAME="Arch Linux" PRETTY_NAME="Arch Linux" ID=arch BUILD_ID=rolling ANSI_COLOR="38;2;23;147;209" HOME_URL="https://archlinux.org/" DOCUMENTATION_URL="https://wiki.archlinux.org/" SUPPORT_URL="https://bbs.archlinux.org/" BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues" PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/" LOGO=archlinux-logo plugins: ```

Description

Clicking on the waybar wlr/taskbar icon does not switch between running programs correctly. This bug also causes rofi to crash. Related Issue #6318

How to reproduce

above

Crash reports, logs, images, videos

https://github.com/hyprwm/Hyprland/assets/39702328/b2b635b4-da4c-4ff6-ad14-4111a9ae608f

waybar coredumpctl.log

       Message: Process 22031 (waybar) of user 1000 dumped core.

                Stack trace of thread 22031:
                #0  0x000072ae5d27df64 _ZNK6spdlog5sinks4sink10should_logENS_5level10level_enumE (libspdlog.so.1.14 + 0x22f64)
                #1  0x000072ae5d27dfcc _ZN6spdlog6logger8sink_it_ERKNS_7details7log_msgE (libspdlog.so.1.14 + 0x22fcc)
                #2  0x000072ae5d27bafa _ZN6spdlog6logger7log_it_ERKNS_7details7log_msgEbb (libspdlog.so.1.14 + 0x20afa)
                #3  0x0000588c3090b2de _ZZ4mainENUliE1_4_FUNEi (waybar + 0x942de)
                #4  0x000072ae5b420cd0 n/a (libc.so.6 + 0x41cd0)
                #5  0x000072ae5b479a19 __lll_lock_wait_private (libc.so.6 + 0x9aa19)
                #6  0x000072ae5b476e65 _IO_flush_all (libc.so.6 + 0x97e65)
                #7  0x000072ae5b477235 n/a (libc.so.6 + 0x98235)
                #8  0x000072ae5b4234c4 n/a (libc.so.6 + 0x444c4)
                #9  0x000072ae5b423510 exit (libc.so.6 + 0x44510)
                #10 0x000072ae5b404f55 n/a (libc.so.6 + 0x25f55)
                #11 0x000072ae5b40500a __libc_start_main (libc.so.6 + 0x2600a)
                #12 0x0000588c308d4315 _start (waybar + 0x5d315)

                Stack trace of thread 22035:
                #0  0x000072ae5b4f253f __poll (libc.so.6 + 0x11353f)
                #1  0x000072ae5cb6b628 n/a (libglib-2.0.so.0 + 0xd7628)
                #2  0x000072ae5caf8022 g_main_context_iteration (libglib-2.0.so.0 + 0x64022)
                #3  0x000072ae5caf8072 n/a (libglib-2.0.so.0 + 0x64072)
                #4  0x000072ae5cb35725 n/a (libglib-2.0.so.0 + 0xa1725)
                #5  0x000072ae5b47d53e n/a (libc.so.6 + 0x9e53e)
                #6  0x000072ae5b4fea4c n/a (libc.so.6 + 0x11fa4c)

                Stack trace of thread 22038:
                #0  0x000072ae5b4f253f __poll (libc.so.6 + 0x11353f)
                #1  0x000072ae5cb6b628 n/a (libglib-2.0.so.0 + 0xd7628)
                #2  0x000072ae5caf8022 g_main_context_iteration (libglib-2.0.so.0 + 0x64022)
                #3  0x000072ae570bd47e n/a (libdconfsettings.so + 0x647e)
                #4  0x000072ae5cb35725 n/a (libglib-2.0.so.0 + 0xa1725)
                #5  0x000072ae5b47d53e n/a (libc.so.6 + 0x9e53e)
                #6  0x000072ae5b4fea4c n/a (libc.so.6 + 0x11fa4c)

                Stack trace of thread 22034:
                #0  0x000072ae5b4fbf6d syscall (libc.so.6 + 0x11cf6d)
                #1  0x000072ae5cb615a7 g_cond_wait (libglib-2.0.so.0 + 0xcd5a7)
                #2  0x000072ae5caba65c g_async_queue_pop_unlocked (libglib-2.0.so.0 + 0x2665c)
                #3  0x000072ae5cb37db6 n/a (libglib-2.0.so.0 + 0xa3db6)
                #4  0x000072ae5cb35725 n/a (libglib-2.0.so.0 + 0xa1725)
                #5  0x000072ae5b47d53e n/a (libc.so.6 + 0x9e53e)
                #6  0x000072ae5b4fea4c n/a (libc.so.6 + 0x11fa4c)

                Stack trace of thread 22059:
                #0  0x000072ae5b4f2bad read (libc.so.6 + 0x113bad)
                #1  0x000072ae5b473031 _IO_file_underflow (libc.so.6 + 0x94031)
                #2  0x000072ae5b475f8f _IO_default_uflow (libc.so.6 + 0x96f8f)
                #3  0x000072ae5b4671f7 _IO_getline_info (libc.so.6 + 0x881f7)
                #4  0x000072ae5b465dfe _IO_fgets (libc.so.6 + 0x86dfe)
                #5  0x0000588c3096afb9 _ZZN6waybar7modules8hyprland3IPC8startIPCEvENKUlvE_clEv (waybar + 0xf3fb9)
                #6  0x000072ae5b6f7094 execute_native_thread_routine (libstdc++.so.6 + 0xf7094)
                #7  0x000072ae5b47d53e n/a (libc.so.6 + 0x9e53e)
                #8  0x000072ae5b4fea4c n/a (libc.so.6 + 0x11fa4c)

                Stack trace of thread 22033:
                #0  0x000072ae5b42198a __sigtimedwait (libc.so.6 + 0x4298a)
                #1  0x000072ae5b420fec sigwait (libc.so.6 + 0x41fec)
                #2  0x0000588c3090ab14 _Z12signalThreadPv (waybar + 0x93b14)
                #3  0x000072ae5b47d53e n/a (libc.so.6 + 0x9e53e)
                #4  0x000072ae5b4fea4c n/a (libc.so.6 + 0x11fa4c)

                Stack trace of thread 22036:
                #0  0x000072ae5b4fbf6d syscall (libc.so.6 + 0x11cf6d)
                #1  0x000072ae5cb61e9d g_cond_wait_until (libglib-2.0.so.0 + 0xcde9d)
                #2  0x000072ae5caba2bd n/a (libglib-2.0.so.0 + 0x262bd)
                #3  0x000072ae5caba377 g_async_queue_timeout_pop (libglib-2.0.so.0 + 0x26377)
                #4  0x000072ae5cb37fb0 n/a (libglib-2.0.so.0 + 0xa3fb0)
                #5  0x000072ae5cb35725 n/a (libglib-2.0.so.0 + 0xa1725)
                #6  0x000072ae5b47d53e n/a (libc.so.6 + 0x9e53e)
                #7  0x000072ae5b4fea4c n/a (libc.so.6 + 0x11fa4c)

                Stack trace of thread 22037:
                #0  0x000072ae5b4f253f __poll (libc.so.6 + 0x11353f)
                #1  0x000072ae5cb6b628 n/a (libglib-2.0.so.0 + 0xd7628)
                #2  0x000072ae5cafe2ff g_main_loop_run (libglib-2.0.so.0 + 0x6a2ff)
                #3  0x000072ae5c8e433c n/a (libgio-2.0.so.0 + 0x11c33c)
                #4  0x000072ae5cb35725 n/a (libglib-2.0.so.0 + 0xa1725)
                #5  0x000072ae5b47d53e n/a (libc.so.6 + 0x9e53e)
                #6  0x000072ae5b4fea4c n/a (libc.so.6 + 0x11fa4c)

                Stack trace of thread 22106:
                #0  0x000072ae5b4fbf6d syscall (libc.so.6 + 0x11cf6d)
                #1  0x000072ae5cb615a7 g_cond_wait (libglib-2.0.so.0 + 0xcd5a7)
                #2  0x000072ae5caba57c g_async_queue_pop (libglib-2.0.so.0 + 0x2657c)
                #3  0x000072ae5aaf5958 n/a (libpangoft2-1.0.so.0 + 0x9958)
                #4  0x000072ae5cb35725 n/a (libglib-2.0.so.0 + 0xa1725)
                #5  0x000072ae5b47d53e n/a (libc.so.6 + 0x9e53e)
                #6  0x000072ae5b4fea4c n/a (libc.so.6 + 0x11fa4c)
                ELF object binary architecture: AMD x86-64

GNU gdb (GDB) 14.2
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/waybar...
Reading symbols from /usr/lib/debug/usr/bin/waybar.debug...

This GDB supports auto-downloading debuginfo from the following URLs:
  <https://debuginfod.cachyos.org>
Enable debuginfod for this session? (y or [n]) y
Debuginfod has been enabled.
To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.
[New LWP 22031]
[New LWP 22035]
[New LWP 22038]
[New LWP 22034]
[New LWP 22059]
[New LWP 22033]
[New LWP 22036]
[New LWP 22037]
[New LWP 22106]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `waybar -l debug'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  std::__atomic_base<int>::load () at /usr/include/c++/13.2.1/bits/atomic_base.h:505
[Current thread is 1 (Thread 0x72ae58f5fa40 (LWP 22031))]
(gdb) bt -full
#0  std::__atomic_base<int>::load () at /usr/include/c++/13.2.1/bits/atomic_base.h:505
No locals.
#1  spdlog::sinks::sink::should_log () at /usr/src/debug/spdlog/spdlog-1.14.1/include/spdlog/sinks/sink-inl.h:13
No locals.
#2  0x000072ae5d27dfcc in spdlog::logger::sink_it_ () at /usr/src/debug/spdlog/spdlog-1.14.1/include/spdlog/logger-inl.h:137
No locals.
#3  0x000072ae5d27bafa in spdlog::logger::log_it_ () at /usr/src/debug/spdlog/spdlog-1.14.1/include/spdlog/logger-inl.h:128
No locals.
#4  0x0000588c3090b2de in spdlog::logger::log () at /usr/include/spdlog/logger.h:123
No locals.
#5  spdlog::logger::log<char [14]> () at /usr/include/spdlog/logger.h:90
No locals.
#6  spdlog::logger::info<char [10]> () at /usr/include/spdlog/logger.h:243
No locals.
#7  spdlog::info<char [10]> () at /usr/include/spdlog/spdlog.h:253
No locals.
#8  operator() () at ../src/main.cpp:89
No locals.
#9  _FUN () at ../src/main.cpp:92
No locals.
#10 <signal handler called>
No locals.
#11 0x000072ae5b479a19 in futex_wait (futex_word=0x72ae240017b0, expected=2, private=0) at ../sysdeps/nptl/futex-internal.h:146
        __arg4 = 0
        __arg2 = 128
        _a3 = 2
        _a1 = 126092253861808
        resultvar = <optimized out>
        __arg3 = 2
        __arg1 = 126092253861808
        _a4 = 0
        _a2 = 128
        __ret = <optimized out>
        err = <optimized out>
        err = <optimized out>
        __ret = <optimized out>
        resultvar = <optimized out>
        __arg4 = <optimized out>
        __arg3 = <optimized out>
        __arg2 = <optimized out>
        __arg1 = <optimized out>
        _a4 = <optimized out>
        _a3 = <optimized out>
        _a2 = <optimized out>
        _a1 = <optimized out>
#12 __GI___lll_lock_wait_private (futex=0x72ae240017b0) at lowlevellock.c:34
No locals.
#13 0x000072ae5b476e65 in __GI__IO_flush_all () at genops.c:698
        __futex = <optimized out>
        __self = 0x72ae58f5fa40
        _cleanup_start_doit = true
        _buffer = {__routine = 0x72ae5b474de0 <flush_cleanup>, __arg = 0x0, __canceltype = 0, __prev = 0x0}
        _cleanup_routine = 0x72ae5b474de0 <flush_cleanup>
        result = 0
        fp = 0x72ae240016d0
#14 0x000072ae5b477235 in _IO_cleanup () at genops.c:843
        result = <optimized out>
#15 0x000072ae5b4234c4 in __run_exit_handlers (status=0, listp=0x72ae5b5c36a0 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at exit.c:129
        restart = <optimized out>
#16 0x000072ae5b423510 in __GI_exit (status=<optimized out>) at exit.c:138
No locals.
#17 0x000072ae5b404f55 in __libc_start_call_main (main=main@entry=0x588c308caed0 <main()>, argc=argc@entry=3, argv=argv@entry=0x7ffeb2332e18) at ../sysdeps/nptl/libc_start_call_main.h:74
        result = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140731888119320, -7931804225152045746, 0, 140731888119352, 97359134780304, 126093213642752, 7931391391248723278, 8408260724351872334}, 
              mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x7ffeb2332e18}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#18 0x000072ae5b40500a in __libc_start_main_impl (main=0x588c308caed0 <main()>, argc=3, argv=0x7ffeb2332e18, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffeb2332e08)
    at ../csu/libc-start.c:360
No locals.
#19 0x0000588c308d4315 in _start ()
No symbol table info available.
(gdb) q
ALEX5402 commented 4 months ago

I got the same issue literally no app icons showing on my waybar

see image

i also can't find out why this is happening

Anakael commented 4 months ago

I have similar issue: UC1: If I have app1 on workspace1 and currently on workspace2, clicking on app1 on taskbar just put urgent on workspace1, but no switch. UC2: If I have app1 on workspace1 and app2 on the same workspace, clicking on any app on taskbar just do nothing.

Hyprland version:

Hyprland, built from branch  at commit cba1ade848feac44b2eda677503900639581c3f4  (props: bump version to 0.40.0).
Date: Sat May 4 15:42:32 2024
Tag: v0.40.0, commits: 4606

flags: (if any)
Anakael commented 4 months ago

I have similar issue: UC1: If I have app1 on workspace1 and currently on workspace2, clicking on app1 on taskbar just put urgent on workspace1, but no switch. UC2: If I have app1 on workspace1 and app2 on the same workspace, clicking on any app on taskbar just do nothing.

Hyprland version:

Hyprland, built from branch  at commit cba1ade848feac44b2eda677503900639581c3f4  (props: bump version to 0.40.0).
Date: Sat May 4 15:42:32 2024
Tag: v0.40.0, commits: 4606

flags: (if any)

Works with misc.focus_on_activate = true

hdm9527 commented 4 months ago

I have similar issue: UC1: If I have app1 on workspace1 and currently on workspace2, clicking on app1 on taskbar just put urgent on workspace1, but no switch. UC2: If I have app1 on workspace1 and app2 on the same workspace, clicking on any app on taskbar just do nothing. Hyprland version:

Hyprland, built from branch  at commit cba1ade848feac44b2eda677503900639581c3f4  (props: bump version to 0.40.0).
Date: Sat May 4 15:42:32 2024
Tag: v0.40.0, commits: 4606

flags: (if any)

Works with misc.focus_on_activate = true

Thanks. The waybar issue causes rofi to crash. I'll try to see if rofi works properly.

hdm9527 commented 4 months ago

There is a new problem, if you use misc.focus_on_activate = true, when someone at me or other events will activate that workspace, if you are writing code and suddenly the workspace is switched, it's not good!