Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8114136

com.sun.javafx.geom.BoxBounds cannot be cast to com.sun.javafx.geom.RectBounds

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: fx2.0
    • Fix Version/s: fx2.0
    • Component/s: javafx
    • Labels:
    • Environment:

      win7 JFX 32bits

      Description

      I still get this error using Build 32. If it has been fixed since June 1st, I guess the build 32 should include the fix, no?
      Could you check with the attached code below?
      Thanks.


      java.lang.ClassCastException: com.sun.javafx.geom.BoxBounds cannot be cast to com.sun.javafx.geom.RectBounds
      at com.sun.javafx.sg.prism.NGText.computeContentBounds(NGText.java:1097)
      at com.sun.javafx.tk.quantum.PrismTextHelper.computeBounds(PrismTextHelper.java:24)
      at javafx.scene.text.Text.impl_computeGeomBounds(Text.java:844)
      at javafx.scene.Node.getGeomBounds(Node.java:2457)
      at javafx.scene.Node.getLocalBounds(Node.java:2402)
      at javafx.scene.Node.getTransformedBounds(Node.java:2372)
      at javafx.scene.Parent.impl_computeGeomBounds(Parent.java:1091)
      at javafx.scene.layout.Region.impl_computeGeomBounds(Region.java:1525)
      at javafx.scene.Node.getGeomBounds(Node.java:2457)
      at javafx.scene.Node.getLocalBounds(Node.java:2423)
      at javafx.scene.Node.getTransformedBounds(Node.java:2357)
      at javafx.scene.Parent.impl_computeGeomBounds(Parent.java:1091)
      at javafx.scene.Node.getGeomBounds(Node.java:2457)
      at javafx.scene.Node.getLocalBounds(Node.java:2423)
      at javafx.scene.Node.getTransformedBounds(Node.java:2372)
      at javafx.scene.Parent.impl_computeGeomBounds(Parent.java:1091)
      at javafx.scene.layout.Region.impl_computeGeomBounds(Region.java:1525)
      at javafx.scene.Node.getGeomBounds(Node.java:2457)
      at javafx.scene.Node.getLocalBounds(Node.java:2423)
      at javafx.scene.Node.getTransformedBounds(Node.java:2357)
      at javafx.scene.Parent.impl_computeGeomBounds(Parent.java:1091)
      at javafx.scene.Node.getGeomBounds(Node.java:2457)
      at javafx.scene.Node.getLocalBounds(Node.java:2423)
      at javafx.scene.Node.updateTxBounds(Node.java:2492)
      at javafx.scene.Node.getTransformedBounds(Node.java:2353)
      at javafx.scene.Node.impl_updatePG(Node.java:393)
      at javafx.scene.Parent.impl_updatePG(Parent.java:123)
      at javafx.scene.Node.impl_syncPGNode(Node.java:372)
      at javafx.scene.Scene$ScenePulseListener.synchronizePGScene(Scene.java:1477)
      at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:1578)
      at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:268)
      at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:358)
      at com.sun.javafx.tk.quantum.QuantumToolkit$10.run(QuantumToolkit.java:294)
      at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
      at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29)
      at com.sun.glass.ui.win.WinApplication$1$1.run(WinApplication.java:49)
      at java.lang.Thread.run(Thread.java:662)


      Code:

      package testtransistion;

      import javafx.animation.RotateTransition;
      import javafx.application.Application;
      import javafx.geometry.Point3D;
      import javafx.scene.Scene;
      import javafx.scene.control.Button;
      import javafx.scene.layout.BorderPane;
      import javafx.scene.paint.Color;
      import javafx.stage.Stage;
      import javafx.util.Duration;

      public class RotationBug extends Application {

          public static void main(String[] args) {
              Application.launch(RotationBug.class, args);
          }

          @Override
          public void start(Stage primaryStage) {

              final Button button = new Button("Hi JavaFX!");

              RotateTransition animation = new RotateTransition(Duration.valueOf(5000), button);
              animation.setFromAngle(0);
              animation.setToAngle(360);
              animation.setAutoReverse(true);
              button.setRotationAxis(new Point3D(10, 10, 10));
              
              // Root
              BorderPane root = new BorderPane();
              root.setCenter(button);
              Scene scene = new Scene(root, 200, 200, Color.WHITE);

              primaryStage.setTitle("Rotation issue");
              primaryStage.setScene(scene);
              primaryStage.setVisible(true);
              animation.play();
          }
      }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                thor Thor Johannesson (Inactive)
                Reporter:
                anouardjfx arnaud nouard (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: