On Fri, 20 Dec 2024 20:07:10 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:

>>> Yes, I'm running into NPE without as well as with the fix.
>> 
>> Can you provide information on your multi-screen setup ?
>> how many displays ? what is the relative placement of the monitors ?
>> What are the virtual bounds of your setup ?
>> 
>> And the stack trace of the exception you get too.
>
> For me, the test *without the fix* prints
> 
> Current mouse location: java.awt.Point[x=0,y=200]
> 
> The mouse cursor moves to 200, 200 and then to 0, 200 on the screen.

Displays: 2 
Placement: Side-by-side, with the bottom edge aligned as below

<img width="478" alt="image" 
src="https://github.com/user-attachments/assets/7ea5be69-989f-42b5-ac26-631d170d8db0";
 />

Screen bounds:
Win32GraphicsDevice[screen=0]:java.awt.Rectangle[x=-1920,y=363,width=1280,height=720]
Win32GraphicsDevice[screen=1]:java.awt.Rectangle[x=0,y=0,width=2293,height=960]

Stack Trace:
----------System.err:(11/959)----------
java.lang.NullPointerException: Cannot invoke 
"java.awt.PointerInfo.getLocation()" because the return value of 
"java.awt.MouseInfo.getPointerInfo()" is null
        at MouseMoveOffScreen.main(MouseMoveOffScreen.java:57)
        at 
java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
        at java.base/java.lang.reflect.Method.invoke(Method.java:565)
        at 
com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
        at java.base/java.lang.Thread.run(Thread.java:1447)

JavaTest Message: Test threw exception: java.lang.NullPointerException: Cannot 
invoke "java.awt.PointerInfo.getLocation()" because the return value of 
"java.awt.MouseInfo.getPointerInfo()" is null
JavaTest Message: shutting down test

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/22781#discussion_r1894360205

Reply via email to