-
-
Notifications
You must be signed in to change notification settings - Fork 725
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
SIGSEGV on Monitor Disconnect/Connect #554
Comments
…tput>. Should fix Alexays#554, where unique_ptr was moved out from the outputs_ vector.
Ouch. Something caused first element of outputs_ to be moved out, leaving empty unique_ptr behind. I had a hunch that using unique_ptr for outputs is not necessary but did not follow up with that. alebastr@718fc42 should fix the crash, but I won't be able to test until tomorrow. |
@alebastr I'll apply and test your patch today. Many thanks for the quick response. I was going to hunt this one down myself. But haven't got to grips with the code base yet. |
@alebastr this works in that it resolves the crash when I unplug and plugin my monitors. However the bar only appears on a single output. |
std::unique_ptr is not required here as the only benefit it gives is stability of address on vector resize and it's easy to invalidate it accidentaly. std::list provides the same guarantee of stable addresses of the elements and correct destruction while avoiding smart pointer overhead. Also fixes Alexays#554, caused by incorrect usage of std::remove_if.
@jameswalmsley please test #555. |
Hi @alebastr, I can confirm this works. I'll test it full time on my machine for the rest of the week. Seems great so far. Best J |
I can confirm this issue is fixed, but a new, similar issue has arisen instead: When I disconnect my docking (and thus the monitors, two), Waybar seems to lock up and become iresponsive (but not quit or disappear). Clock wont update, clicking volume wont open pavucontrol, etc. Disconnecting the dock should not cause a network-change, because the dock has no ethernet connected, and the laptop is on wifi only. Connecting dock causes no issues, so the issue seem isolated to removal of displays. I've done a local build from git master, launched waybar with gdb, and have the following backtrace when waybar has reached this conditon:
Anyone else experiencing this? Running on Ubuntu 20.04, if that matters. |
I'll take a look to this one. thx for reporting. |
Another finding I've just had is that when I connect the dock (and thus my 2 external monitors), waybar does not freeze or crash. But it doesn't show up on those monitors either, until I kill it and restart it. Should I register that as a bug of its own? |
Just wanted to let you know that I've pulled latest sources and rebuilt, and Waybar now seems to handle disconnect and reconnects cleanly. No breaks in GDB, no errors in the log, just the events you would expect, and most importantly: things just works(tm), both connects and disconnects. Whatever you did, it seems to have worked. Thanks! 😄 |
Will try to look into the code and debug a little to see whats going on.
J
The text was updated successfully, but these errors were encountered: