Details
-
Bug
-
Status: Resolved
-
P3
-
Resolution: Fixed
-
8, 9, 10
-
generic
-
generic
Description
FULL PRODUCT VERSION :
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 10.0.14393]
A DESCRIPTION OF THE PROBLEM :
Two Box nodes are added to scenegraph:
The width of the box1 is 2 times the width of the box2.
The height of the box1 is 1/4 times the height of the box2.
The depth of the box1 is 2 times the depth of the box2.
When rendered, the second box is shown with exactly the same dimensions of the first box. (Here "the first" and "the second" are relative to scene's root children order.)
I tried other relations of boxes' dimensions, but this is the only one that produces incorrect result.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The second box should be rendered with the given dimensions.
ACTUAL -
The second box is rendered with the dimensions of the first box.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.PerspectiveCamera;
import javafx.scene.Scene;
import javafx.scene.paint.Color;
import javafx.scene.shape.Box;
import javafx.stage.Stage;
public class BoxesBug extends Application {
public static void main(String[] args) {
Application.launch(args);
}
@Override
public void start(Stage stage) {
Box box1 = new Box( 9, 1, 12);
Box box2 = new Box( 4.5, 4, 6);
box1.setTranslateY(5);
box2.setTranslateY(-5);
Group root = new Group(
box1,
box2
);
PerspectiveCamera camera = new PerspectiveCamera(true);
camera.setTranslateZ(-60);
Scene scene = new Scene(root, 800, 800, true);
scene.setFill(Color.hsb(100, 0.5, 0.6));
scene.setCamera(camera);
stage.setScene(scene);
stage.show();
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Changing any of the boxes' dimensions by a very small amount will make the second box render correctly.
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 10.0.14393]
A DESCRIPTION OF THE PROBLEM :
Two Box nodes are added to scenegraph:
The width of the box1 is 2 times the width of the box2.
The height of the box1 is 1/4 times the height of the box2.
The depth of the box1 is 2 times the depth of the box2.
When rendered, the second box is shown with exactly the same dimensions of the first box. (Here "the first" and "the second" are relative to scene's root children order.)
I tried other relations of boxes' dimensions, but this is the only one that produces incorrect result.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The second box should be rendered with the given dimensions.
ACTUAL -
The second box is rendered with the dimensions of the first box.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.PerspectiveCamera;
import javafx.scene.Scene;
import javafx.scene.paint.Color;
import javafx.scene.shape.Box;
import javafx.stage.Stage;
public class BoxesBug extends Application {
public static void main(String[] args) {
Application.launch(args);
}
@Override
public void start(Stage stage) {
Box box1 = new Box( 9, 1, 12);
Box box2 = new Box( 4.5, 4, 6);
box1.setTranslateY(5);
box2.setTranslateY(-5);
Group root = new Group(
box1,
box2
);
PerspectiveCamera camera = new PerspectiveCamera(true);
camera.setTranslateZ(-60);
Scene scene = new Scene(root, 800, 800, true);
scene.setFill(Color.hsb(100, 0.5, 0.6));
scene.setCamera(camera);
stage.setScene(scene);
stage.show();
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Changing any of the boxes' dimensions by a very small amount will make the second box render correctly.