VNC (RFB) bug on a 3.9 image

Vladimir Plšek vladimir.plsek at siemens.com
Mon Nov 20 16:53:45 UTC 2006


Hi,
thera are more changes you have to do to get it working.
I was trying to file out changes in nicer way, but i'm still learning
squeak.

If you turm on debuging in rfb menu and open transcript, it should display
where it stops working.
I hope I included them all.

Sébastien Rocca-Serra wrote:

> Hi,
> I want to run the RFBServer on a 3.9-7067 image.
> 
> But when I try to connect to it, I get "MessageNotUnderstood:
> SystemDictionary>>isBigEndian"
> (cf. bug 5043, http://bugs.impara.de/view.php?id=5043).
> 
> - I tried both the Squeak RFBViewer and a Windows TightVNC client
> - I tried the SqueakMap and SqueakSource packages and I always get this
> bug.
> 
> I tried to change "Smalltalk isBigEndian" to "SmalltalkImage current
> isBigEndian".
> It fixed the error, but I still can't connect:
> - I get a "connection closed" message with TightVNC
> - with RFBViewer, my image hangs...
> 
> So, is there a 3.9 release for RemoteFrameBuffer? Or a .cs I could use?
> 
> Thanks!
> Seb.
-------------- next part --------------
'From Squeak3.9 of 7 November 2006 [latest update: #7067] on 20 November 2006 at 5:46:26 pm'!

!RFBPixelFormat class methodsFor: 'instance creation' stamp: 'vp 11/9/2006 10:59'!
forForm: aForm
	"Answer a pixel format describing the pixels in aForm, in host byte order."

	^self new forForm: aForm bigEndian: SmalltalkImage  current isBigEndian! !
-------------- next part --------------
'From Squeak3.9 of 7 November 2006 [latest update: #7067] on 20 November 2006 at 5:46:22 pm'!

!RFBPixelFormat methodsFor: 'private' stamp: 'vp 11/9/2006 11:36'!
setOrderMap: serverFormat
	"Set the ColorMap used to convert local byte order to viewer byte order.  This map is effective only when sending an entire Bitmap to the remote viewer.  (Individual pixel values are always sent in big-endian order; see RFBStream{16,32}>>nextPutPixel:.)"

	orderMap _ bigEndian == SmalltalkImage current isBigEndian	"no map if byte order is commensurate"
		ifFalse:
			[bitsPerPixel == 16
				ifTrue: [ColorMap
							masks: #(16r00FF 16rFF00 0 0)
							shifts: #(8 -8 0 0)]
				ifFalse: [bitsPerPixel == 32
					ifTrue: [ColorMap
								masks: #(16r000000FF 16r0000FF00 16r00FF0000 16rFF000000)
								shifts: #(24 8 -8 -24)]]]! !
-------------- next part --------------
'From Squeak3.9 of 7 November 2006 [latest update: #7067] on 20 November 2006 at 5:46:29 pm'!

!RFBSession methodsFor: 'private' stamp: 'vp 11/9/2006 11:35'!
desktopName
	"Answer the name of the desktop, constructed from the image, host and platform names."
	"RFBSession new desktopName"

	^String streamContents: [:stream |
		stream
			nextPutAll: (FileDirectory default localNameFor: SmalltalkImage current imageName);
			nextPut: $@;
			nextPutAll: server localHostName;
			nextPutAll: ' [';
			nextPutAll: SmalltalkImage current platformName; space; nextPutAll: SmalltalkImage current osVersion;
			nextPut: $].
		interactive ifFalse: [stream nextPutAll: ' - view only']]! !
-------------- next part --------------
'From Squeak3.9 of 7 November 2006 [latest update: #7067] on 20 November 2006 at 5:46:32 pm'!

!RFBSession methodsFor: 'private' stamp: 'vp 11/9/2006 11:33'!
endUpdate
	"Just sent a screen update.  If we're logging memory usage, update the cumulative counters accordingly."

	| bytesUsed |
	server enableMemoryLog ifFalse: [^self].
	totalTime _ totalTime + (Time millisecondsSince: updateTime).
	bytesUsed _ bytesLeft - Smalltalk primBytesLeft.		"A vague approximation, at best..."
	SmalltalkImage current vmParameterAt: 5 put: allocationCount.
	bytesUsed < 0 ifTrue: [Smalltalk beepPrimitive.  ^self].
	updateCount _ updateCount + 1.
	meanSeaLevel _ meanSeaLevel + bytesUsed.
	lowWaterMark isNil
		ifTrue: [lowWaterMark _ highWaterMark _ bytesUsed]
		ifFalse:
			[lowWaterMark _ lowWaterMark min: bytesUsed.
			 highWaterMark _ highWaterMark max: bytesUsed]! !
-------------- next part --------------
'From Squeak3.9 of 7 November 2006 [latest update: #7067] on 20 November 2006 at 5:46:35 pm'!

!RFBSession methodsFor: 'configuring' stamp: 'vp 11/9/2006 11:45'!
rfbEncodingUnknown: encoding
	"Write a message to the log indicating that an unknown encoding number has been received during the protocol handshake."

	self log: 'ignoring unknown encoding: ' , encoding asString .! !


More information about the Squeak-dev mailing list