Solution for "Illegal server message type 131" bug

After upgrading to Mountain Lion and thus the latest Vine Server I too was experiencing frequent “Illegal server message type 131” problems that could only be solved by completely killing the server.

Today I was finally annoyed enough by it that I installed XCode and started investigating myself. It’s actually pretty simple, the richClipboardSupport member of the rfbClientRec is uninitialized. When the server process is fresh it defaults to zero, which is fine. The longer the server runs, the higher the probability becomes that it won’t be zero anymore for the next connection and thus triggers the problem.

In the end this little change in rfbserver.c is all that’s needed:

  cl = (rfbClientPtr)xalloc(sizeof(rfbClientRec));
  • memset(cl, 0, sizeof(rfbClientRec));

This being an uninitialized memory bug it might also cure other problems, who knows.

I’m not in the business of distributing compiled packages, I’m not even a Mac developer, but I hope this fix finds its way into the release version soon for everybody who also suffers from this problem.

Cheers, Marcel

Marcel,

Thanks for posting the fix. It’s already been pushed to the repository for Vine Server(OSXvnc).

We’ll try to get a maintenance release distributed shortly that includes this correction.

Thanks for using Vine!

Hello Jonathan,

that was quick, thanks a lot! While trying my own build some more today I noticed that keyboard support is completely broken in the current CVS and that there are a lot of error messages in the system log regarding the keyboard translation table. So while I was at it I had a look at that, too, and the fix seems to be thus:

  • uchrHandle = (UCKeyboardLayout *) TISGetInputSourceProperty(inputSource, kTISPropertyUnicodeKeyLayoutData);
  • uchrHandle = (UCKeyboardLayout *) CFDataGetBytePtr(TISGetInputSourceProperty(inputSource, kTISPropertyUnicodeKeyLayoutData));

And thank YOU for providing a VNC server that does proper clipboard synchronisation and usually has much better international keyboard support than the native MacOS server… couldn’t live without it.

Cheers, Marcel

Ok, this change has also been applied and committed.

So look for Vine Server 4.01 any day now.

Any news on a release with these fixes? The version on the download page is still 4.0… I hope this will also fix the incomprehensible “implicit command keydown” when typing a letter ‘i’ or ‘r’ in the Spotlight search box.

Download Eggplant dmg and take Vine Server.app v4.01 from the utilities directory.

The Vine Server 4.01 release is now available as a stand alone package on our downloads page:

Vine Downloads