'Geany' no longer detects if there is an instance of itself already running, thus multiple instances are starting up, instead of files being opened in the current instance.
I doubt it is a "#ifdef HAVE_SOCKET" not being defined since the mutexs (called mutants in win32) are being created with the name 'Geany'.
I suspect it had to do with recent cleanups and changes in https://github.com/geany/geany/commits/c5b0fc459a1251c824a44edb5dfab4a8feb0b...
![screenshot_of_mutants](https://cloud.githubusercontent.com/assets/2829875/9657992/dba0fd70-5213-11e...)
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/641
What exactly are we talking about here? Executing geany.exe after an instance is already running or rather opening additional files into an already running instance, e.g. with the Explorer context menu item "Open with Geany"?
In case of the first one: it is intended behaviour that a new Geany window is opened in that case, same as on non-Windows systems.
In case of the second one: that works for me with current GIT master. Could you try a nightly build (http://nightly.geany.org)?
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/641#issuecomment-139775359
hey were not launched with the Open with Geany context.
They were both launched from separate command prompts with the same user credentials, and for a while every new geany opened up a new instance.
I retested the behavior and right now it stopped and is acting normal again.
Next time it occurs I'll try running windbg,on it if I can figure out some method that can give some insight on what went wrong.
I am going to close this ticket as intermittent behavior and thus would likely be very difficult to narrow down. I'll reoppen it if I obtain some better diagnostics.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/641#issuecomment-139824669
Closed #641.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/641#event-407933021
Hello, I know it is old and closed issue, but the exact same thing started to happen again. I'm on 1.34.1 . Win10
When double clicked on any geany associated file (let's say txt), or when other tools "push" some files to external editor (mine is geany) every time a new instance pops-up. It started to behave like this Today without any errors or warnings. Important is that when double click on text file it used to open in 1/10 of blink of an eye. Now it takes about 2 seconds to open. I've tried to re-install already.
I've run it with verbose, but there is not enough to debug for me
![geany-cmd](https://user-images.githubusercontent.com/7257442/53801982-8b578d00-3f38-11e...)
procexp of two running geanys
![geanys](https://user-images.githubusercontent.com/7257442/53801710-d0c78a80-3f37-11e...)
Thanks for the detailed information. The mutex isn't necessarily the source of the problem: it is only used to detect another instance. For communication between the existent and the new instance a TCP connection is used on port 49876 on 127.0.0.1. Over this TCP connection the new instance sends the filename or other actions to the existent instance.
Maybe you set up a firewall or anything else caused the TCP connection to break?
I'll check if we can add some more useful debug/error output in the relevant code.
github-comments@lists.geany.org