← Back to team overview

sikuli-driver team mailing list archive

[Bug 1818043] Re: NullPointerException in new Screen() if mouse is on second screen

 

please use:

public ScreenRobot() {
    Debug.on(3)
    screen = new Screen();

and analyse/post the log


** Summary changed:

- NullPointerException in new Screen() if mouse is on second screen
+ [1.1.4] possible NPE: multi-monitor: initScreens: mouse check

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

Title:
  [1.1.4] possible NPE: multi-monitor: initScreens: mouse check

Status in Sikuli:
  New

Bug description:
  Hi,

  I use 3 monitors in win 7 with sikulix-api 1.1.4 (This version was
  built at 2019-02-27_17:37 (Build 212) )

  now if i start a new screen (screen = new Screen() ). I get a
  NullPointerException if my Mouse is in the 3rd Screen (windows
  screencounting) in the middle of the monitors. Is the mouse at this
  time on Screen 1 oder 3 (right and left outside) is all fine...

  The code is simple:

  public ScreenRobot() {
      screen = new Screen();

  Exception in thread "main" java.lang.NullPointerException
  	at org.sikuli.script.Location.getScreen(Location.java:130)
  	at org.sikuli.script.Mouse.move(Mouse.java:391)
  	at org.sikuli.script.Mouse.move(Mouse.java:372)
  	at org.sikuli.script.Mouse.init(Mouse.java:60)
  	at org.sikuli.script.Screen.initScreens(Screen.java:136)
  	at org.sikuli.script.Screen.<init>(Screen.java:169)
  	at de.sm.ScreenRobot.<init>(ScreenRobot.java:31)

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


References