Fixed my Synergy

What does a computer nerd do when he is at work and trying to use one keyboard and mouse for two machines and it just does not work? Well, he fixes it of course!
For the last few weeks, since switching my KDE desktop at work to Gnome, I have had this seriously pressing issue that every now and then when I moved my mouse to the Linux machine, synergy would crash on that screen, with a nice assertion error.

INFO: CScreen.cpp,99: entering screen synergyc: ../../src/xcb_io.c:243: process_responses: Assertion `(((long) (dpy->last_request_read) - (long) (dpy->request)) <= 0)' failed.

Well,I looked through the code for a few hours and I finally tracked down the issue. The synergyc application was actually trying to do calls to the X server using multiple threads, when X did not know that it was being used from a multi-threaded application.

Basically, after hunting down where the issue was, fixing the problem was as simple as adding a call to the XInitThreads() function on line 100 of lib/platform/CXWindowsScreen.cpp.

Rebuilt my package and boom, a perfect synergy.

Leave a Comment

Your email address will not be published. Required fields are marked *