You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Randy Leonard (JIRA)" <ta...@jakarta.apache.org> on 2007/02/16 16:06:05 UTC

[jira] Created: (TAPESTRY-1275) Recursive Components cause heap space overflow

Recursive Components cause heap space overflow
----------------------------------------------

                 Key: TAPESTRY-1275
                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1275
             Project: Tapestry
          Issue Type: Bug
          Components: Core
    Affects Versions: 5.0
         Environment: MacOSX 10.4.8, Eclipse 3.2.1
            Reporter: Randy Leonard
             Fix For: 5.0


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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Commented: (TAP5-134) Recursive Components cause heap space overflow

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12640215#action_12640215 ] 

Howard M. Lewis Ship commented on TAP5-134:
-------------------------------------------

WebObjects is also slow and chews memory like candy!  Tapestry initializes the entire component tree when a page if first loaded.  The page structure is fixed at that point, so that pages can be pooled and shared between requests.

> Recursive Components cause heap space overflow
> ----------------------------------------------
>
>                 Key: TAP5-134
>                 URL: https://issues.apache.org/jira/browse/TAP5-134
>             Project: Tapestry 5
>          Issue Type: Bug
>         Environment: MacOSX 10.4.8, Eclipse 3.2.1
>            Reporter: Randy Leonard
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Closed: (TAP5-134) Recursive Components cause heap space overflow

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-134?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAP5-134.
-------------------------------------

    Resolution: Invalid
      Assignee: Howard M. Lewis Ship

Please reopen the bug *only* if you are getting out of memory exceptions.  From the history, it looks like it was reopened because you want support for recursive components; that would be a new feature, not a bug.

> Recursive Components cause heap space overflow
> ----------------------------------------------
>
>                 Key: TAP5-134
>                 URL: https://issues.apache.org/jira/browse/TAP5-134
>             Project: Tapestry 5
>          Issue Type: Bug
>         Environment: MacOSX 10.4.8, Eclipse 3.2.1
>            Reporter: Randy Leonard
>            Assignee: Howard M. Lewis Ship
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Commented: (TAP5-134) Recursive Components cause heap space overflow

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12640575#action_12640575 ] 

Howard M. Lewis Ship commented on TAP5-134:
-------------------------------------------

I'm having trouble following this ... if you are getting the appropriate error message ("components may not be recursive") then there is no bug, that's the expected behavior.

If you are still getting out of memory exceptions, then there is a bug.

> Recursive Components cause heap space overflow
> ----------------------------------------------
>
>                 Key: TAP5-134
>                 URL: https://issues.apache.org/jira/browse/TAP5-134
>             Project: Tapestry 5
>          Issue Type: Bug
>         Environment: MacOSX 10.4.8, Eclipse 3.2.1
>            Reporter: Randy Leonard
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Closed: (TAPESTRY-1275) Recursive Components cause heap space overflow

Posted by "Howard M. Lewis Ship (JIRA)" <ta...@jakarta.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-1275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAPESTRY-1275.
------------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 5.0)
                   5.0.3
         Assignee: Howard M. Lewis Ship

> Recursive Components cause heap space overflow
> ----------------------------------------------
>
>                 Key: TAPESTRY-1275
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1275
>             Project: Tapestry
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.0
>         Environment: MacOSX 10.4.8, Eclipse 3.2.1
>            Reporter: Randy Leonard
>         Assigned To: Howard M. Lewis Ship
>             Fix For: 5.0.3
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Reopened: (TAPESTRY-1275) Recursive Components cause heap space overflow

Posted by "Randy Leonard (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-1275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Randy Leonard reopened TAPESTRY-1275:
-------------------------------------


I didn't necessarily take previous comments on 1275 to indicate recursive component references would be disallowed, only that the PageLoader wouldn't get confused with recursive components.  So was surprised with the following error message when trying this out again:

	The template for component com.paymentDepot.console.components.MenuCell
	is recursive (contains another direct or indirect reference to component
	com.paymentDepot.console.components.MenuCell). This is not supported
	(components may not contain themselves).

I'd encourage reconsideration on this, as recursive components can be useful.  I could certainly work around the issue, but at the cost of a fair amount of code.  WebObjects allowed this, so perhaps I've been conditioned into a specific style of thinking? 

> Recursive Components cause heap space overflow
> ----------------------------------------------
>
>                 Key: TAPESTRY-1275
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1275
>             Project: Tapestry
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.0
>         Environment: MacOSX 10.4.8, Eclipse 3.2.1
>            Reporter: Randy Leonard
>         Assigned To: Howard M. Lewis Ship
>             Fix For: 5.0.3
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Commented: (TAPESTRY-1275) Recursive Components cause heap space overflow

Posted by "Howard M. Lewis Ship (JIRA)" <ta...@jakarta.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-1275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12474347 ] 

Howard M. Lewis Ship commented on TAPESTRY-1275:
------------------------------------------------

Yep, at build time would make sense. The page builder is just going to endlessly create these Menu components that contain, inside them, a Menu component.

The PageLoader needs to track what its currently building and refuse to go recursive.

> Recursive Components cause heap space overflow
> ----------------------------------------------
>
>                 Key: TAPESTRY-1275
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1275
>             Project: Tapestry
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 5.0
>         Environment: MacOSX 10.4.8, Eclipse 3.2.1
>            Reporter: Randy Leonard
>             Fix For: 5.0
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Updated: (TAPESTRY-1275) Recursive Components cause heap space overflow

Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-1275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship updated TAPESTRY-1275:
-------------------------------------------

    Assignee:     (was: Howard M. Lewis Ship)

> Recursive Components cause heap space overflow
> ----------------------------------------------
>
>                 Key: TAPESTRY-1275
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1275
>             Project: Tapestry
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.0
>         Environment: MacOSX 10.4.8, Eclipse 3.2.1
>            Reporter: Randy Leonard
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org