Infinite recursion in Unbind

Bug #549439 reported by Nicolas Leroux
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
play framework
Status tracked in 1.0
1.0
Fix Released
High
Nicolas Leroux
1.1
Fix Committed
High
Nicolas Leroux

Bug Description

The issue occurs in a custom tag when it tries to render a Tag cloud.

main page=
            #{displayAreaCloud listOfMap:postsByArea, as:'normal' /}

displayTagCloud=
#{if _listOfMap}
 #{list items:_listOfMap, as:'tag'}
    <a href="@{Application.listTagged(tag.get('tag'))}"
class="tag_${tag.get('pound')}">${tag.get('tag')}
(${tag.get('pound')})</a>
 #{/list}
#{/if}

(Note : this is similar to the Blog play sample application)

I tried to collect as much details as I could, hope it will help

The StackTrace :

play.exceptions.TemplateExecutionException:
java.lang.OutOfMemoryError: Java heap space
 at play.templates.Template.throwException(Template.java:295)
 at play.templates.Template.render(Template.java:260)
 at play.mvc.results.RenderTemplate.<init>(RenderTemplate.java:22)
 at play.mvc.Controller.renderTemplate(Controller.java:435)
 at play.mvc.Controller.render(Controller.java:467)
 at controllers.Application.index(Application.java:24)
 at play.utils.Java.invokeStatic(Java.java:129)
 at play.mvc.ActionInvoker.invoke(ActionInvoker.java:138)
 at Invocation.HTTP Request(Play!)
Caused by: java.lang.RuntimeException: java.lang.OutOfMemoryError:
Java heap space
 at play.templates.Template.throwException(Template.java:302)
 at play.templates.Template.render(Template.java:260)
 at play.templates.Template$ExecutableTemplate.invokeTag(Template.java:393)
 at /app/views/Application/index.html.(line:52)
 at play.templates.Template.render(Template.java:237)
 ... 7 more
Caused by: java.lang.OutOfMemoryError: Java heap space
 at java.util.Arrays.copyOf(Arrays.java:2882)
 at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
 at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
 at java.lang.StringBuilder.append(StringBuilder.java:119)
 at play.data.binding.Unbinder.unBind(Unbinder.java:53)
 at play.data.binding.Unbinder.unBind(Unbinder.java:57)
 at play.data.binding.Unbinder.unBind(Unbinder.java:47)
 at play.data.binding.Unbinder.unBind(Unbinder.java:57)
 at play.data.binding.Unbinder.unBind(Unbinder.java:57)
 at play.data.binding.Unbinder.unBind(Unbinder.java:47)
 at play.data.binding.Unbinder.unBind(Unbinder.java:57)
 at play.data.binding.Unbinder.unBind(Unbinder.java:57)
 at play.data.binding.Unbinder.unBind(Unbinder.java:47)
 at play.data.binding.Unbinder.unBind(Unbinder.java:57)
 at play.data.binding.Unbinder.unBind(Unbinder.java:57)
 at play.data.binding.Unbinder.unBind(Unbinder.java:47)
 at play.data.binding.Unbinder.unBind(Unbinder.java:57)
 at play.data.binding.Unbinder.unBind(Unbinder.java:57)
 at play.data.binding.Unbinder.unBind(Unbinder.java:47)
 at play.data.binding.Unbinder.unBind(Unbinder.java:57)
 at play.data.binding.Unbinder.unBind(Unbinder.java:57)
 at play.data.binding.Unbinder.unBind(Unbinder.java:47)
 at play.data.binding.Unbinder.unBind(Unbinder.java:57)
 at play.data.binding.Unbinder.unBind(Unbinder.java:57)
 at play.data.binding.Unbinder.unBind(Unbinder.java:47)
 at play.data.binding.Unbinder.unBind(Unbinder.java:57)
 at play.data.binding.Unbinder.unBind(Unbinder.java:57)
 at play.data.binding.Unbinder.unBind(Unbinder.java:47)
 at play.data.binding.Unbinder.unBind(Unbinder.java:57)
 at play.data.binding.Unbinder.unBind(Unbinder.java:57)
 at play.data.binding.Unbinder.unBind(Unbinder.java:47)
 at play.data.binding.Unbinder.unBind(Unbinder.java:57)

Changed in play:
milestone: none → 1.0.2
Revision history for this message
nicolas@martignole.net (nicolas-martignole) wrote :

Fixed in r979

Thanks Guillaumne for the quick fix

Nicolas

Revision history for this message
nicolas@martignole.net (nicolas-martignole) wrote :

Fixed in r979,
Thanks Guillaume for the quick fix

Nicolas

Revision history for this message
Nicolas Leroux (nicolas-lunatech) wrote :

Fixed the endless recursion as well inside the unbind method.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.