Infinite loop occurs while resolving lookups

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • jfx24
    • Affects Version/s: jfx23
    • Component/s: 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
          }

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

              Created:
              Updated:
              Resolved: