8000 bar crashes on i3 module with no label-state · Issue #975 · polybar/polybar · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

bar crashes on i3 module with no label-state #975

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
NekoiNemo opened this issue Jan 25, 2018 · 4 comments
Closed

bar crashes on i3 module with no label-state #975

NekoiNemo opened this issue Jan 25, 2018 · 4 comments

Comments

@NekoiNemo
Copy link
NekoiNemo commented Jan 25, 2018

Creating module with params
type = internal/i3
format = <label-mode>

results in corresponding bar crashing at launch. Restoring in format makes it behave normally again.

@patrick96
Copy link
Member

Happens for me as well

Here is the crash backtrace, I'll try to dig into it, once I get some more time.

#0  0x00005555559b9e5b in std::vector<polybar::v3_1_0_27_g3af3aea_git::drawtypes::token, std::allocator<polybar::v3_1_0_27_g3af3aea_git::drawtypes::token> >::end (this=0xe8) at /usr/include/c++/7.2.1/bits/stl_vector.h:591
No locals.
#1  0x00005555559b9d81 in std::vector<polybar::v3_1_0_27_g3af3aea_git::drawtypes::token, std::allocator<polybar::v3_1_0_27_g3af3aea_git::drawtypes::token> >::empty (this=0xe8) at /usr/include/c++/7.2.1/bits/stl_vector.h:760
No locals.
#2  0x00005555559b7dca in polybar::v3_1_0_27_g3af3aea_git::drawtypes::label::clone (this=0x0) at /home/patrick96/Projects/github.com/patrick96/polybar/src/drawtypes/label.cpp:20
        tokens = std::vector of length 0, capacity 0
#3  0x0000555555a0f661 in polybar::v3_1_0_27_g3af3aea_git::modules::i3_module::update (this=0x555555e4b350) at /home/patrick96/Projects/github.com/patrick96/polybar/src/modules/i3.cpp:150
        ws_state = polybar::v3_1_0_27_g3af3aea_git::modules::i3_module::state::FOCUSED
        ws_name = "2"
        icon = std::shared_ptr (count 2, weak 0) 0x555555e4dc20
        label = std::shared_ptr (empty) 0x20
        ws = std::shared_ptr (count 1, weak 0) 0x7fffe8002ab0
        __for_range = std::vector of length 2, capacity 2 = {std::shared_ptr (count 1, weak 0) 0x7fffe8002ab0, std::shared_ptr (count 1, weak 0) 0x7fffe8002b60}
        __for_begin = std::shared_ptr (count 1, weak 0) 0x7fffe8002ab0
        __for_end = <error reading variable: Cannot access memory at address 0x3d>
        workspaces = std::vector of length 2, capacity 2 = {std::shared_ptr (count 1, weak 0) 0x7fffe8002ab0, std::shared_ptr (count 1, weak 0) 0x7fffe8002b60}
        ipc = {on_workspace_event = {<std::_Maybe_unary_or_binary_function<void, i3ipc::workspace_event_t const&>> = {<std::unary_function<i3ipc::workspace_event_t const&, void>> = {<No data fields>}, <No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8, _M_functor = {
                _M_unused = {_M_object = 0x0, _M_const_object = 0x0, _M_function_pointer = 0x0, _M_member_pointer = NULL}, _M_pod_data = "\000\000\000\000\000\000\000\000z4m\364\377\177\000"}, _M_manager = 0x0}, _M_invoker = 0x7fffed222a40}, 
          on_output_event = {<std::_Maybe_unary_or_binary_function<void>> = {<No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8, _M_functor = {_M_unused = {_M_object = 0x2, _M_const_object = 0x2, _M_function_pointer = 0x2, 
                  _M_member_pointer = (void (std::_Undefined_class::*)(std::_Undefined_class * const)) 0x2, this adjustment 140737305993353}, _M_pod_data = "\002\000\000\000\000\000\000\000\211`!\365\377\177\000"}, _M_manager = 0x0}, 
            _M_invoker = 0x5555558feeb9 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag)+237>}, 
          on_mode_event = {<std::_Maybe_unary_or_binary_function<void, i3ipc::mode_t const&>> = {<std::unary_function<i3ipc::mode_t const&, void>> = {<No data fields>}, <No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8, _M_functor = {_M_unused = {
                  _M_object = 0x3000000002, _M_const_object = 0x3000000002, _M_function_pointer = 0x3000000002, _M_member_pointer = (void (std::_Undefined_class::*)(std::_Undefined_class * const)) 0x3000000002, this adjustment 140737085705074}, 
                _M_pod_data = "\002\000\000\000\060\000\000\000r\v\000\350\377\177\000"}, _M_manager = 0x0}, _M_invoker = 0x7fffed222a90}, 
          on_window_event = {<std::_Maybe_unary_or_binary_function<void, i3ipc::window_event_t const&>> = {<std::unary_function<i3ipc::window_event_t const&, void>> = {<No data fields>}, <No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8, _M_functor = {_M_unused = {
                  _M_object = 0x12, _M_const_object = 0x12, _M_function_pointer = 0x12, _M_member_pointer = (void (std::_Undefined_class::*)(std::_Undefined_class * const)) 0x12, this adjustment -2731933220438474496}, 
                _M_pod_data = "\022\000\000\000\000\000\000\000\000\001\255\335\065\071", <incomplete sequence \332>}, _M_manager = 0x0}, _M_invoker = 0x555555e3f330}, 
          on_barconfig_update_event = {<std::_Maybe_unary_or_binary_function<void, i3ipc::bar_config_t const&>> = {<std::unary_function<i3ipc::bar_config_t const&, void>> = {<No data fields>}, <No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8, _M_functor = {
                _M_unused = {_M_object = 0x7fffed222af0, _M_const_object = 0x7fffed222af0, _M_function_pointer = 0x7fffed222af0, _M_member_pointer = (void (std::_Undefined_class::*)(std::_Undefined_class * const)) 0x7fffed222af0, this adjustment 2}, 
                _M_pod_data = "\360*\"\355\377\177\000\000\002\000\000\000\000\000\000"}, _M_manager = 0x0}, _M_invoker = 0x7fffed223700}, 
          on_binding_event = {<std::_Maybe_unary_or_binary_function<void, i3ipc::binding_t const&>> = {<std::unary_function<i3ipc::binding_t const&, void>> = {<No data fields>}, <No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8, _M_functor = {_M_unused = {
                  _M_object = 0x7fffed222a80, _M_const_object = 0x7fffed222a80, _M_function_pointer = 0x7fffed222a80, _M_member_pointer = (void (std::_Undefined_class::*)(std::_Undefined_class * const)) 0x7fffed222a80, this adjustment 93824996144893}, 
                _M_pod_data = "\200*\"\355\377\177\000\000\375\366\220UUU\000"}, _M_manager = 0x0}, _M_invoker = 0x555555e4b588}, 
          on_event = {<std::_Maybe_unary_or_binary_function<void, i3ipc::EventType, std::shared_ptr<i3ipc::buf_t const> const&>> = {<std::binary_function<i3ipc::EventType, std::shared_ptr<i3ipc::buf_t const> const&, void>> = {<No data fields>}, <No data fields>}, <std::_Function_base> = {
              static _M_max_size = 16, static _M_max_align = 8, _M_functor = {_M_unused = {_M_object = 0x7fffed2229c0, _M_const_object = 0x7fffed2229c0, _M_function_pointer = 0x7fffed2229c0, 
                  _M_member_pointer = (void (std::_Undefined_class::*)(std::_Undefined_class * const)) 0x7fffed2229c0, this adjustment 93825001583408}, _M_pod_data = "\300)\"\355\377\177\000\000\060\363\343UUU\000"}, 
              _M_manager = 0x555555aed31c <std::_Function_base::_Base_manager<i3ipc::connection::connection(const string&)::<lambda(i3ipc::EventType, const std::shared_ptr<const i3ipc::buf_t>&)> >::_M_manager(std::_Any_data &, const std::_Any_data &, std::_Manager_operation)>}, 
            _M_invoker = 0x555555aed2c2 <std::_Function_handler<void(i3ipc::EventType, const std::shared_ptr<const i3ipc::buf_t>&), i3ipc::connection::connection(const string&)::<lambda(i3ipc::EventType, const std::shared_ptr<const i3ipc::buf_t>&)> >::_M_invoke(const std::_Any_data &, i3ipc::EventType &&, const std::shared_ptr<i3ipc::buf_t const> &)>}, m_main_socket = 7, m_event_socket = -1, m_subscriptions = 0, m_socket_path = "/run/user/1000/i3/ipc-socket.4351"}
#4  0x0000555555a18194 in polybar::v3_1_0_27_g3af3aea_git::modules::event_module<polybar::v3_1_0_27_g3af3aea_git::modules::i3_module>::runner (this=0x555555e4b350) at /home/patrick96/Projects/github.com/patrick96/polybar/include/modules/meta/event_module.hpp:23
        guard = {_M_device = 0x555555e4b588, _M_owns = true}
        check = {__this = 0x0}
#5  0x0000555555a1876e in std::__invoke_impl<void, void (polybar::v3_1_0_27_g3af3aea_git::modules::event_module<polybar::v3_1_0_27_g3af3aea_git::modules::i3_module>::*)(), polybar::v3_1_0_27_g3af3aea_git::modules::event_module<polybar::v3_1_0_27_g3af3aea_git::modules::i3_module>*> (
    __f=@0x555555e4cce0: (void (polybar::v3_1_0_27_g3af3aea_git::modules::event_module<polybar::v3_1_0_27_g3af3aea_git::modules::i3_module>::*)(polybar::v3_1_0_27_g3af3aea_git::modules::event_module<polybar::v3_1_0_27_g3af3aea_git::modules::i3_module> * const)) 0x555555a180a8 <polybar::v3_1_0_27_g3af3aea_git::modules::event_module<polybar::v3_1_0_27_g3af3aea_git::modules::i3_module>::runner()>, __t=@0x555555e4ccd8: 0x555555e4b350) at /usr/include/c++/7.2.1/bits/invoke.h:73
No locals.
#6  0x0000555555a183ba in std::__invoke<void (polybar::v3_1_0_27_g3af3aea_git::modules::event_module<polybar::v3_1_0_27_g3af3aea_git::modules::i3_module>::*)(), polybar::v3_1_0_27_g3af3aea_git::modules::event_module<polybar::v3_1_0_27_g3af3aea_git::modules::i3_module>*> (
    __fn=@0x555555e4cce0: (void (polybar::v3_1_0_27_g3af3aea_git::modules::event_module<polybar::v3_1_0_27_g3af3aea_git::modules::i3_module>::*)(polybar::v3_1_0_27_g3af3aea_git::modules::event_module<polybar::v3_1_0_27_g3af3aea_git::modules::i3_module> * const)) 0x555555a180a8 <polybar::v3_1_0_27_g3af3aea_git::modules::event_module<polybar::v3_1_0_27_g3af3aea_git::modules::i3_module>::runner()>, __args#0=@0x555555e4ccd8: 0x555555e4b350) at /usr/include/c++/7.2.1/bits/invoke.h:95
No locals.
#7  0x0000555555a18a2d in std::thread::_Invoker<std::tuple<void (polybar::v3_1_0_27_g3af3aea_git::modules::event_module<polybar::v3_1_0_27_g3af3aea_git::modules::i3_module>::*)(), polybar::v3_1_0_27_g3af3aea_git::modules::event_module<polybar::v3_1_0_27_g3af3aea_git::modules::i3_module>*> >::_M_invoke<0ul, 1ul> (this=0x555555e4ccd8) at /usr/include/c++/7.2.1/thread:234
No locals.
#8  0x0000555555a189ce in std::thread::_Invoker<std::tuple<void (polybar::v3_1_0_27_g3af3aea_git::modules::event_module<polybar::v3_1_0_27_g3af3aea_git::modules::i3_module>::*)(), polybar::v3_1_0_27_g3af3aea_git::modules::event_module<polybar::v3_1_0_27_g3af3aea_git::modules::i3_module>*> >::operator() (
    this=0x555555e4ccd8) at /usr/include/c++/7.2.1/thread:243
No locals.
#9  0x0000555555a1899e in std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (polybar::v3_1_0_27_g3af3aea_git::modules::event_module<polybar::v3_1_0_27_g3af3aea_git::modules::i3_module>::*)(), polybar::v3_1_0_27_g3af3aea_git::modules::event_module<polybar::v3_1_0_27_g3af3aea_git::modules::i3_module>*> > >::_M_run (this=0x555555e4ccd0) at /usr/include/c++/7.2.1/thread:186
No locals.
#10 0x00007ffff5242b9f in std::execute_native_thread_routine (__p=0x555555e4ccd0) at /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:83
        __t = std::unique_ptr<std::thread::_State> containing 0x555555e4ccd0
#11 0x00007ffff4a0f08c in start_thread () from /usr/lib/libpthread.so.0
No symbol table info available.
#12 0x00007ffff4746e1f in clone () from /usr/lib/libc.so.6
No symbol table info available.

@NekoiNemo
Copy link
Author

Thanks. By the way how did you obtain the detailed log? All i got is a segfault error message in the terminal

@patrick96
Copy link
Member

I ran polybar through gdb and then used bt full once it crashed.

@g-mips
Copy link
g-mips commented May 16, 2018

I got this error as well. I wanted to separate my workspaces and mode output in two different places so I created two separate modules. But if I don't include the on the module meant to only display the then I get a Segmentation fault. A work around for me is to just set the labels to nothing:

[module/i3mode]
type = internal/i3
format = <label-state> <label-mode>

label-mode-padding = 4
label-mode-foreground = ${colors.foreground}

label-visible =
label-urgent =
label-focused =
label-unfocused =

polybar -vvv

polybar 3.1.0-git

Features: +alsa +curl +i3 -mpd -network

X extensions: +randr (+monitors) -render -damage -sync -composite +xkb +xrm +xcursor

Build type: RelWithDebInfo
Compiler: /usr/bin/c++
Compiler flags: -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -Wall -Wextra -Werror -Wno-noexcept-type -O2 -pedantic -pedantic-errors
Linker flags: -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now

I'm running in a VM. I'm also running two bars and each i3 module is on a different bar.

patrick96 pushed a commit to Deedone/polybar that referenced this issue Jan 9, 2019
patrick96 pushed a commit that referenced this issue Jan 9, 2019
patrick96 pushed a commit that referenced this issue Mar 25, 2019
patrick96 added a commit that referenced this issue Mar 25, 2019
Changelog

Fixes:
* `internal/xworkspaces`:
    * Crash when WM doesn't set `_NET_DESKTOP_NAMES` (#1576), see #1462
    * Workspace removal not always detected (#1579), see #1491, #248
* `internal/i3`: Crash when `<label-state>` was not added to `format` (#1591), see #975
* `internal/fs`: Incorrect sizes on some machines (#1612, #1699), see #743
* `internal/network`: Buffer overflow with ipv6 addresses (#1514)
* renderer: Show proper error when imagemagick is used to set the background (#1608), see #1582, #1585
* tray:
    * Wrong background for transparent trays when using `tray-offset-*` (#1571)
    * Build failure on clang8 (#1675), #1674
    * Allow negative offset values for `tray-offset-*` (#1669), see #1666
* build: Link failure when configuring with `-DBUILD_SHARED_LIBS=ON` (#1647, polybar/xpp#15), see #1628
* controller: Crash when reloading via `SIGUSR1` too fast (#1678), #428
patrick96 added a commit that referenced this issue Mar 25, 2019
Changelog

Fixes:
* `internal/xworkspaces`:
    * Crash when WM doesn't set `_NET_DESKTOP_NAMES` (#1576), see #1462
    * Workspace removal not always detected (#1579), see #1491, #248
* `internal/i3`: Crash when `<label-state>` was not added to `format` (#1591), see #975
* `internal/fs`: Incorrect sizes on some machines (#1612, #1699), see #743
* `internal/network`: Buffer overflow with ipv6 addresses (#1514)
* renderer: Show proper error when imagemagick is used to set the background (#1608), see #1582, #1585
* tray:
    * Wrong background for transparent trays when using `tray-offset-*` (#1571)
    * Build failure on clang8 (#1675), #1674
    * Allow negative offset values for `tray-offset-*` (#1669), see #1666
* build: Link failure when configuring with `-DBUILD_SHARED_LIBS=ON` (#1647, polybar/xpp#15), see #1628
* controller: Crash when reloading via `SIGUSR1` too fast (#1678), #428
doronbehar pushed a commit to doronbehar/polybar that referenced this issue Aug 5, 2019
Changelog

Fixes:
* `internal/xworkspaces`:
    * Crash when WM doesn't set `_NET_DESKTOP_NAMES` (polybar#1576), see polybar#1462
    * Workspace removal not always detected (polybar#1579), see polybar#1491, polybar#248
* `internal/i3`: Crash when `<label-state>` was not added to `format` (polybar#1591), see polybar#975
* `internal/fs`: Incorrect sizes on some machines (polybar#1612, polybar#1699), see polybar#743
* `internal/network`: Buffer overflow with ipv6 addresses (polybar#1514)
* renderer: Show proper error when imagemagick is used to set the background (polybar#1608), see polybar#1582, polybar#1585
* tray:
    * Wrong background for transparent trays when using `tray-offset-*` (polybar#1571)
    * Build failure on clang8 (polybar#1675), polybar#1674
    * Allow negative offset values for `tray-offset-*` (polybar#1669), see polybar#1666
* build: Link failure when configuring with `-DBUILD_SHARED_LIBS=ON` (polybar#1647, polybar/xpp#15), see polybar#1628
* controller: Crash when reloading via `SIGUSR1` too fast (polybar#1678), polybar#428
doronbehar pushed a commit to doronbehar/polybar that referenced this issue Feb 11, 2020
Changelog

Fixes:
* `internal/xworkspaces`:
    * Crash when WM doesn't set `_NET_DESKTOP_NAMES` (polybar#1576), see polybar#1462
    * Workspace removal not always detected (polybar#1579), see polybar#1491, polybar#248
* `internal/i3`: Crash when `<label-state>` was not added to `format` (polybar#1591), see polybar#975
* `internal/fs`: Incorrect sizes on some machines (polybar#1612, polybar#1699), see polybar#743
* `internal/network`: Buffer overflow with ipv6 addresses (polybar#1514)
* renderer: Show proper error when imagemagick is used to set the background (polybar#1608), see polybar#1582, polybar#1585
* tray:
    * Wrong background for transparent trays when using `tray-offset-*` (polybar#1571)
    * Build failure on clang8 (polybar#1675), polybar#1674
    * Allow negative offset values for `tray-offset-*` (polybar#1669), see polybar#1666
* build: Link failure when configuring with `-DBUILD_SHARED_LIBS=ON` (polybar#1647, polybar/xpp#15), see polybar#1628
* controller: Crash when reloading via `SIGUSR1` too fast (polybar#1678), polybar#428
doronbehar pushed a commit to doronbehar/polybar that referenced this issue Mar 19, 2 8000 020
Changelog

Fixes:
* `internal/xworkspaces`:
    * Crash when WM doesn't set `_NET_DESKTOP_NAMES` (polybar#1576), see polybar#1462
    * Workspace removal not always detected (polybar#1579), see polybar#1491, polybar#248
* `internal/i3`: Crash when `<label-state>` was not added to `format` (polybar#1591), see polybar#975
* `internal/fs`: Incorrect sizes on some machines (polybar#1612, polybar#1699), see polybar#743
* `internal/network`: Buffer overflow with ipv6 addresses (polybar#1514)
* renderer: Show proper error when imagemagick is used to set the background (polybar#1608), see polybar#1582, polybar#1585
* tray:
    * Wrong background for transparent trays when using `tray-offset-*` (polybar#1571)
    * Build failure on clang8 (polybar#1675), polybar#1674
    * Allow negative offset values for `tray-offset-*` (polybar#1669), see polybar#1666
* build: Link failure when configuring with `-DBUILD_SHARED_LIBS=ON` (polybar#1647, polybar/xpp#15), see polybar#1628
* controller: Crash when reloading via `SIGUSR1` too fast (polybar#1678), polybar#428
doronbehar pushed a commit to doronbehar/polybar that referenced this issue Mar 19, 2020
Changelog

Fixes:
* `internal/xworkspaces`:
    * Crash when WM doesn't set `_NET_DESKTOP_NAMES` (polybar#1576), see polybar#1462
    * Workspace removal not always detected (polybar#1579), see polybar#1491, polybar#248
* `internal/i3`: Crash when `<label-state>` was not added to `format` (polybar#1591), see polybar#975
* `internal/fs`: Incorrect sizes on some machines (polybar#1612, polybar#1699), see polybar#743
* `internal/network`: Buffer overflow with ipv6 addresses (polybar#1514)
* renderer: Show proper error when imagemagick is used to set the background (polybar#1608), see polybar#1582, polybar#1585
* tray:
    * Wrong background for transparent trays when using `tray-offset-*` (polybar#1571)
    * Build failure on clang8 (polybar#1675), polybar#1674
    * Allow negative offset values for `tray-offset-*` (polybar#1669), see polybar#1666
* build: Link failure when configuring with `-DBUILD_SHARED_LIBS=ON` (polybar#1647, polybar/xpp#15), see polybar#1628
* controller: Crash when reloading via `SIGUSR1` too fast (polybar#1678), polybar#428
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
0