#79 problem in VncCanvas.processNormalProtocol

open
nobody
None
5
2007-06-26
2007-06-26
pedro
No

Need to update the following in VncCanvas.java:

public void processNormalProtocol() {
...
if (rfb.updateRectEncoding == RfbProto.EncodingNewFBSize) {
rfb.setFramebufferSize(rw, rh);
updateFramebufferSize();
continue; //!! Replace 'break;' with 'continue;'
}
...

The problem I'm seeing is that an FBU with > 1 rectangle is sent by the server. The first rectangle is a RfbProto.EncodingNewFBSize. After processing, the code breaks out of rectangle processing, leaving the remaining rectangles in the input stream. On the subsequent read for message type, the remaining rectangles are read incorrectly as msgTypes, causing the applet to die because these msgTypes are unknown.

This problem shows up mostly when you restart the VM (which causes multiple EncodingNewFBSize msgTypes to be generated).

Cheers,
pedro

pedro_muchacho@yahoo.com

Discussion