Open chrisr3 opened 7 years ago
The code in question is
MouseInfo.getPointerInfo().getLocation();
where the relevant part of getPointerInfo()
is:
...
Point point = new Point(0, 0);
int deviceNum = Toolkit.getDefaultToolkit().getMouseInfoPeer().fillPointWithCoords(point);
GraphicsDevice[] gds = GraphicsEnvironment.getLocalGraphicsEnvironment().
getScreenDevices();
PointerInfo retval = null;
if (areScreenDevicesIndependent(gds)) {
retval = new PointerInfo(gds[deviceNum], point);
} else {
for (int i = 0; i < gds.length; i++) {
GraphicsConfiguration gc = gds[i].getDefaultConfiguration();
Rectangle bounds = gc.getBounds();
if (bounds.contains(point)) {
retval = new PointerInfo(gds[i], point);
}
}
}
return retval;
}
This function can legitimately return null
in some circumstances, and JavaFX is throwing NPE when it then tries to invoke getLocation()
.
The final entry in the application's log file was:
So it looks like the JavaFX application thread has crashed while trying to update the cursor.