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

Infinite loop occurs while resolving lookups

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • jfx24
    • jfx23
    • javafx
    • None
    • b04

      The test case below results in a StackOverflowError:

          @Test
          public void shouldDetectNestedInfiniteLoop() throws IOException {
              Stylesheet stylesheet = new CssParser().parse("userAgentStylSheet", """
                  .root {
                      -fx-base-fill: ladder(-fx-base, white 49%, black 50%);
                      -fx-base: ladder(-fx-base-fill, white 49%, black 50%);
                  }

                  .pane {
                      -fx-background-color: -fx-base;
                  }
              """);

              StyleManager.getInstance().setDefaultUserAgentStylesheet(stylesheet);
              Pane a = new Pane();

              a.getStyleClass().add("pane");

              root.getChildren().addAll(a);

              assertDoesNotThrow(() -> stage.show()); // This should not result in a StackOverflowError
          }

            jhendrikx John Hendrikx
            jhendrikx John Hendrikx
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: