Solution: Backport https://github.com/symless/synergy-core/commit/703097c19b58f0bbd14f998107279dfda4ff1600
I reverted back to 1.7.3 after trying the new version this morning and not being able to get it working. Restarting the win7 machine did not help at all.
1.7.4 rc8 is still in use here as client on a linux (Xubuntu 15.04 32bit) laptop and no issues there.
The 1.7.3 server (win 7 64) and 1.7.4 client (deb 32) connect and work together without SSL. Server fail log below before uninstalling 1.7.4.
[2015-08-12T06:02:35] INFO: activeDesktop:Default
[2015-08-12T06:02:35] ERROR: failed to init synwinhk.dll, another program may be using it
[2015-08-12T06:02:35] FATAL: failed to start server: unable to open screen
[2015-08-12T06:02:36] ERROR: failed to launch, error: process immediately stopped
[2015-08-12T06:02:38] INFO: activeDesktop:Default
[2015-08-12T06:02:38] ERROR: failed to init synwinhk.dll, another program may be using it
[2015-08-12T06:02:38] FATAL: failed to start server: unable to open screen
[2015-08-12T06:02:39] ERROR: failed to launch, error: process immediately stopped
[2015-08-12T06:02:43] INFO: activeDesktop:Default
[2015-08-12T06:02:43] ERROR: failed to init synwinhk.dll, another program may be using it
[2015-08-12T06:02:43] FATAL: failed to start server: unable to open screen
[2015-08-12T06:02:44] ERROR: failed to launch, error: process immediately stopped
[2015-08-12T06:02:50] INFO: activeDesktop:Default
[2015-08-12T06:02:50] ERROR: failed to init synwinhk.dll, another program may be using it
[2015-08-12T06:02:50] FATAL: failed to start server: unable to open screen
[2015-08-12T06:02:51] ERROR: failed to launch, error: process immediately stopped
[2015-08-12T06:03:00] INFO: activeDesktop:Default
[2015-08-12T06:03:00] ERROR: failed to init synwinhk.dll, another program may be using it
[2015-08-12T06:03:00] FATAL: failed to start server: unable to open screen
[2015-08-12T06:03:01] ERROR: failed to launch, error: process immediately stopped
[2015-08-12T06:03:03] INFO: activeDesktop:Default
[2015-08-12T06:03:03] ERROR: failed to init synwinhk.dll, another program may be using it
[2015-08-12T06:03:03] FATAL: failed to start server: unable to open screen
[2015-08-12T06:03:04] ERROR: failed to launch, error: process immediately stopped
[2015-08-12T06:03:08] INFO: activeDesktop:Default
[2015-08-12T06:03:08] ERROR: failed to init synwinhk.dll, another program may be using it
[2015-08-12T06:03:08] FATAL: failed to start server: unable to open screen
[2015-08-12T06:03:09] ERROR: failed to launch, error: process immediately stopped
[2015-08-12T06:03:15] INFO: activeDesktop:Default
[2015-08-12T06:03:15] ERROR: failed to init synwinhk.dll, another program may be using it
[2015-08-12T06:03:15] FATAL: failed to start server: unable to open screen
[2015-08-12T06:03:16] ERROR: failed to launch, error: process immediately stopped
[2015-08-12T06:03:24] INFO: activeDesktop:Default
[2015-08-12T06:03:24] ERROR: failed to init synwinhk.dll, another program may be using it
[2015-08-12T06:03:24] FATAL: failed to start server: unable to open screen
[2015-08-12T06:03:25] ERROR: failed to launch, error: process immediately stopped
[2015-08-12T06:03:35] INFO: activeDesktop:Default
[2015-08-12T06:03:35] ERROR: failed to init synwinhk.dll, another program may be using it
[2015-08-12T06:03:35] FATAL: failed to start server: unable to open screen
[2015-08-12T06:03:36] ERROR: failed to launch, error: process immediately stopped
[2015-08-12T06:03:46] INFO: activeDesktop:Default
[2015-08-12T06:03:46] ERROR: failed to init synwinhk.dll, another program may be using it
[2015-08-12T06:03:46] FATAL: failed to start server: unable to open screen
[2015-08-12T06:03:47] ERROR: failed to launch, error: process immediately stopped
[2015-08-12T06:03:57] INFO: activeDesktop:Default
[2015-08-12T06:03:57] ERROR: failed to init synwinhk.dll, another program may be using it
[2015-08-12T06:03:57] FATAL: failed to start server: unable to open screen
[2015-08-12T06:03:58] ERROR: failed to launch, error: process immediately stopped
[2015-08-12T06:04:08] INFO: activeDesktop:Default
[2015-08-12T06:04:08] ERROR: failed to init synwinhk.dll, another program may be using it
[2015-08-12T06:04:08] FATAL: failed to start server: unable to open screen
[2015-08-12T06:04:09] ERROR: failed to launch, error: process immediately stopped
[2015-08-12T06:04:19] INFO: activeDesktop:Default
[2015-08-12T06:04:19] ERROR: failed to init synwinhk.dll, another program may be using it
[2015-08-12T06:04:19] FATAL: failed to start server: unable to open screen
[2015-08-12T06:04:20] ERROR: failed to launch, error: process immediately stopped
[2015-08-12T06:04:30] INFO: activeDesktop:Default
[2015-08-12T06:04:30] ERROR: failed to init synwinhk.dll, another program may be using it
[2015-08-12T06:04:30] FATAL: failed to start server: unable to open screen
[2015-08-12T06:04:31] ERROR: failed to launch, error: process immediately stopped
[2015-08-12T06:04:41] INFO: activeDesktop:Default
[2015-08-12T06:04:41] ERROR: failed to init synwinhk.dll, another program may be using it
[2015-08-12T06:04:41] FATAL: failed to start server: unable to open screen
[2015-08-12T06:04:42] ERROR: failed to launch, error: process immediately stopped
[2015-08-12T06:04:52] INFO: activeDesktop:Default
[2015-08-12T06:04:52] ERROR: failed to init synwinhk.dll, another program may be using it
[2015-08-12T06:04:52] FATAL: failed to start server: unable to open screen
[2015-08-12T06:04:53] ERROR: failed to launch, error: process immediately stopped
[2015-08-12T06:05:03] INFO: activeDesktop:Default
[2015-08-12T06:05:03] ERROR: failed to init synwinhk.dll, another program may be using it
[2015-08-12T06:05:03] FATAL: failed to start server: unable to open screen
[2015-08-12T06:05:04] ERROR: failed to launch, error: process immediately stopped
[2015-08-12T06:05:14] INFO: activeDesktop:Default
[2015-08-12T06:05:14] ERROR: failed to init synwinhk.dll, another program may be using it
[2015-08-12T06:05:14] FATAL: failed to start server: unable to open screen
[2015-08-12T06:05:15] ERROR: failed to launch, error: process immediately stopped
[2015-08-12T06:05:25] INFO: activeDesktop:Default
[2015-08-12T06:05:25] ERROR: failed to init synwinhk.dll, another program may be using it
[2015-08-12T06:05:25] FATAL: failed to start server: unable to open screen
[2015-08-12T06:05:26] ERROR: failed to launch, error: process immediately stopped
[2015-08-12T06:05:36] INFO: activeDesktop:Default
[2015-08-12T06:05:36] ERROR: failed to init synwinhk.dll, another program may be using it
[2015-08-12T06:05:36] FATAL: failed to start server: unable to open screen
[2015-08-12T06:05:37] ERROR: failed to launch, error: process immediately stopped
[2015-08-12T06:05:47] INFO: activeDesktop:Default
[2015-08-12T06:05:47] ERROR: failed to init synwinhk.dll, another program may be using it
[2015-08-12T06:05:47] FATAL: failed to start server: unable to open screen
[2015-08-12T06:05:48] ERROR: failed to launch, error: process immediately stopped
[2015-08-12T06:05:58] INFO: activeDesktop:Default
[2015-08-12T06:05:58] ERROR: failed to init synwinhk.dll, another program may be using it
[2015-08-12T06:05:58] FATAL: failed to start server: unable to open screen
[2015-08-12T06:05:59] ERROR: failed to launch, error: process immediately stopped
[2015-08-12T06:06:09] INFO: activeDesktop:Default
[2015-08-12T06:06:09] ERROR: failed to init synwinhk.dll, another program may be using it
[2015-08-12T06:06:09] FATAL: failed to start server: unable to open screen
[2015-08-12T06:06:10] ERROR: failed to launch, error: process immediately stopped
[2015-08-12T06:06:20] INFO: activeDesktop:Default
[2015-08-12T06:06:20] ERROR: failed to init synwinhk.dll, another program may be using it
[2015-08-12T06:06:20] FATAL: failed to start server: unable to open screen
[2015-08-12T06:06:21] ERROR: failed to launch, error: process immediately stopped
[2015-08-12T06:08:56] INFO: activeDesktop:Default
[2015-08-12T06:08:56] ERROR: could not get session id for process id 4680
[2015-08-12T06:08:56] ERROR: failed to load hook library, synwinhk.dll is missing or invalid
[2015-08-12T06:08:56] FATAL: failed to start server: unable to open screen
[2015-08-12T06:08:57] ERROR: failed to launch, error: process immediately stopped
[2015-08-12T06:08:59] INFO: activeDesktop:Default
[2015-08-12T06:08:59] ERROR: could not get session id for process id 8944
[2015-08-12T06:08:59] ERROR: failed to load hook library, synwinhk.dll is missing or invalid
[2015-08-12T06:08:59] FATAL: failed to start server: unable to open screen
[2015-08-12T06:09:00] ERROR: failed to launch, error: process immediately stopped
[2015-08-12T06:09:15] INFO: activeDesktop:Default
[2015-08-12T06:09:34] INFO: activeDesktop:Default
[2015-08-12T06:09:34] ERROR: failed to init synwinhk.dll, another program may be using it
[2015-08-12T06:09:34] FATAL: failed to start server: unable to open screen
[2015-08-12T06:09:35] ERROR: failed to launch, error: process immediately stopped
[2015-08-12T06:09:39] INFO: activeDesktop:Default
[2015-08-12T06:09:39] ERROR: could not get session id for process id 12048
[2015-08-12T06:09:39] ERROR: failed to init synwinhk.dll, another program may be using it
[2015-08-12T06:09:39] FATAL: failed to start server: unable to open screen
[2015-08-12T06:09:40] ERROR: failed to launch, error: process immediately stopped
[2015-08-12T06:09:46] INFO: activeDesktop:Default
[2015-08-12T06:09:46] ERROR: could not get session id for process id 11328
[2015-08-12T06:09:46] ERROR: failed to init synwinhk.dll, another program may be using it
[2015-08-12T06:09:46] FATAL: failed to start server: unable to open screen
[2015-08-12T06:09:47] ERROR: failed to launch, error: process immediately stopped
[2015-08-12T06:09:55] INFO: activeDesktop:Default
[2015-08-12T06:09:55] ERROR: failed to init synwinhk.dll, another program may be using it
[2015-08-12T06:09:55] FATAL: failed to start server: unable to open screen
[2015-08-12T06:09:56] ERROR: failed to launch, error: process immediately stopped
[2015-08-12T06:10:06] INFO: activeDesktop:Default
[2015-08-12T06:10:06] ERROR: failed to init synwinhk.dll, another program may be using it
[2015-08-12T06:10:06] FATAL: failed to start server: unable to open screen
[2015-08-12T06:10:07] ERROR: failed to launch, error: process immediately stopped
[2015-08-12T06:10:17] INFO: activeDesktop:Default
[2015-08-12T06:10:17] ERROR: could not get session id for process id 2440
[2015-08-12T06:10:17] ERROR: failed to init synwinhk.dll, another program may be using it
[2015-08-12T06:10:17] FATAL: failed to start server: unable to open screen
[2015-08-12T06:10:18] ERROR: failed to launch, error: process immediately stopped
[2015-08-12T06:10:28] INFO: activeDesktop:Default
[2015-08-12T06:10:28] ERROR: could not get session id for process id 3452
[2015-08-12T06:10:50] INFO: activeDesktop:Default
[2015-08-12T06:11:35] INFO: activeDesktop:Default
[2015-08-12T06:11:35] ERROR: failed to init synwinhk.dll, another program may be using it
[2015-08-12T06:11:35] FATAL: failed to start server: unable to open screen
[2015-08-12T06:11:36] ERROR: failed to launch, error: process immediately stopped
[2015-08-12T06:11:40] INFO: activeDesktop:Default
[2015-08-12T06:11:44] ERROR: ssl error occurred (generic failure)
[2015-08-12T06:11:44] ERROR: error:140D00CF:SSL routines:SSL_write:protocol is shutdown
[2015-08-12T06:15:38] INFO: activeDesktop:Winlogon
[2015-08-12T06:15:39] ERROR: failed to get desktop path, no drop target available, error=2
[2015-08-12T06:15:47] INFO: activeDesktop:Default
[2015-08-12T06:15:47] ERROR: could not get session id for process id 6172
1.7.4 RC8 and 1.7.4 final are the same.
Easiest way to fix a temporary condition like that is to restart the windows service, or restart the Windows server.
I've experienced this, temporarily resolved by restarting the server.
1.7.4-stable
Server - Mac OSX 10.10.4
Client - Windows 8.1
Reported by a user.
1.7.4-stable
Client on Win7
Server on Win 8.1
I've had this exact same fault for years, I still don't know why other programs are able to make that dll in use or why they are unable to fix it, why do no other programs I've ever used have issues with dll in use bugs
I found that performing a clean install fixes this. Completely remove Synergy from _all_ devices, then reinstall the server and one-by-one reinstall the clients. The error only persisted as long as one of my clients was attempting to reconnect to the server with a different version.
@shawnkhall worked for me until now! thanks!
I can reliably reproduce this on Win7 x64 by starting the server, closing synergy window (with the red X, like any other app). The connection between Server and Client continues, even without the system tray icon.
If at this point I open the task manager and kill the process "synergys.exe", reopening the synergy window produces that message.
To recover without rebooting I can stop/start the Synergy service.
A quick update: I get the "ERROR: failed to init synwinhk.dll, another program may be using it" on Windows 7 64-bit if the "synergys.exe" process is killed during while Synergy is still connected to its clients. Rebooting solves this, as well as killing and/or restarting "synergyd.exe"
We also are having the synwinhk.dll issue in Windows 10 x64 machines. Sometimes OneNote, explorer.exe, eclipse.exe and SynTPEnh.exe(synaptics touchpad software) are using it. The problem happens when some process is using it, but that's normal, several processes should be able to access the same dll. and they do so.. but sometimes Synergy Pro 1.7.4 (latest build) is troubling it. In some cases it fixes itself after some time, so that I don't have to kill all common sharing processes..
As another Windows 10 x64 user this is being pretty persistent for me and impacting my workflow considerably. I'd love to hear there's a fix in the works or otherwise steps we can take to resolve it.
I am also experiencing this - running Windows 8.1 64b. Is there any workaround available? Would running 32bit synergy help?
You can use Process Explorer from Microsoft to kill other applications currently using synwinhk.dll. That tool can "Search DLL", somewhere from the menu. For me this is Chrome, cygwin terminal, ... pretty much all the most important stuff.
https://technet.microsoft.com/cs-cz/sysinternals/bb896653.aspx
I’ve got the same issue. It seems to have gotten worse since the last update in my case.
I have tried to do a clean reinstall, but it didn’t help. The only thing that seems to help is to kill and restart the service…
Unfortunately, in my case the bug causes the mouse and keyboard to freeze. So killing the service is impossible until some watchdog mechanisms releases the input (?). Are you also experiencing this?
This bug still persists! You need to stop synergy service and then start it again! Atleast it works for now..... untill i open GIMP or something than i need to do that again....
i am having this issue regularly as well. i sometimes am able to work around it by using process explorer to kill the processes using it. but as i type this, i have stopped/restarted the service on my win10 tabletPC and still like 20 processes are using it. i cannot kill them all as it would cripple my machine, and it is unfeasible to expect to reboot every time this happens. this is admittedly happening a lot more after upgrading to win10.
For what it's worth, I think I found what was causing this for me and its pretty terrible IMO.
I used Process Explorer (https://technet.microsoft.com/en-us/sysinternals/bb896653.aspx) to see what had the synwinhk.dll locked and found it to be FlashUtil_ActiveX.exe. This also involves IE because ActiveX... ugh.
When I closed IE (Which I HAVE to use for certain sites at work. Don't ask...), the lock went away and 8 processes happily shared the dll again. (Including synergy)
There's a 90's joke in here somewhere...
I found another possible fix. I have used this batch file for years to reset Synergy when she chokes, both on the client and server, but today I had this (OP) issue and decided to try killing only dwm.exe to see if it would resolve (even though there were a couple dozen handles listed accessing synwinhk)...and it did. I modified my Synergy repair script to kill DWM and now it can single-handedly fix this errant termination issue.
Here's the batch file I run (resyn.bat):
@ECHO OFF
::'===========================================================
:: ReSyn.bat
:: Recycles synergy
:: Must be run elevated!
::'===========================================================
:elevationcheck
SET IS_ELEVATED=1
NET FILE 1>NUL 2>NUL
IF NOT "%errorlevel%"=="0" SET IS_ELEVATED=0
IF %IS_ELEVATED%==0 (
echo Failure: Current permissions inadequate.
echo This must be run from an elevated command prompt!
sudo resyn
GOTO end
)
:recycle
net stop synergy
pskill -t "%SystemRoot%\System32\dwm.exe"
net start synergy
:end
sudo.bat is as follows (depends on nircmd):
SET IS_ELEVATED=1
NET FILE 1>NUL 2>NUL
IF NOT "%errorlevel%"=="0" SET IS_ELEVATED=0
IF %IS_ELEVATED%==1 (
ECHO.
%*
) ELSE (
ECHO.
IF "%1"=="" "nircmdc.exe" elevate cmd
IF NOT "%1"=="" "nircmdc.exe" elevate %*
)
Dependencies include NirCmdC.exe (from NirSoft.net), pskill.exe (from SysInternals) and sudo.bat (located above). If you can guarantee elevation then you can simply remove the sudo line from resyn.bat
Yes, killing DWM will reset the display, but it won't crash your apps, lose data or force you to individually figure out which one is choking. Still, and as always...use at your own risk.
User Lock Hunter to check who is locking the synwinhk.dll and unlock it.
Windows 10 x64, I use the windows calculator, regularly, this locks the synwinhk.dll as well. If i kill that process from Task Manager the app boots back up well.
I'm also having this issue regularly, is there any data that we can provide to help get to a solution?
Restarting the Synergy service worked for me:
or commandilne:
> net stop synergy
> net start synergy
I get this all the time after waking up my server machine from HIbernate/Sleep, and it's super annoying. Yes, restarting the service solves the issue, but why can't this get fixed properly? Occasionally I also get this while the server is running, all of a sudden the client is disconnected and I have to restart the service to get it working again. I only have one server and one client, both running the same versions, even same OS versions, should be pretty straightforward.
And why is this bug closed? Clearly it is still happening to a lot of people and nothing has changed.
And why is this bug closed? Clearly it is still happening to a lot of people and nothing has changed.
It's a duplicate and being dealt with in another ticket: https://github.com/symless/synergy/issues/4957#issuecomment-213450958
It looks like it will be in in 1.8.2 when it comes out. I have nothing to do with this project though so you should confirm in #5277.
This is still happening today. Restarting Synergy in Services only sometimes works. And when it works, it only works for a little while and then the same error appears. Same with restarting your computer. Also, I saw someone post installing the same version on all your clients... the error ends up appearing again. synwinhk.dll used by another client. Lastly, I used process explorer to find what other apps were using synwinhk.dll and ended all those processes... STILL, it happens intermittently. A solution is still welcome if anyone found one!
Also, I saw someone post installing the same version on all your clients
@queenrania, I assume this means you're on the latest? As far as I can tell a fix for this should be in the latest release. FWIW, this issue is being handled here: https://github.com/symless/synergy-core/issues/5277 (edit link). This ticket was closed in favor of that one. Note the second comment in that ticket about the net commands. I haven't seen this since at least May when I was originally participating in this ticket.
@th3coop The link you supplied does not work. The correct link is the following if I am not mistaken: https://github.com/symless/synergy-core/issues/5277
@yin, thanks for updating. Looks like they renamed the repo.
A release candidate is available that incorporates a fix for this issue
If you find any bugs in the release candidate related to this issue please comment here.
Most helpful comment
I can reliably reproduce this on Win7 x64 by starting the server, closing synergy window (with the red X, like any other app). The connection between Server and Client continues, even without the system tray icon.
If at this point I open the task manager and kill the process "synergys.exe", reopening the synergy window produces that message.
To recover without rebooting I can stop/start the Synergy service.