← Back to team overview

sikuli-driver team mailing list archive

[Bug 1384317] Re: [RC3] Special keys don't go through VNC session

 

OK, so I've set up a 1.1.0 version and created a new project with
Eclipse. Library sikulixapi.jar works well with a simple sample.

So I've taken your example above, but an Exception is caught during the
instanciation of VNCScreen. Corresponding stacktrace is :

Exception in thread "main" java.lang.ExceptionInInitializerError
	at VNCSikuli.main(VNCSikuli.java:30)
Caused by: java.lang.NullPointerException
	at edu.unh.iol.dlc.VNCScreen.initScreens(VNCScreen.java:103)
	at edu.unh.iol.dlc.VNCScreen.<clinit>(VNCScreen.java:74)
	... 1 more


In order to reproduce this error, you can take this class :

import java.io.IOException;
import java.net.Socket;
import java.net.UnknownHostException;
import org.sikuli.script.*;
import edu.unh.iol.dlc.*;

public class VNCSikuli {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		Socket sock;
		try {
                        sock = new Socket("192.168.1.2", 5900);
			
                        sock.setSoTimeout(1000);
                        sock.setKeepAlive(true); //some socket configuration

                        ConnectionController cc = new ConnectionController(sock);
                        cc.openConnection(0); //opens the vnc connection for connection 0, multiple are supported

                        cc.setPixelFormat(0, "Truecolor", 32, 0);  //for connection 0, set pixel data to Truecolor, 32 bits per pixel, little endian
                        cc.start(0); //start thread that keeps BufferedImage updated by polling server for remote desktop changes
	    
                        Thread.sleep(2000); //wait for buffered image to be updated before we do sikuli stuff

                        VNCScreen s = new VNCScreen();  //default constructor uses ConnectionController index 0
                        // This is not returning, exception is thrown
            }
}


Any idea where this error can come from ?

** Description changed:

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1384317

Title:
  [RC3] Special keys don't go through VNC session

Status in Sikuli:
  Won't Fix

Bug description:
  Special keys like Key.ENTER, Key.F1, Key.BACKSPACE, etc. do not go
  through VNC session.

  To reproduce the bug :
  * set up a Windows Seven VM where RealVNC is installed and up (https://www.realvnc.com/download/vnc/)
  * run a sikuli script from a host running Debian Wheezy. The script has to open something (firefox for example) and to vncscreen.type("test"+Key.ENTER)
  * you can check that firefox is correctly opening by the script, but only "test" is typed (no <ENTER>).

  Version used is the one from github (https://github.com/sikuli/sikuli)

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1384317/+subscriptions


References