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

Plugin stops working after restart #7

Open
acrisci opened this issue Dec 23, 2014 · 5 comments
Open

Plugin stops working after restart #7

acrisci opened this issue Dec 23, 2014 · 5 comments
Assignees
Labels

Comments

@acrisci
Copy link
Contributor

acrisci commented Dec 23, 2014

Upon the command i3-msg restart, the plugin stops working.

Right now, the i3ipc-glib connection object will not automatically reconnect when the ipc connection is lost, such as after a restart. You can listen for the ipc-shutdown signal and try to reconnect then.

@denesb denesb self-assigned this Jan 3, 2015
@denesb denesb added the bug label Jan 3, 2015
@denesb denesb added this to the 1.1.0 milestone Jan 3, 2015
@xuhdev
Copy link
Contributor

xuhdev commented Jan 5, 2015

I can confirm this. Restarting is often used to preserve current layout but reload config files, or load the upgraded i3.

@denesb
Copy link
Owner

denesb commented Feb 3, 2015

Hello guys, I am asking for a little help here.
I have implemented the auto reconnect feature, by listening to the ipc-shutdown signal, as requested by acrisci. The problem is that the plugin still crashes with when I restart i3 because the ipc-shutdown signal is emitted twice and I expect it to be emitted once. Because of this, on the second emit I hit a SIGSEGV as my resources are freed already.
@acrisci : what am I doing wrong here? Did I not free the i3ipcConnection object apropriately? Could you please give me a hint, I spent many hours debugging and still can't wrap my head around this.

@acrisci
Copy link
Contributor Author

acrisci commented Feb 4, 2015

I don't know if it is possible to fix this.

I think we should just deprecate the restart command instead. I've started this issue on i3 for that.

@Zauberfisch
Copy link

bump. I believe this is still an issue

@Zauberfisch
Copy link

ok, as a workaround I created /usr/local/bin/i3-restart

#!/bin/bash
i3-msg restart
ps aux | grep '[l]ibi3workspaces' | awk '{print $2}' | xargs -n 1 kill

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants