-
Bug
-
Resolution: Incomplete
-
P4
-
jfx17
-
x86_64
-
linux
A DESCRIPTION OF THE PROBLEM :
The StackTrace of this problem is similar to the one in these problems:JDK-8095717 and JDK-8190411
But we don't use the Slider in combination with a ComboBox, nor do we use a ToolTip.
When we use Windows 10, the error does not occur. However, when we use Debian with a touchscreen, the error occurs, but rarely. And even then only the first time we use the slider. If the slider has already been used without the error occurring, it will not occur afterwards.
----
The following code snippet is from the SliderSkin class:
thumb.setOnMousePressed(me -> {
behavior.thumbPressed(me, 0.0f);
dragStart = thumb.localToParent(me.getX(), me.getY());
preDragThumbPos = (getSkinnable().getValue() - getSkinnable().getMin()) /
(getSkinnable().getMax() - getSkinnable().getMin());
});
thumb.setOnMouseReleased(me -> {
behavior.thumbReleased(me);
});
thumb.setOnMouseDragged(me -> {
Point2D cur = thumb.localToParent(me.getX(), me.getY());
double dragPos = (getSkinnable().getOrientation() == Orientation.HORIZONTAL) ?
cur.getX() - dragStart.getX() : -(cur.getY() - dragStart.getY());
behavior.thumbDragged(me, preDragThumbPos + dragPos / trackLength);
});
We suspect that possibly due to timing problems the 'setOnMouseDragged()' is called first and then the 'setOnMousePressed()', which leads to the fact that startDrag is still null.
FREQUENCY : rarely
The StackTrace of this problem is similar to the one in these problems:
But we don't use the Slider in combination with a ComboBox, nor do we use a ToolTip.
When we use Windows 10, the error does not occur. However, when we use Debian with a touchscreen, the error occurs, but rarely. And even then only the first time we use the slider. If the slider has already been used without the error occurring, it will not occur afterwards.
----
The following code snippet is from the SliderSkin class:
thumb.setOnMousePressed(me -> {
behavior.thumbPressed(me, 0.0f);
dragStart = thumb.localToParent(me.getX(), me.getY());
preDragThumbPos = (getSkinnable().getValue() - getSkinnable().getMin()) /
(getSkinnable().getMax() - getSkinnable().getMin());
});
thumb.setOnMouseReleased(me -> {
behavior.thumbReleased(me);
});
thumb.setOnMouseDragged(me -> {
Point2D cur = thumb.localToParent(me.getX(), me.getY());
double dragPos = (getSkinnable().getOrientation() == Orientation.HORIZONTAL) ?
cur.getX() - dragStart.getX() : -(cur.getY() - dragStart.getY());
behavior.thumbDragged(me, preDragThumbPos + dragPos / trackLength);
});
We suspect that possibly due to timing problems the 'setOnMouseDragged()' is called first and then the 'setOnMousePressed()', which leads to the fact that startDrag is still null.
FREQUENCY : rarely
- relates to
-
JDK-8095717 Slider thumb drag can generate NullPointerExceptions
- Resolved
-
JDK-8190411 NPE in SliderSkin:140 if Slider.Tooltip.autohide is true
- Resolved