Tapestry 5
  1. Tapestry 5
  2. TAP5-134

Recursive Components cause heap space overflow

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      MacOSX 10.4.8, Eclipse 3.2.1

      Description

      Embedding a recursive reference to a component within an html template causes a stack overflow. Example menu component is as follows:

      <tr xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
      <td>
      <t:comp type="Iff" test="prop:menuItem.isSelected">
      <b>$

      {menuItem.name}</b>
      <t:comp type="Iff" test="prop:menuItem.containsSubMenu">
      <t:comp t:type="menu" menuHierarchy="menuItem.subMenu"></t:comp>
      </t:comp>
      </t:comp>
      <t:comp type="Iff" test="prop:menuItem.isSelected" negate="true">
      <a t:type="PageLink" page="prop:menuItem.pageName">${menuItem.name}

      </a>
      </t:comp>
      </td>
      </tr>

      The menu component works fine if the recursive if the recursive reference is removed. The error seems to take place at startup, not at render time.

      Error message displayed in browser is as follows:

      A runtime exception has occurred.

      org.apache.tapestry.ioc.internal.util.TapestryException
      Could not convert 'menuItem.name' into a component parameter binding: Java heap space
      location
      classpath:org/example/hilo/components/MenuCell.html, line 4, column 23
      org.apache.tapestry.ioc.internal.util.TapestryException
      Java heap space
      location
      classpath:org/example/hilo/components/MenuCell.html, line 4, column 23
      java.lang.OutOfMemoryError
      Java heap space

        Activity

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Randy Leonard
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development