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

PixelFormat negotiation fails with x11vnc server #4

Closed
tseiman opened this issue Dec 9, 2017 · 3 comments
Closed

PixelFormat negotiation fails with x11vnc server #4

tseiman opened this issue Dec 9, 2017 · 3 comments

Comments

@tseiman
Copy link

tseiman commented Dec 9, 2017

Hello,
I tried to run jfxvnc against a x11vnc server.
By using the actual github version the server quits the communication with the log entry:

15/11/2017 12:00:58 Pixel format for client 192.168.99.23
15/11/2017 12:00:58   32 bpp, depth 24, little endian
15/11/2017 12:00:58   uses a colour map (not true color).
15/11/2017 12:00:58 rfbSetTranslateFunction: client has colour map but 32-bit - can only cope with 8-bit colour maps

So I tried to force the jfxvnc viewer into RGB_555 pixel format e.g. by trying to set DEFAULT_PIXELFORMAT in org.jfxvnc.ui.control.VncImageView.java:47 to PixelFormat.RGB_555.

When I do this the server assumes

15/11/2017 12:15:33 Pixel format for client 192.168.99.23:
15/11/2017 12:15:33   16 bpp, depth 16, little endian
15/11/2017 12:15:33   true colour: max r 255 g 255 b 255, shift r 16 g 8 b 0

which looks fine - however jfxvnc throws an IndexOutOfBoundsException :

00:39:02.693 [vnc-connection-17] DEBUG org.jfxvnc.net.rfb.codec.ProtocolHandler - request full framebuffer update
00:39:04.046 [JavaFX Application Thread] ERROR org.jfxvnc.ui.control.VncImageView - rect: RawImageRect [x=0, y=0, width=1024, height=768, pixels.capacity=1179648, scanlineStride=3072]
java.lang.IndexOutOfBoundsException: null
	at java.nio.Buffer.checkIndex(Buffer.java:540)	
	at java.nio.DirectByteBuffer.get(DirectByteBuffer.java:253)
	at com.sun.javafx.image.impl.ByteRgb$ToByteBgrfConv.doConvert(ByteRgb.java:150)
	at  com.sun.javafx.image.impl.BaseByteToByteConverter.convert(BaseByteToByteConverter.java:103)
	at  com.sun.javafx.image.impl.BaseByteToByteConverter.convert(BaseByteToByteConverter.java:34)
	at com.sun.prism.Image$BaseAccessor.setPixels(Image.java:1006)
	at com.sun.prism.Image.setPixels(Image.java:685)
	at javafx.scene.image.WritableImage$2.setPixels(WritableImage.java:193)
	at org.jfxvnc.ui.control.VncImageView.render(VncImageView.java:124)
	at org.jfxvnc.ui.control.VncImageView.lambda$accept$18(VncImageView.java:102)
	at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
	at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)

Interesting as well that the Apps Info Panel shows still a Depth from 24 (32bpp)...

I tried to force RGB_555 on some more places where it looks like it is set/get - but no success yet.

Is there a way to force the complete App to be on RGB_555 ? (that could be as well some feature...)

Many Thanks
Kind Regards
Thomas Schmidt

@comtel2000
Copy link
Owner

yes, there are some changes required for supporting 16bit colors. Until now only 32bit(24bpp) or the Colormap 8bit format should work where the highest available server pixelformat is selected by default.

@nizinkin
Copy link

would this issue fixes?

@comtel2000
Copy link
Owner

Support for 16bit color is currently not planned

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

No branches or pull requests

3 participants