Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-12399

Using a Dashboard in a Dashboard causes a StackOverflowError

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Minor
    • None
    • 7.1.1
    • Dashboard
    • Unknown
    • N/A
    • N/A

    Description

      Steps to reproduce:

      • Create a new page and add a { { dashboard / } } macro to the content of the page.
      • Use the forms editor to add a "Dashboard" Gadget to the Dashboard
      • Save and view the page

      Of course this makes no sense and does not work, but instead of producing an error message like it happens for recursive page includes, this displays

      Unexpected error. Contact your administrator or report the issue. Click this box to get technical details. 
      
      org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getRenderedContent' in  class com.xpn.xwiki.api.Document threw exception java.lang.StackOverflowError at 82:/skins/flamingo/view.vm[line 25, column 36]
      	at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:261)
      	at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:187)
      	at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:280)
      	at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:567)
      	at org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:71)
      [....]
      Caused by: java.lang.StackOverflowError
      	at com.xpn.xwiki.internal.model.reference.CurrentDocumentReferenceProvider.get(CurrentDocumentReferenceProvider.java:56)
      	at com.xpn.xwiki.internal.model.reference.CurrentDocumentReferenceProvider.get(CurrentDocumentReferenceProvider.java:40)
      	at org.xwiki.component.internal.DocumentComponentManager.getCurrentReference(DocumentComponentManager.java:66)
      	at org.xwiki.component.internal.AbstractEntityComponentManager.getComponentManagerInternal(AbstractEntityComponentManager.java:72)
      	at org.xwiki.component.internal.multi.AbstractGenericComponentManager.getComponentManager(AbstractGenericComponentManager.java:61)
      	at org.xwiki.component.internal.multi.DelegateComponentManager.hasComponent(DelegateComponentManager.java:71)
      	at org.xwiki.component.internal.multi.DelegateComponentManager.hasComponent(DelegateComponentManager.java:71)
      	at org.xwiki.component.internal.multi.DelegateComponentManager.hasComponent(DelegateComponentManager.java:71)
      	at org.xwiki.rendering.internal.macro.DefaultMacroManager.getMacro(DefaultMacroManager.java:124)
      	at org.xwiki.rendering.internal.transformation.macro.MacroTransformation$PriorityMacroBlockMatcher.match(MacroTransformation.java:110)
      	at org.xwiki.rendering.block.match.BlockNavigator.getFirstBlock(BlockNavigator.java:253)
      	at org.xwiki.rendering.block.match.BlockNavigator.getFirstBlock(BlockNavigator.java:258)
      	at org.xwiki.rendering.block.match.BlockNavigator.getFirstBlock(BlockNavigator.java:258)
      	at org.xwiki.rendering.block.match.BlockNavigator.getFirstBlock(BlockNavigator.java:258)
      	at org.xwiki.rendering.block.match.BlockNavigator.getFirstBlock(BlockNavigator.java:258)
      	at org.xwiki.rendering.block.match.BlockNavigator.getFirstBlock(BlockNavigator.java:258)
      [...]
      

      On instances with a bigger stack the page might not show up at all but time out and keep the server busy.

      A recursive include detection similar to the include macro would be nice to prevent this problem.

      Attachments

        Activity

          People

            surli Simon Urli
            camil7 Clemens Robbenhaar
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: