-
Bug
-
Resolution: Fixed
-
P3
-
8u20
-
Mac OSX Mavericks 10.9.2
JDK: 1.8.0_20-ea-b05
JavaFx: 8.0.20-ea-b05
1) Run the sample demo application below
2) Click on the "open popup" button
3) Navigate in the list using the MacBook touchpad (two fingers up/down)
4) NullPointerException occurred
[Logs]
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
at com.sun.glass.ui.TouchInputSupport.notifyBeginTouchEvent(TouchInputSupport.java:82)
at com.sun.glass.ui.mac.MacTouchInputSupport.notifyEndTouchEvent(MacTouchInputSupport.java:85)
at com.sun.glass.ui.mac.MacGestureSupport.notifyEndTouchEvent(MacGestureSupport.java:81)
(repeated thousand of time)
[Demo.java]
import javafx.application.Application;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.event.ActionEvent;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.ListView;
import javafx.scene.control.PopupControl;
import javafx.scene.control.Skin;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
public class Demo extends Application {
class MyPopupControlSkin implements Skin<PopupControl> {
private final PopupControl popupControl;
private final Node node;
public MyPopupControlSkin(final PopupControl control) {
this.popupControl = control;
ObservableList<Number> data = FXCollections.observableArrayList();
for( int i = 0; i < 400; i++ ) {
data.add(i);
}
this.node = new VBox(new Label("Popup control"), new ListView(data));
}
@Override public PopupControl getSkinnable() {
return popupControl;
}
@Override public Node getNode() {
return node;
}
@Override public void dispose() {}
}
@Override public void start(Stage primaryStage) {
Button btn = new Button("Open popup");
btn.setOnAction((ActionEvent e) -> {
PopupControl popup = new PopupControl();
popup.setSkin(new MyPopupControlSkin(popup));
popup.show(btn, primaryStage.getX() + 160, primaryStage.getY() + 30);
});
primaryStage.setScene(new Scene(btn, 150, 50));
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
2) Click on the "open popup" button
3) Navigate in the list using the MacBook touchpad (two fingers up/down)
4) NullPointerException occurred
[Logs]
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
at com.sun.glass.ui.TouchInputSupport.notifyBeginTouchEvent(TouchInputSupport.java:82)
at com.sun.glass.ui.mac.MacTouchInputSupport.notifyEndTouchEvent(MacTouchInputSupport.java:85)
at com.sun.glass.ui.mac.MacGestureSupport.notifyEndTouchEvent(MacGestureSupport.java:81)
(repeated thousand of time)
[Demo.java]
import javafx.application.Application;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.event.ActionEvent;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.ListView;
import javafx.scene.control.PopupControl;
import javafx.scene.control.Skin;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
public class Demo extends Application {
class MyPopupControlSkin implements Skin<PopupControl> {
private final PopupControl popupControl;
private final Node node;
public MyPopupControlSkin(final PopupControl control) {
this.popupControl = control;
ObservableList<Number> data = FXCollections.observableArrayList();
for( int i = 0; i < 400; i++ ) {
data.add(i);
}
this.node = new VBox(new Label("Popup control"), new ListView(data));
}
@Override public PopupControl getSkinnable() {
return popupControl;
}
@Override public Node getNode() {
return node;
}
@Override public void dispose() {}
}
@Override public void start(Stage primaryStage) {
Button btn = new Button("Open popup");
btn.setOnAction((ActionEvent e) -> {
PopupControl popup = new PopupControl();
popup.setSkin(new MyPopupControlSkin(popup));
popup.show(btn, primaryStage.getX() + 160, primaryStage.getY() + 30);
});
primaryStage.setScene(new Scene(btn, 150, 50));
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
- duplicates
-
JDK-8094785 [macosx] NPE in TouchInputSupport
- Closed
-
JDK-8097437 [Glass, Mac] Intermittent NPE from touch code when exiting (it was SceneBuilder, but I've seen it in other apps)
- Closed
- relates to
-
JDK-8093117 MacGestureSupport.notifyNextTouchEvent IllegalStateException not on JavaFX Application Thread on exit
- Resolved