Skip to content
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

Recording crash with TightVNC server on Windows 10: unknown message-type: 6 #13

Open
gmarec opened this issue Apr 2, 2020 · 2 comments

Comments

@gmarec
Copy link

gmarec commented Apr 2, 2020

I'm using https://github.com/saily/vnc-recorder, but randomly I've got :

INFO[0411] ========got server message, msgType=6
panic: unknown message-type: 6

In your code I can see :

// Server-to-Client message types
const (
FramebufferUpdateMsgType ServerMessageType = iota
SetColorMapEntriesMsgType
BellMsgType
ServerCutTextMsgType
)

So there's no type 6 and I don't know what is a type 6 message, RFB protocol tells "Possibly used by UltraVNC".

Have you any idea how to fix this ?

Thanks

@amitbet
Copy link
Owner

amitbet commented Apr 3, 2020

First tell me, which server are you using? is it UltraVNC?

In any case, since RFB is a binary protocol which has no message size, untreated messages can break the system: reading the wrong size (or not reading something), means that you are now off by some bits, so you don't know where the next message begins.

to fix this you should first see that you are really getting this message type and not just failing on a previous message and wrongly reading the next message and it's type. (check for any previous silent failures by opening up debug level / adding some logs)
if it is a correct message type, then you should implement this message type (just by reading & skipping it):

  • try just ignoring the message after reading the type
  • try reading several bytes (most simple messages are less than 8 bytes)

You should also try to understand when the server is sending the problematic message, it can furtehr your understanding about what the problem really is (it might be when you are in fullscreen, or when you open some spacial image remotely, when pressing ctrl+c / ctrl+v, or maybe when the mouse hover over something and changes the cursor, etc.)

Ultra vnc source is available for download here: (it's actually GPL opensource)
https://www.uvnc.com/downloads/ultravnc/100-download-ultravnc-10962.html
look at rfb/rfbproto.h and other files in that area.
Their code doesn't indicate using server message type = 6 as far as I can see.

@gmarec
Copy link
Author

gmarec commented Apr 3, 2020

@amitbet I use TightVNC for Windows (Version 2.8.27) on Windows 10 64 bits.

I will try to investigate on server side, thanks for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants