My own viewer produces a black screen - why?

Here you will find help for frequently asked questions as well as for your specific question.

My own viewer produces a black screen - why?

Postby mendingo » 2004-06-30 13:34

I'm making my own vnc viewer, that takes screenshots of computers with the VNC server installed.

It works perfectly for other versions of VNC, but with Ultra (any version) installed as the server, a black screen is returned.

If I connect to the Server with any other viewer, and then try to take a screenshot with my viewer, it works fine, implying the problem is with the configuration stage.

Does anyone have any ideas what could cause this?

The order of comuniqe between the client and server is as follows (taken from debugging outputs):

opening port
**get version message
**send version message
**read response (auth scheme) = 2
**passsword reqd
---------READFULLY(CHALLENGE)------
------READINT(auth result)-----
Authenticate with password: true
***** sendSetEncodings
***** sendSetPixelFormat
***** SendFrameBufferUpdateRequest
***** recieveFrameBufferUpdate
message type: 0
recieving 1 rectangles
x: 0
y: 0
width: 1024
height: 768
encoding: 0
RAW ENCODING
*****recieveRawPixels
mendingo
 
Posts: 4
Joined: 2004-06-30 09:22

Postby mendingo » 2004-07-05 11:16

I've solved it. In case anyone with the same problem finds this thread in future, here's what happens:

Unlike other VNC servers, UltraVNC produces a black screen as it's initial frame, so if, at any time, you request a framebuffer update, with the incremental flag set to 0, you will recieve a black screen.

This is going against the RFB protocol, and may well be a bug.

The solution to the problem is to send a framebuffer request to with the incremental flag set to 0 or 1 (either produces a black screen), read the framebuffer update, then send another framebuffer update request with the flag set to 1, and the correct screen will be returned.

If any UltraVNC programmers read these forums, would you care to explain why this happens?
mendingo
 
Posts: 4
Joined: 2004-06-30 09:22


Return to General help

Who is online

Users browsing this forum: No registered users and 2 guests