Resizing the window will resize the SubScene. The application crashes with following native error on Linux.
# JRE version: Java(TM) SE Runtime Environment (8.0-b94) (build 1.8.0-ea-b94)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.0-b36 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [libGL.so.1+0x2f9189] glDeleteTextures+0x9
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [libGL.so.1+0x2f9189] glDeleteTextures+0x9
j com.sun.prism.es2.GLContext.nDeleteTexture(JI)V+0
j com.sun.prism.es2.GLContext.deleteTexture(I)V+5
j com.sun.prism.es2.ES2TextureData.dispose()V+69
j com.sun.prism.es2.ES2RTTextureData.dispose()V+1
j com.sun.prism.es2.ES2TextureResource.free()V+14
j com.sun.prism.impl.ManagedResource.dispose()V+8
j com.sun.prism.impl.BaseTexture.dispose()V+4
j com.sun.javafx.sg.prism.NGSubScene.invalidateRTT()V+11
j com.sun.javafx.sg.prism.NGSubScene.setWidth(F)V+25
j javafx.scene.SubScene.impl_updatePG()V+128
j javafx.scene.Node.impl_syncPGNode()V+25
j javafx.scene.Scene$ScenePulseListener.synchronizeSceneNodes()V+94
j javafx.scene.Scene$ScenePulseListener.pulse()V+243
j com.sun.javafx.tk.Toolkit.firePulse()V+153
j com.sun.javafx.tk.quantum.QuantumToolkit.pulse(Z)V+79
j com.sun.javafx.tk.quantum.QuantumToolkit.pulse()V+2
j com.sun.javafx.tk.quantum.QuantumToolkit$16.run()V+4
j com.sun.glass.ui.InvokeLaterDispatcher$Future.run()V+4
package jiraissue;
import javafx.application.Application;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.event.EventHandler;
import javafx.scene.Group;
import javafx.scene.PerspectiveCamera;
import javafx.scene.PointLight;
import javafx.scene.Scene;
import javafx.scene.SubScene;
import javafx.scene.layout.Background;
import javafx.scene.layout.BackgroundFill;
import javafx.scene.layout.BorderPane;
import javafx.scene.paint.Color;
import javafx.scene.shape.Cylinder;
import javafx.stage.Stage;
import javafx.stage.WindowEvent;
public class WindowResizing extends Application {
public static void main(String[] args) {
launch(args);
}
@Override public void start(Stage stage) {
// SubScene
final Group subSceneRoot = new Group();
final SubScene subScene = new SubScene(subSceneRoot, 800, 800, true, false);
subScene.setFill(Color.YELLOWGREEN);
// SubScene's camera
final PerspectiveCamera perspectiveCamera = new PerspectiveCamera(true);
perspectiveCamera.setFarClip(25);
perspectiveCamera.setNearClip(0.1);
perspectiveCamera.setFieldOfView(44);
subScene.setCamera(perspectiveCamera);
// SubScene's light
final PointLight pointLight = new PointLight(Color.WHITE);
pointLight.setTranslateZ(-20000);
// Viewing group: camera and headlight
final Group viewingGroup = new Group(perspectiveCamera, pointLight);
viewingGroup.setTranslateZ(-5);
// 3D model
final Cylinder cylinder = new Cylinder();
subSceneRoot.getChildren().addAll(cylinder, viewingGroup);
// SubScene's parent
final BorderPane borderPane = new BorderPane();
borderPane.setMinHeight(0);
borderPane.setMinWidth(0);
borderPane.setCenter(subScene);
borderPane.setBackground(new Background(new BackgroundFill(Color.YELLOW, null, null)));
final Scene scene = new Scene(borderPane, 900, 900, true);
ChangeListener sceneBoundsListener = new ChangeListener() {
@Override
public void changed(ObservableValue observable, Object oldXY, Object newXY) {
subScene.setWidth(scene.getWidth() - 100);
subScene.setHeight(scene.getHeight() - 100);
}
};
scene.widthProperty().addListener(sceneBoundsListener);
scene.heightProperty().addListener(sceneBoundsListener);
stage.setTitle("WindowResizing");
stage.setScene(scene);
stage.setOnCloseRequest(new EventHandler<WindowEvent>() {
@Override public void handle(WindowEvent event) {
System.exit(0);
}
});
stage.show();
}
}
# JRE version: Java(TM) SE Runtime Environment (8.0-b94) (build 1.8.0-ea-b94)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.0-b36 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [libGL.so.1+0x2f9189] glDeleteTextures+0x9
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [libGL.so.1+0x2f9189] glDeleteTextures+0x9
j com.sun.prism.es2.GLContext.nDeleteTexture(JI)V+0
j com.sun.prism.es2.GLContext.deleteTexture(I)V+5
j com.sun.prism.es2.ES2TextureData.dispose()V+69
j com.sun.prism.es2.ES2RTTextureData.dispose()V+1
j com.sun.prism.es2.ES2TextureResource.free()V+14
j com.sun.prism.impl.ManagedResource.dispose()V+8
j com.sun.prism.impl.BaseTexture.dispose()V+4
j com.sun.javafx.sg.prism.NGSubScene.invalidateRTT()V+11
j com.sun.javafx.sg.prism.NGSubScene.setWidth(F)V+25
j javafx.scene.SubScene.impl_updatePG()V+128
j javafx.scene.Node.impl_syncPGNode()V+25
j javafx.scene.Scene$ScenePulseListener.synchronizeSceneNodes()V+94
j javafx.scene.Scene$ScenePulseListener.pulse()V+243
j com.sun.javafx.tk.Toolkit.firePulse()V+153
j com.sun.javafx.tk.quantum.QuantumToolkit.pulse(Z)V+79
j com.sun.javafx.tk.quantum.QuantumToolkit.pulse()V+2
j com.sun.javafx.tk.quantum.QuantumToolkit$16.run()V+4
j com.sun.glass.ui.InvokeLaterDispatcher$Future.run()V+4
package jiraissue;
import javafx.application.Application;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.event.EventHandler;
import javafx.scene.Group;
import javafx.scene.PerspectiveCamera;
import javafx.scene.PointLight;
import javafx.scene.Scene;
import javafx.scene.SubScene;
import javafx.scene.layout.Background;
import javafx.scene.layout.BackgroundFill;
import javafx.scene.layout.BorderPane;
import javafx.scene.paint.Color;
import javafx.scene.shape.Cylinder;
import javafx.stage.Stage;
import javafx.stage.WindowEvent;
public class WindowResizing extends Application {
public static void main(String[] args) {
launch(args);
}
@Override public void start(Stage stage) {
// SubScene
final Group subSceneRoot = new Group();
final SubScene subScene = new SubScene(subSceneRoot, 800, 800, true, false);
subScene.setFill(Color.YELLOWGREEN);
// SubScene's camera
final PerspectiveCamera perspectiveCamera = new PerspectiveCamera(true);
perspectiveCamera.setFarClip(25);
perspectiveCamera.setNearClip(0.1);
perspectiveCamera.setFieldOfView(44);
subScene.setCamera(perspectiveCamera);
// SubScene's light
final PointLight pointLight = new PointLight(Color.WHITE);
pointLight.setTranslateZ(-20000);
// Viewing group: camera and headlight
final Group viewingGroup = new Group(perspectiveCamera, pointLight);
viewingGroup.setTranslateZ(-5);
// 3D model
final Cylinder cylinder = new Cylinder();
subSceneRoot.getChildren().addAll(cylinder, viewingGroup);
// SubScene's parent
final BorderPane borderPane = new BorderPane();
borderPane.setMinHeight(0);
borderPane.setMinWidth(0);
borderPane.setCenter(subScene);
borderPane.setBackground(new Background(new BackgroundFill(Color.YELLOW, null, null)));
final Scene scene = new Scene(borderPane, 900, 900, true);
ChangeListener sceneBoundsListener = new ChangeListener() {
@Override
public void changed(ObservableValue observable, Object oldXY, Object newXY) {
subScene.setWidth(scene.getWidth() - 100);
subScene.setHeight(scene.getHeight() - 100);
}
};
scene.widthProperty().addListener(sceneBoundsListener);
scene.heightProperty().addListener(sceneBoundsListener);
stage.setTitle("WindowResizing");
stage.setScene(scene);
stage.setOnCloseRequest(new EventHandler<WindowEvent>() {
@Override public void handle(WindowEvent event) {
System.exit(0);
}
});
stage.show();
}
}
- relates to
-
JDK-8094007 Linux: Crash when scrolling a ScrollPane
- Closed
-
JDK-8124927 Crash: glDeleteTextures in Ensemble
- Closed