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

SingleApplication implementation buggy #26

Closed
rdoeffinger opened this Issue Apr 12, 2015 · 5 comments

Comments

Projects
None yet
2 participants
@rdoeffinger
Contributor

rdoeffinger commented Apr 12, 2015

Unfortunately the SingleApplication implementation seems to be full of race conditions, e.g. when one application has started closing down but you are starting a new one (this one seems unavoidable by design) but there also seem to be other issues that mean that after a crash it is not possible to start a new instance for several seconds.
The latter seems to happen because the shared memory instance somehow lingers while the server does not respond.
It is probably fixable (by starting the application if the message is never acknowledged - but this just leads to other issue like that in some cases like extreme system load you can end up with multiple running instances after all), but is this feature really worth the amount of code and really annoying bugs?
Especially since as far as I can tell there are no too serious conflicts between 2 instances running at the same time, as qtpass has almost no internal state.

@rdoeffinger

This comment has been minimized.

Contributor

rdoeffinger commented Apr 12, 2015

And additional bug: If one user runs qtpass, no other users will be able to run qtpass on the same machine on Linux (I suspect it might work ok on Windows, but haven't tested).
Equally annoying, an individual user can run qtpass only on one single display, so if you started qtpass on your desktop you will not be able to start another instance via X forwardning, a VNC server or xpra for example.

@annejan

This comment has been minimized.

Member

annejan commented May 6, 2015

SingleApplication is per user in f983d6f merged #44

@rdoeffinger

This comment has been minimized.

Contributor

rdoeffinger commented May 31, 2015

I don't know what happened, but I now in over 50% of startup attempts get this message:
"QLocalSocket::connectToServer: Connection refused"
This happens even if the previous attempt was a long time ago.
It might be related to qtpass crashing though I admit, since I've been debugging crashes lately...

@annejan

This comment has been minimized.

Member

annejan commented May 31, 2015

I have not had any issues of that sort except for testing actively in the debugger (sometimes not cleanly closing the application).

Looking into removing the local socket stuff entirely and going for something simpler (also trayicon support for those who like such things)

@rdoeffinger would you think it's a nice option to have "single application" mode a configurable option?

@annejan

This comment has been minimized.

Member

annejan commented Nov 11, 2015

3fc1dc7 fixes part of this . .

@annejan annejan closed this Oct 24, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment