Skip to content
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

Memory Fault when changing output #487

Closed
danyspin97 opened this issue Oct 17, 2019 · 6 comments
Closed

Memory Fault when changing output #487

danyspin97 opened this issue Oct 17, 2019 · 6 comments
Labels
bug Something isn't working
Milestone

Comments

@danyspin97
Copy link
Contributor

danyspin97 commented Oct 17, 2019

This is the backtrace:

#0  0x00007ffff7f6c03f in malloc () at /lib/ld-musl-x86_64.so.1
#1  0x0000555555b981c0 in  ()
#2  0xfffffffffffffffe in  ()
#3  0x0000000000000040 in  ()
#4  0x0000000100000001 in  ()
#5  0x0000555555aafdb0 in  ()
#6  0x00007ffff599d8b0 in  ()
#7  0x00007ffff599d920 in  ()
#8  0x0000000000000030 in  ()
#9  0x00007ffff599d920 in  ()
#10 0x00007ffff599d9e0 in  ()
#11 0x00007ffff599d9e0 in  ()
#12 0x00007ffff599dab0 in  ()
#13 0x00007ffff599d920 in  ()
#14 0x00007ffff68fb565 in operator new(unsigned long) () at /usr/x86_64-pc-linux-musl/lib/libstdc++.so.6
#15 0x00007ffff7eb08f9 in Json::Value::Value(Json::ValueType) () at /usr/x86_64-pc-linux-musl/lib/libjsoncpp.so.21
#16 0x00007ffff7eabab9 in Json::OurReader::readObject(Json::OurReader::Token&) () at /usr/x86_64-pc-linux-musl/lib/libjsoncpp.so.21
#17 0x00007ffff7eab733 in Json::OurReader::readValue() () at /usr/x86_64-pc-linux-musl/lib/libjsoncpp.so.21
#18 0x00007ffff7eabcd0 in Json::OurReader::readObject(Json::OurReader::Token&) () at /usr/x86_64-pc-linux-musl/lib/libjsoncpp.so.21
#19 0x00007ffff7eab733 in Json::OurReader::readValue() () at /usr/x86_64-pc-linux-musl/lib/libjsoncpp.so.21
#20 0x00007ffff7eab1f5 in Json::OurReader::readArray(Json::OurReader::Token&) () at /usr/x86_64-pc-linux-musl/lib/libjsoncpp.so.21
#21 0x00007ffff7eab76b in Json::OurReader::readValue() () at /usr/x86_64-pc-linux-musl/lib/libjsoncpp.so.21
#22 0x00007ffff7eac4c0 in Json::OurReader::parse(char const*, char const*, Json::Value&, bool) () at /usr/x86_64-pc-linux-musl/lib/libjsoncpp.so.21
#23 0x00007ffff7eaeb9c in Json::OurCharReader::parse(char const*, char const*, Json::Value*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*) () at /usr/x86_64-pc-linux-musl/lib/libjsoncpp.so.21
#24 0x00005555555ecdca in waybar::util::JsonParser::parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const (this=0x55555589fca8, data=Traceback (most recent call last): at ../include/util/json.hpp:17
#25 0x000055555562d86e in waybar::modules::sway::Workspaces::onCmd(waybar::modules::sway::Ipc::ipc_response const&) (this=0x55555589fb60, res=...) at ../src/modules/sway/workspaces.cpp:41
#26 0x0000555555634cd6 in sigc::bound_mem_functor1<void, waybar::modules::sway::Workspaces, waybar::modules::sway::Ipc::ipc_response const&>::operator()(waybar::modules::sway::Ipc::ipc_response const&) const (this=0x555555a9ff98, _A_a1=...) at /usr/x86_64-pc-linux-musl/include/sigc++-2.0/sigc++/functors/mem_fun.h:2066
#27 0x0000555555634c46 in sigc::adaptor_functor<sigc::bound_mem_functor1<void, waybar::modules::sway::Workspaces, waybar::modules::sway::Ipc::ipc_response const&> >::operator()<waybar::modules::sway::Ipc::ipc_response const&>(waybar::modules::sway::Ipc::ipc_response const&) const (this=0x555555a9ff90, _A_arg1=...) at /usr/x86_64-pc-linux-musl/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:89
#28 0x0000555555634c0e in sigc::internal::slot_call<sigc::bound_mem_functor1<void, waybar::modules::sway::Workspaces, waybar::modules::sway::Ipc::ipc_response const&>, void, waybar::modules::sway::Ipc::ipc_response const&>::call_it(sigc::internal::slot_rep*, waybar::modules::sway::Ipc::ipc_response const&) (rep=0x555555a9ff60, a_=...) at /usr/x86_64-pc-linux-musl/include/sigc++-2.0/sigc++/functors/slot.h:450
#29 0x000055555562625f in sigc::internal::signal_emit1<void, waybar::modules::sway::Ipc::ipc_response const&, sigc::nil>::emit(sigc::internal::signal_impl*, waybar::modules::sway::Ipc::ipc_response const&) (impl=0x555555a27b60, _A_a1=...) at /usr/x86_64-pc-linux-musl/include/sigc++-2.0/sigc++/signal.h:1041
#30 0x00005555556260a1 in sigc::signal1<void, waybar::modules::sway::Ipc::ipc_response const&, sigc::nil>::emit(waybar::modules::sway::Ipc::ipc_response const&) const (this=0x55555589fdb0, _A_a1=...) at /usr/x86_64-pc-linux-musl/include/sigc++-2.0/sigc++/signal.h:2951
#31 0x0000555555625e11 in waybar::modules::sway::Ipc::sendCmd(unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (this=0x55555589fda0, type=1, payload=Traceback (most recent call last): at ../src/modules/sway/ipc/client.cpp:130
#32 0x000055555562d71c in waybar::modules::sway::Workspaces::onEvent(waybar::modules::sway::Ipc::ipc_response const&) (this=0x55555589fb60, res=...) at ../src/modules/sway/workspaces.cpp:30
#33 0x0000555555634cd6 in sigc::bound_mem_functor1<void, waybar::modules::sway::Workspaces, waybar::modules::sway::Ipc::ipc_response const&>::operator()(waybar::modules::sway::Ipc::ipc_response const&) const (this=0x555555b40798, _A_a1=...) at /usr/x86_64-pc-linux-musl/include/sigc++-2.0/sigc++/functors/mem_fun.h:2066
#34 0x0000555555634c46 in sigc::adaptor_functor<sigc::bound_mem_functor1<void, waybar::modules::sway::Workspaces, waybar::modules::sway::Ipc::ipc_response const&> >::operator()<waybar::modules::sway::Ipc::ipc_response const&>(waybar::modules::sway::Ipc::ipc_response const&) const (this=0x555555b40790, _A_arg1=...) at /usr/x86_64-pc-linux-musl/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:89
#35 0x0000555555634c0e in sigc::internal::slot_call<sigc::bound_mem_functor1<void, waybar::modules::sway::Workspaces, waybar::modules::sway::Ipc::ipc_response const&>, void, waybar::modules::sway::Ipc::ipc_response const&>::call_it(sigc::internal::slot_rep*, waybar::modules::sway::Ipc::ipc_response const&) (rep=0x555555b40760, a_=...) at /usr/x86_64-pc-linux-musl/include/sigc++-2.0/sigc++/functors/slot.h:450
#36 0x000055555562625f in sigc::internal::signal_emit1<void, waybar::modules::sway::Ipc::ipc_response const&, sigc::nil>::emit(sigc::internal::signal_impl*, waybar::modules::sway::Ipc::ipc_response const&) (impl=0x5555559d83a0, _A_a1=...) at /usr/x86_64-pc-linux-musl/include/sigc++-2.0/sigc++/signal.h:1041
#37 0x00005555556260a1 in sigc::signal1<void, waybar::modules::sway::Ipc::ipc_response const&, sigc::nil>::emit(waybar::modules::sway::Ipc::ipc_response const&) const (this=0x55555589fda0, _A_a1=...) at /usr/x86_64-pc-linux-musl/include/sigc++-2.0/sigc++/signal.h:2951
#38 0x0000555555625f77 in waybar::modules::sway::Ipc::handleEvent() (this=0x55555589fda0) at ../src/modules/sway/ipc/client.cpp:142
#39 0x00005555556322b1 in waybar::modules::sway::Workspaces::worker()::$_3::operator()() const (this=0x555555bd6dd0) at ../src/modules/sway/workspaces.cpp:105
#40 0x000055555563216d in std::_Function_handler<void (), waybar::modules::sway::Workspaces::worker()::$_3>::_M_invoke(std::_Any_data const&) (__functor=...) at /usr/bin/../lib64/gcc/x86_64-pc-linux-musl/9.2.0/../../../../include/c++/9.2.0/bits/std_function.h:300
#41 0x000055555559e57e in std::function<void ()>::operator()() const (this=0x555555bd6dd0) at /usr/bin/../lib64/gcc/x86_64-pc-linux-musl/9.2.0/../../../../include/c++/9.2.0/bits/std_function.h:690
#42 0x000055555559e534 in waybar::util::SleeperThread::operator=(std::function<void ()>)::{lambda()#1}::operator()() const (this=0x555555bd6dc8) at ../include/util/sleeper_thread.hpp:27
#43 0x000055555559e4dd in std::__invoke_impl<void, waybar::util::SleeperThread::operator=(std::function<void ()>)::{lambda()#1}>(std::__invoke_other, waybar::util::SleeperThread::operator=(std::function<void ()>)::{lambda()#1}&&) (__f=...) at /usr/bin/../lib64/gcc/x86_64-pc-linux-musl/9.2.0/../../../../include/c++/9.2.0/bits/invoke.h:60
#44 0x000055555559e46d in std::__invoke<waybar::util::SleeperThread::operator=(std::function<void ()>)::{lambda()#1}>(std::__invoke_result&&, (waybar::util::SleeperThread::operator=(std::function<void ()>)::{lambda()#1}&&)...) (__fn=...) at /usr/bin/../lib64/gcc/x86_64-pc-linux-musl/9.2.0/../../../../include/c++/9.2.0/bits/invoke.h:95
#45 0x000055555559e445 in std::thread::_Invoker<std::tuple<waybar::util::SleeperThread::operator=(std::function<void ()>)::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (this=0x555555bd6dc8) at /usr/bin/../lib64/gcc/x86_64-pc-linux-musl/9.2.0/../../../../include/c++/9.2.0/thread:244
#46 0x000055555559e415 in std::thread::_Invoker<std::tuple<waybar::util::SleeperThread::operator=(std::function<void ()>)::{lambda()#1}> >::operator()() (this=0x555555bd6dc8) at /usr/bin/../lib64/gcc/x86_64-pc-linux-musl/9.2.0/../../../../include/c++/9.2.0/thread:251
#47 0x000055555559e0be in std::thread::_State_impl<std::thread::_Invoker<std::tuple<waybar::util::SleeperThread::operator=(std::function<void ()>)::{lambda()#1}> > >::_M_run() (this=0x555555bd6dc0) at /usr/bin/../lib64/gcc/x86_64-pc-linux-musl/9.2.0/../../../../include/c++/9.2.0/thread:195
#48 0x00007ffff692e670 in execute_native_thread_routine () at /usr/x86_64-pc-linux-musl/lib/libstdc++.so.6
#49 0x00007ffff7fb5cb5 in start () at /lib/ld-musl-x86_64.so.1
#50 0x00007ffff599eb20 in  ()
#51 0x0000000000000000 in  ()

It happens very often but not every time. I have taken the string that makes waybar crash and manually feeded it to jsoncpp parser, expecting the same behaviour; however, this worked without fault.

@Alexays Alexays added the bug Something isn't working label Oct 18, 2019
@Alexays
Copy link
Owner

Alexays commented Oct 18, 2019

Might be fixed with #441

@danyspin97
Copy link
Contributor Author

It still crashes during the screen changes but I get a different error. More on #441

@Alexays
Copy link
Owner

Alexays commented Feb 13, 2020

Ping, can you retest with latest changes?

@danyspin97
Copy link
Contributor Author

I have retested using master branch but I am still experiencing the segmentation fault.

@Alexays Alexays added this to the 1.0.0 milestone Apr 5, 2020
@Alexays
Copy link
Owner

Alexays commented May 27, 2020

@danyspin97 your latest issue should be fixed with 6e7f22a
Can you confirm?

@danyspin97
Copy link
Contributor Author

danyspin97 commented May 27, 2020

I have tried switching screen a couple of times and it works. Many thanks for fixing this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants