NullPointerException when trying to render Box with Opacity

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P3
    • None
    • Affects Version/s: 8
    • Component/s: javafx
    • Environment:

      Windows 7 64Bit; Java8 Snapshot b87

      Crashes when trying to render a Box set to a PhongMaterial, with a Opacity in the Color Value.
      Execute the examplecode , and set the color in the ColorPicker to a opacety value !=1.

      Code:

      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.control.ColorPicker;
      import javafx.scene.layout.StackPane;
      import javafx.scene.paint.PhongMaterial;
      import javafx.scene.shape.Box;
      import javafx.scene.shape.CullFace;
      import javafx.scene.shape.DrawMode;
      import javafx.stage.Stage;

      public class JavaFXApplication30 extends Application {

          @Override
          public void start(Stage primaryStage) {
              StackPane root = new StackPane();
              Box bounds = new javafx.scene.shape.Box(10 ,10,10);
              PhongMaterial material = new PhongMaterial();
              ColorPicker tmp = new ColorPicker();
              root.getChildren().add(tmp);
              material.diffuseColorProperty().bind(tmp.valueProperty());
              bounds.setMaterial(material);
              bounds.setDrawMode(DrawMode.FILL);
              bounds.setCullFace(CullFace.BACK);

              root.getChildren().add(bounds);

              Scene scene = new Scene(root, 300, 250);

              primaryStage.setTitle("Hello World!");
              primaryStage.setScene(scene);
              primaryStage.show();
          }

      }

            Assignee:
            Artem Ananiev (Inactive)
            Reporter:
            J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: